> > Perhaps it's just me,but this doesn't seem like it would need an > optocoupler. If you want to use a relay, just put a 1N914 or 1N4148 diode > across the coil to prevent voltage spikes and it should be fine. Just be > sure that your relay coil doesn't need more current than the pic pin can > source. The problem is that almost always the coil requires more current than a PIC can source. Reed relays like that Radio Shack 275-0232 part only requires 20ma though. It would handle the job. I usually use the optocoupler not only for isolation but to bump up the current. > > I'd be tempted to solve the whole problem with a power darlington (like one > of the TIP series). Just put the strike between 5V and the darlington's > collector. Base to the PIC via a 4.7k resistor, emitter to ground. Add an > additional 1.5k resistor from base to ground,to prevent self turn-on. Now this sounds like a good idea. > > In either case, put a 1N4004 or similar diode across the strike (with > cathode toward positive - reverse biased) to prevent voltage spikes. A > capacitor such as a 0.1 uF ceramic disc would also be good across the > strike. I take it that the strike contains a motor? Probably an electromagnet. BAJ