0
\$\begingroup\$

How can i design a circuit for tapping digital DC signals from PLCs?

I desire to create a circuit with a MCU which can be attached to a PLC signal in the range 0-24V and log the signals on the MCU. I only need to log on/off state of the PLC. "Off" is defined as 0-5V and "on" as 13-24V. It is of high importance that the PLC and MCU are isolated from each other. I have thought of using either Darlington or linear optocouplers.

My design thoughts are to use a single resistor or a voltage divider to scale the PLC voltage down in the range of the optocoupler in order to not burn the diode. However I doubt that if I do this it is possible that the circuit mesh with the PLC signal? Eg. pull it lower than 24V. I have never worked with PLCs before so I have no clue what the general or standard output current is.

Any thoughts/experience or good advice?
Thanks!

\$\endgroup\$
4
  • \$\begingroup\$ Is the output a PNP or NPN type? \$\endgroup\$ Apr 12, 2017 at 13:44
  • \$\begingroup\$ I have not yet decided for a specific Optocoupler. But both will work for me. \$\endgroup\$ Apr 12, 2017 at 13:51
  • \$\begingroup\$ Is the PLC output a PNP or NPN type? \$\endgroup\$ Apr 12, 2017 at 14:27
  • \$\begingroup\$ The PLC output can be both. I'm aming towards making this independent of the type/brand or PLC. This is because in my application I do not have control over which PLCs are used together with this system. I have the requirement that I need to log 24V on/off signals, no matter if it is a NPN or PNP type. \$\endgroup\$ Apr 12, 2017 at 14:40

1 Answer 1

0
\$\begingroup\$

Impedance can be easily tested with large load or pullup and compute V/I change. For this "Logic level" with 5:1 Voltage divider using 1~10M . Darlington solution is ok with Series R to limit IR input current and shunt R to turn off faster. Then loading is only 1~20uA . So this logic translator could have specs Zin=100k~10M and be either a 5:1 CMOS Logic Schmitt trigger to drive Opto or transistor or Op Amp... U decide.

I would use 1M:250K to 'HC14 to opto (with CMOS logic out) or better confirm PCL impedance and then improve choice if latency or transition speed is an issue.

or use tiny SO8 Schmitt inverter (dual) https://www.digikey.com/product-detail/en/fairchild-on-semiconductor/NC7WZ14P6X/NC7WZ14P6XTR-ND/965444 $0.50 (1) with 50mA drive to twisted pair with CM choke and no opto

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
5
  • \$\begingroup\$ Thanks for your thoughs! The systems we work with are changing state maybe once or twice a minute, so speed is no issue. We are not in control of which PLCs the device will be used on, so it is of high importance that it is generic, or at least as good as possible... If we would use a logic schmitt trigger it will need a power supply, hence our system is not completly isolated. Why would you use the HC14 diode? \$\endgroup\$ Apr 12, 2017 at 13:59
  • \$\begingroup\$ 74HC14 can use host supply 3~15V or any single gate Schmitt trigger in SMD then use logic level output Opto with Schmitt input. Then it is a 3 wire connection. Vdd, Sig,Vss using twisted wires for immunity. 'HC means 54HCxx... or 74HCxx Total cost $2 (1) $0.25 (1k) \$\endgroup\$ Apr 12, 2017 at 14:15
  • \$\begingroup\$ so which do you prefer? \$\endgroup\$ Apr 12, 2017 at 15:38
  • \$\begingroup\$ I will setup a test on a breadboard and evaluate the performance of the different solutions. After that I will update you. \$\endgroup\$ Apr 13, 2017 at 7:44
  • \$\begingroup\$ The PLC say has a 250ohm resistor to convert this 4mA current to 1V and 20mA to 5V. so you can load it with 1% differential easily. or 250ohms * 100 or 25k . Several approaches . Draw 1% Current then linear current gain = 100~250 to opto IR in linear mode with PD only, or voltage compare like above. \$\endgroup\$ Apr 13, 2017 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.