While the LR8 is about $1. each (TO-92), it can take any DC voltage up to +450 and with 2 resistors take it to any lesser voltage (-~12v) again as I remember. 20 ma out... a handy circuit without dealing with larger wattag= e dropping resistors in optos. FYI... Rich -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Carl Denk Sent: Monday, September 16, 2013 11:14 AM To: Microcontroller discussion list - Public. Subject: Re: [PIC} AC inputs to a PIC Thanks again for the inputs, but I should have mentioned, there will be mor= e than a few maybe 8 of these inputs, and any could be any of the voltages. Looking for something inexpensive and small footprint. the opto isolator fits that spec. Didn't know the details of implementing.=20 Thanks again. Incidentally I use a 120VAC in, 5VAC out wall wart as PIC ADC input to measure the AC voltage. it's a little more complicated than that, but works nicely. On 9/16/13 10:43 AM, David Bearrow wrote: > I think I would just use a small 5VDC power supply. Then you could=20 > detect 5V or 0V depending on if it was on or off. There are lots of=20 > off the shelf supplies or you could build one. > > David Bearrow > > -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On=20 > Behalf Of Carl Denk > Sent: Monday, September 16, 2013 7:34 AM > To: PICLIST > Subject: [PIC} AC inputs to a PIC > > I have a home project coming down the road mainly HVAC stuff of=20 > digital inputs to a PIC probably a 18F??. THe inputs would be only to=20 > sense on/off. The voltages would be 24 VAC, 120 VAC, and 240 VAC. I'm=20 > thinking through an Opto isolator with a resistor and capacitor on the AC side. > Values ? Configuration? or something else? > > This is a low priority at the moment, but thought I would generate=20 > some traffic for Bob. :) > > Thanks again. -- http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/chang= e your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .