<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1632&stc=1&d=117923716 3" align="right">
I'd probably be inclined to use OPTO Couplers if I had a problem like this. In essence, an OPTO provides total electrical isolation between the control and switching circuit by using light to bias a zero gain internal transistor inside the OPTO. These devices are typically well insulated - not uncommon for a dielectric strength of 5KV or more!
Sample pictured far right shows everything you need to safely switch a relay using an OPTO. As a general rule of thumb - you need to bias the internal LED with about 10 x the current that you require its internal transistor to switch. But in the case of the sample shown, the work around is to use an additional external transistor to beef things up. If you follow the formula for calculating R1, then Q1 will be happy to switch about 0.001 x Q1's ßeta value. Q1's ßeta could range anywhere between 100 - 1000 depending on the type of transistor you implement. The circuit is quite orthodox.
You'll be very hard pressed getting an OPTO to respond to any noise or surrounding electrical interferences. OPTO's are cheap, come in a standard 6 pin DIL package, and most importantly they're easily implemented.
<br/>
Bookmarks