0
\$\begingroup\$

I've a microcontroller and I want to have some protection for a digital output, but I only have one power source so I was thinking on use a diode to prevent backward currents.

It's reasonable to use an optocoupler for this purpose? The side effect of inverting the output isn't a issue.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
2
\$\begingroup\$

If this is a hobby project and you have an optocoupler lying around, it might make sense, assuming your optcoupler is any better at withstanding ESD strikes than your uC (Those thousand-volt withstand ratings on optos are for voltage differences between the transmit and receive side, not between the two terminals on the same side of the isolation barrier).

But if you have to buy the parts, a couple of Schottky diodes is probably cheaper:

schematic

simulate this circuit – Schematic created using CircuitLab

Your micro probably already has a similar structure internally, but it's ability to absorb transients is limited to avoid slowing down the input. If you expect only slow inputs, you can provide additional, beefier external diodes to improve the ESD performance. (Note: CircuitLab doesn't seem to have a Schottky symbol, but be sure to use Schottky diodes, otherwise the internal diodes on the uC will end up taking up most of the current before your external diodes start to work)

Edit: Yes, this will also work for outputs.

\$\endgroup\$
  • \$\begingroup\$ In this circuit, 'input' will be the output of the uC? \$\endgroup\$ – Luis Ramon Ramirez Rodriguez Apr 14 '16 at 2:24
  • \$\begingroup\$ Yes, you can also use this with a uC output. \$\endgroup\$ – The Photon Apr 14 '16 at 4:31

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.