Electronics > Projects, Designs, and Technical Stuff
Optocoupler sharing GND
mrburnzie:
Okay, I was never sure when to use isolation when it comes to isolating GPIOs?
3.3V is too low for cables over 5m?
Siwastaja:
Such long cables increase the risk of electromagnetic interference; I would just deal with it with RC filtering (the capacitors I mentioned in my previous post).
Like 4.7kOhm pull-up first, after the pull-up a 1kOhm series resistor, then a 100nF capacitor to ground.
"Filtering the shit out of it" works because with mechanical switches, you don't need quick response. A 1kOhm + 100nF filter has approximately the response time of R * C = 1k * 100n seconds = 100 microseconds.
Others may recommend heavier solutions. One of them is optoisolation. Optoisolation gives some robustness against EMI for two reasons not related to the isolation itself:
1) They are SLOOW
2) The LED requires quite some actual current to drive. A small inducted current cannot make it light.
Isolation is nice, but note that you need a power supply so that current can flow through the switches, to the LEDs in the optoisolators. And to keep the sides isolated, this power supply needs to be isolated. Cheapish isolated DC/DC modules exist for this reason.
mrburnzie:
Okay, thanks for the clearing it up for me!
Alex Eisenhut:
And just be careful in the future, if you do use opto-isolators: those ground symbols you are using probably connect to the same netlist internally to your tool. Just because you drew them on an opto-isolator and you don't see a wire, the tool won't care what you meant and will connect them all together when it comes time to make a netlist.
Then you will have a connection to both sides on the PCB if you ever go to a PCB.
And in any case, you should use two different ground symbols with two distinct names to be unambiguous.
Usually I use "CGND" for "chassis" ground for the "dirty" stuff, ie outside of my circuit.
Navigation
[0] Message Index
[*] Previous page
Go to full version