On Monday 31 March 2003 12:46 am, Jinx wrote: > I'm using this circuit to protect the PIC's input against voltage > spikes from relays and a motor. With a 1N5818 the input is > successfully stopped from going too far below 0V wrt the PIC's > internal diodes. Is the 1N5818 a bit OTT and could a smaller, > cheaper diode like a BAT be used ? > > 1N5818, 1A, Vf 0.55V > BAT81, 30mA, Vf 0.40V > BAT46, 150mA, Vf 0.45V > BAT43/BAT86, 200mA, Vf 0.33V Depends on the voltages and currents you're likely to be seeing. What I do is even simpler: I use a series-connected dual Schottky in a SOT-23 case (like the Fairchild BAT54S http://rocky.digikey.com/WebLib/Fairchild/Web Data/BAT54_A_C_S.pdf), running the cathode to V+, anode to GND, and common to the input pin. Then I use a resistor/capacitor to limit the current and fast pulses. The BAT54 is a 200mA 30V part (though of course the voltage rating doesn't matter here, as you're never going to see more than 5V reverse). You could use a much larger resistor than a 4.7K. If you're using this as an analog input, your external capacitor, if large enough, can provide the current to charge the sampling cap. -- Ned Konz http://bike-nomad.com GPG key ID: BEEA7EFE -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body