Hi, the 16C62x series have a built-in comparator. Or, you can measure the loop balance value with 16C7x as A/D. Imre On Thu, 13 May 1999, Alan King wrote: > Byron A Jeff wrote: > > The toughest part is going to be the sensors. Door loops are subject to quit e > > a bit of noise. In my prototype alarm system (which used a button and beeper > > interface, i.e. three beeps to activate, two to disarm, 4 for status) the > > door loop falsely triggered until I debounced with a 200ms debounce routine. > > > > 2) Attached the 120V interface wires to an optoisolator and a reversed biase d > > led through a 10Kohm 2W resistor. > > Just a note on the door loops, it's best to use a say 4.7k > resistor at the sensor end, and a resistor at the alarm > end. Then use a 339 set up for a window comparator around > 2.5V. That way, even if they short or open the wire, it > still goes off. Any halfway competent thief can bypass a > cheap system without this by shorting the wires. And a 339 > and a few resistors is cheap anyway. > Also, I know you're talking simple here, but never trust > an all wireless system. Amazing how many expensive alarms > can be walked through by setting a signal gen to ~318 MHz > and cranking up the power from outside the house. Good ones > will still go off after a few minutes of no reports, but do > this a few days running and the police stop coming.. > Still seems just as easy to hack back before the triac, > but at least you did #2!! Amazing how many commercial > devices violate the PRV spec, even though most magically > keep working anyway.. > >