I am working on creating 24V industrial Grade(Like Siemens PLC I/O) Digital Input circuit,The micro will use the 3.3V supply. circuit works with TWO input signal one of them is 24V industrial "24V_sig" and should be protected ,the "5V_IN" is from Tac switch. (D1,D2 and D5,D6 In OR Combination).

I have some ideas but I don't know do I think in right way. Here is two circuit that i design : First


1-Which way of protecting is better, first or second?

2-in first circuit,is it necessary to add D4 when there is SMBJ28C there ?

3-Should i connect Common to GND ?

  • \$\begingroup\$ What surge levels (and what specification for surges) are you protecting against? \$\endgroup\$ – Andy aka Dec 18 '19 at 14:23
  • \$\begingroup\$ why u put tac in isolated part? is it tac as push button in pcb or near the safe side (mcu) ? \$\endgroup\$ – Hasan alattar Dec 18 '19 at 14:57
  • \$\begingroup\$ 3- no , that way u break the isolation right? \$\endgroup\$ – Hasan alattar Dec 18 '19 at 14:58
  • \$\begingroup\$ The push button is in PCB ,but it is safe and doesn't need protection \$\endgroup\$ – Danesh_sa Dec 18 '19 at 15:08
  • \$\begingroup\$ @Hasanalattar yeah it break isolation.So how to ground signal throw D1 path? \$\endgroup\$ – Danesh_sa Dec 18 '19 at 15:13

To answer your question, let’s evaluate the failure modes(or in simple words ways to break your circuit) and then apply protections. Assuming that your 24V signal comes from a wild industrial environment where everything is possible we could have the following scenarios: 1. Reverse voltage applied on Common and 24v signal, 2. Very high transient voltage applied with positive or negative polarity. 3. High frequency noise riding the 24V or common wire due to machinery operating in the vicinity.

Now to protect against all of these your circuit does need to have a TVS diode, an RC filter and these located such that these devices would not be compromised in any of the failure modes defined above.

Having a TVS diode like SMBJ28C is a good idea but directly putting it on the input would risk damaging this component as early as a higher voltage is applied on 24V line as the current may exceed the max current rating of this component. So it would be better to have this TVS diode after the resistor.

You may decide to add a small bipolar capacitor after the resistors to create a low pass filter and block higher frequency noise from randomly triggering the inputs of your micro controller.

If you shift your TVS after the resistors then you don’t really require D4 because your TVS is doing its job and wouldn’t really allow the voltage on your optocoupler input to go outside the -28v to 28v voltage range.

The answer to your third question, you shouldn’t make ground common unless it’s really required. This is fundamentally why isolation exists and if you connect ground and common then technically your micro controller isn’t protected at all.

Adding to the same point, you can have a button for testing but you should provide it power from an isolated source like a 9V battery or so. You can’t use your circuit’s power without compromising the isolation.

For your resistors just rerun the numbers to evaluate whether you would provide decent current to the optocoupler’s internal Diode so it powers up properly when a valid 24v signal is applied.

Typically the current through a diode can be calculated by the quation below:

Vsource - Vbias = R * I

Where R is total sun of resistances before of after the diode. You must keep Current at the optimal range by playing around with resistor values.

Hope this helps.


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.