0
\$\begingroup\$

I want to protect an output pin from ESD, reverse connection, and other possible user error that might cause damages to my circuit. This pin output pulses depend on the amount of water passing through a pipe and is to be read by the user. The circuit must be of very low consumption because it is supplied by a batteries that must work for years.

Does anyone have an example circuit to start with?

After reviewing different circuit, I decided to use the following circuit to optically isolate my circuit from the outside. Do you have any suggestion to complete this circuit? enter image description here

\$\endgroup\$
  • 2
    \$\begingroup\$ This link seems to address a bunch of different situations: digikey.com/en/articles/techzone/2012/apr/… \$\endgroup\$ – Phil N DeBlanc Apr 16 '18 at 17:08
  • 2
    \$\begingroup\$ Protect from reverse connection of what on the output pin? What might the user connect in an incorrect manner? \$\endgroup\$ – Transistor Apr 16 '18 at 18:54
  • 1
    \$\begingroup\$ sounds like a job for an open drain optocoupler \$\endgroup\$ – dandavis Apr 17 '18 at 5:26
  • \$\begingroup\$ Thanks for your responses. I want to optically isolate my circuit using an optocoupler from the pulse counter as shown in the above circuit. Is it a good choice? can I complete it more? \$\endgroup\$ – Hashem Ahmadi Apr 18 '18 at 7:46
1
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

Something like this is a starting point. Check the ESD capability of the MCU. To fully protect against ESD you may need to add a TVS and another resistor and pay special attention to the leakage of the TVS relative to R1.

You will need to debounce the switch in firmware or alter the time constants in conjunction with hysteresis of the input to eliminate multiple counts from bounce.

\$\endgroup\$
0
\$\begingroup\$

This is a quite current hungry as the opto LED will take a few mA to make it light. The level of difficulty depends on what you are driving and how much protection you need.
From your circuit it looks like you are just driving a logic output at slow speed.
A simple series resistor is a good start, using the diodes to the supplies from the pin in the micro to do the rest. The resistor limits fault current into these diodes (max diode current is shown on the micro-controller data sheet).

The next stage is series resistor followed by a TVS (transient voltage suppressor) diode to 0V and then another resistor to the connector. This will help protect against ESD. Remember that the ESD current will go somewhere, so make sure that it can get to ground without going through your circuitry.
The first resistor protects the micro's diodes because the TVS voltage can rise significantly above its breakdown voltage during a fault. The second resistor to the external connector protects the TVS. The values and power rating of the resistors depends on what Voltage your user can wire the output to!

Most TVS specify power handling for very narrow pulses, so it will be much much less for a continuous connection.

\$\endgroup\$

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.