For a microcontroller generating a 20mA industrial digital output. What kind of setup is best? I'm considering:
- Microcontroller pin driving a low current N-FET to pull a 24V signal to ground. But this is probably not good as EMF on the line could damage the microcontroller.
- Using a high/low side N-FET driver to drive an output. Does this offer any added protection compared to the above method? It's still galvanically connected, but is it any better?
- If the output speed can be slow: microcontroller driving an N-FET, which drives an optoisolator (since I dont want to pull a lot of current from the micro).
What are your guys go to setups? #3 seems best if the slow switching of an optoisolator is fine. But if you want a more responsive 24V signal, is #2 good enough protection wise?