0
\$\begingroup\$

enter image description here

First post! Please bear with me...

I am an electrical tech and EE student with no design experience. This is the first circuit I've been asked to design. I have been given the task to take the input from the existing circuit to switch the inputs of the PLC. The PLC has ground switching inputs with the "0" state being 18-30V. I need SW1 to provide a low to the PLC input when closed, and nominally 24V when open.

I ran a SPICE simulation of this circuit, and it appears as if it will work. However, I'd like to know if I am taking the right approach. There will be a total of 60 such circuits on a single PCB.

The darlington array is part of an octal IC so I could get my 24V 'off' state at the PLC. I am using an octal inverting buffer IC so that the input of the existing circuit is not inverted at the PLC. R6 is to pull up the voltage to 5V at the input of the inverter. I am using R2, R3, D2, D3 for input protection based off the information I read here:

http://www.digikey.com/en/articles/techzone/2012/apr/protecting-inputs-in-digital-electronics

I believe I was using the SN74ALS540 as the inverter. Is the external input protection necessary here? Since I am doing a board layout of 60 circuits, it would make my life much easier if I could omit it. I chose D1 as a schottky for the low forward voltage, so I am well below the V_IL of the inverter.

I appreciate any suggestions/constructive criticism.

\$\endgroup\$
  • \$\begingroup\$ Seems awfully complex and I would suggest avoiding the chip and all the associated protection. \$\endgroup\$ – Spehro Pefhany Nov 11 '16 at 7:03
  • \$\begingroup\$ The PLC has probably NPN type digital input (link a datashhet of PLC), so you just connect the switch from input to ground, no additional circuitry is needed, that's why a PLC is for. \$\endgroup\$ – Marko Buršič Nov 11 '16 at 7:47
  • \$\begingroup\$ Marko, I can't connect directly to the PLC because I need 24V nominally for the 'off' state. \$\endgroup\$ – ET2EE40 Nov 11 '16 at 8:26
  • \$\begingroup\$ @ET2EE40 I guess, you don't understand the PLC manual correctly. Usually the PLC has optocoupled inputs, so when the LED diode lits on it is a logical 1 state. With PNP models, you have to apply 24VDC to have a 1 state, meanwhile for NPN model you have to connect GND, the 24V is already connected, so that's why you have 24V at input for 0 state. \$\endgroup\$ – Marko Buršič Nov 11 '16 at 9:20
  • \$\begingroup\$ You would be correct that I do not understand the manual fully. I am brand new to dealing with PLCs. \$\endgroup\$ – ET2EE40 Nov 11 '16 at 14:57
1
\$\begingroup\$

Your circuit should work assuming you're talking about a ULN2803 or something with an internal base resistor where you show a discrete darlington.

Noise immunity will be at most some hundreds of mV when low.

The 10R resistor means the 5V source could be called upon to sink a lot of current if D1 breaks down (quite plausible with a Schottky). Most 5V regulators won't sink any current.


It's usually worth a bit of effort to reduce the complexity when there are many channels. Consider this approach:

schematic

simulate this circuit – Schematic created using CircuitLab

If you use a network for the resistors, that's two dual transistors and 3 4-resistor networks for every 4 channels, so 75 parts total. If you use pre-biased dual transistors, then you only need 3 parts for each 4 channels so 45 small parts total for all 60 channels.

When the switch is closed, the emitter of Q1 is grounded and the transistor is saturated via base current from R2, so the output voltage is less than 0.1V.

When the switch is open, the emitter and base are close to the same potential and the transistor is off, so the collector is pulled up to 24V by R3.


\$\endgroup\$
  • 1
    \$\begingroup\$ Thanks a ton for this. I won't be able to tap into the 12V supply, but I can use a linear regulator to get 12 from the 24V supply. Much thanks. \$\endgroup\$ – ET2EE40 Nov 11 '16 at 8:29
1
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

schematic

simulate this circuit

This is probably the correct wiring diagram for your PLC with NPN input. No additional circuitry is needed. Altrough you shold post the PLC datasheet for making sure.

EDIT:

So, it's exactly what I was thinking. You have a sourcing input on PLC or sometimes called NPN input. The 24Vdc comes from bus. The PLC inputs already have optocouplers and anything for input protection. This is EL1809, sinking input (PNP) https://gadgetsinside.wordpress.com/:

enter image description here

You can see the optocouplers. At this point, I don't understand why you need an external circuitry, if the PLC has anything you want. It has LED indicators, it accepts a direct switch connection, it's robust. Why would you need all that useless stuff arround? Further, it is not neccessarly that attaching your existing circuit with 12vdc could make troubles, it would be just weird, like it would be weird all your circuitry for someone that is used to see a robust and straighforward use of PLC.

Anyway, this is the new modification:

schematic

simulate this circuit

\$\endgroup\$
  • \$\begingroup\$ Thanks for the suggestion. One of the design limitations is that I can't change anything about the existing circuit. When the PLC was connected directly to the input of the existing circuit, I was told they were measuring close to 11V at the PLC with the switch open. This is why I was asked to do this. If the PLC was at 24V in the off state and connected directly to the switch, I imagine the 12V reverse voltage on the LED would be problematic. \$\endgroup\$ – ET2EE40 Nov 11 '16 at 14:55
  • \$\begingroup\$ Btw, the PLC is a Beckhoff EL1889 \$\endgroup\$ – ET2EE40 Nov 11 '16 at 15:08
  • \$\begingroup\$ Thanks for the additional explanation and photos. The external circuit I showed is a hand held controller already in use in the field. It is used as a manual control for the inputs of the PLC via SW1. I cannot modify it. This morning I measured an unconnected input of the EL1889 to the negative of the 24V power supply and got a reading of around 11V. I don't have a good explanation for this. Any ideas? \$\endgroup\$ – ET2EE40 Nov 12 '16 at 1:34
  • \$\begingroup\$ Why do you bother if the reading is 11V? The PLC input has to switch from 0 to 1 when you connect input to ground, this is the only function of it. If you are in industrial control branch, then you have 24Vdc for general IO, and 5V for high speed pulses like servo, encoders,...forget the 12V and anything that was not made for PLC, throw it in a trash. I would like to say also that ind. control is straigthforward, if you need a soldering iron you have to ask yourself, that something might be wrong. \$\endgroup\$ – Marko Buršič Nov 12 '16 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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