This article explains how to implement a circuit that allows you to read up to eight analog signals from 4 to 20 mA into the digital input of a PLC that has no analog inputs. The presented solution has an excellent cost-benefit ratio.
Before we introduce the circuit, we will do some basic definitions as follows.
What are analog signals
An analog signal is any continuous signal whose variation in time represents the variation of a physical quantity, thus making an analogy between the quantity and its electrical representation.
Example physical quantities that can be represented by analog signals:
- Temperature;
- Pressure;
- Level of a liquid or reservoir.
Example analog signals:
- 0 to 10 V;
- 4 to 20 mA.
That is, we can, for example, define that a temperature in the range 0 oCto 100 oCwill be represented by a 4 to 20 mA signal. So when the temperature is 0 oCthe signal will have 4 mA, when the temperature is 50 oCthe signal will have 12 mA, and when the temperature is 100 oCthe analog signal will have 20 mA.
An example of a temperature sensor that operates in this range is the PT100, and the circuit that produces the 4 to 20 mA signal is the magnitude transducer that converts the PT100 signal to an analog signal.
What is the analog input of the PLC
Analog input from a CLP is the part of the PLC circuitry that reads an analog signal and internally converts it to a binary value that will be stored in one or more bytes of the PLC memory. The analog inputs of the PLC are specified by the type of signal (0 to 5 V, 0 to 10 V, 0 to 20 mA, 4 to 20 mA, PT100, thermocouple, etc.) The analog inputs are also specified by their resolution (8 bits, 10 bits, 12, bits, 16 bits). The analog inputs can be contained in the main CPU or in expansion modules.
Convert 4 to 20 mA analog signals into pulses to read on the PLC’s digital input
The following circuit consists of a multiplexed converter that allows you to acquire 8 analog signals from 4 to 20 mA into a pulse signal to be read into a fast digital input of a PLC.
Description of how the multiplexed analog signal converter works
Input Conditioner – Each analog input signal is conditioned by this circuit. The PTC thermistor acts as a resettable fuse that “opens” when the 4 to 20 mA signal exceeds 50 mA, protecting the sensor circuit. The TVS diode protects against over voltage. The 220 ohms resistor is an input sensor, and R9 and C1 act as a low-pass filter.
Multiplex Analog Switch – The CD4051 integrated circuit receives the 8 analog signals at inputs X0 to X7 and passes the selected signal on to output X.
The signal sampled at output X is the one defined by the selection made at inputs A, B, and C.
Inputs A, B, and C are connected to digital outputs of the PLC.
Amplifier circuit – This circuit, formed by two operational amplifiers of the LM324 IC, has the function of amplifying and adjusting the ZERO (offset) of the circuit.
Voltage to pulse converter – This part of the circuit has the function of converting the 4 to 20 mA signal, previously converted to voltage, to pulses. The SPAN adjustment is made at trimpot R39. The LM331 IC acts as a voltage-to-pulse converter and the BC327 transistor converts the level to pulses at 24 VDC, suitable for the PLC’s digital input.
Operating Logic of the Analog Signal Multiplex Converter
The circuit consists of a multiplex analog switch that selects one of 8 analog inputs. This selection is made on the three inputs SL0, SL1 and SL2. The selected channel provides the signal for the current-to-frequency converter. The frequency converter provides at the OUT output a pulsed signal of frequency proportional to the current of the selected channel. The signal has the amplitude of the supply voltage, usually 24V, and frequency ranging from 600Hz to 3000Hz. In the application, the PLC should be programmed to sequentially select the 8 channels, and count the pulses for each analog input. The suggested algorithm is shown below.
- Channel = 0
- Wait 0.25 seconds
- Counter = 0
- Wait 0.25 seconds
- Input (Channel) Reading = (Counter – 250)
- Channel=Channel+1
- If Channel > 7, then Channel = 0
- Back to 2
With the algorithm above, for each digital input a value in the range 0 to 999 will be read, proportional to the input current. And the total scan cycle is 4 seconds.
Circuit Calibration
Follow the following procedure:
- Switch off inputs SL0, SL1 and SL2
- Turning on the power
- Connect a current source to input EA0
- Set the current source to 20 mA
- Adjust the SPAN trimpot to get 3000 Hz on the OUT output
- Set the current source to 4 mA
- Adjust the ZERO trimpot to get 600 Hz at the OUT output
- Repeat steps 4 through 7 until calibration is complete
O IA2820 analog converter analog converter is a multiplexed signal converter. It is capable of converting up to 8 analog current signals from 4 to 20mA, generating a pulse output with a frequency proportional to the selected input. Its use is intended for PLC configurations that have fast count input, enabling the acquisition of up to 8 analog signals per IA2820 module at an extremely competitive price. For each analog input, the module has a detachable connection with: 24V, Signal, and GND. In this way, the module also functions as a terminal block, saving space and assembly time.
Você precisa fazer login para comentar.