I see Mike is up and about.
I also neglected to include the use of an isolated power supply which is why a opto coupler is used. I intended to include that and went off on a tangent. Bad Ron on that note.
Overall the best way to go about it is to start with the isolation Mike has covered.
Ron
I also neglected to include the use of an isolated power supply which is why a opto coupler is used. I intended to include that and went off on a tangent. Bad Ron on that note.
Your drawing in post #17 reflects 12 volt power to the relay coil, so I used 12 volts. 12V - .2V = 11.8V / 75 Ohms = 157.3mA which I made 160mA in the example. That is how I went about it anyway.Should it not be I= V/R = (5V - 0.2V) / 75Ω = 64mA ?
Overall the best way to go about it is to start with the isolation Mike has covered.
Ron