I would suggest looking at the phase angle between voltage and current. An incandescent bulb is almost purely resistive whereas CF lamps will have some phase shift due to their inductive power convertors (assuming imperfect power factor convertors, if they even bother to use them). LEDs will have a 'dead band' where they draw no current as voltage rises, until biased on. If you switch the LOW side of the circuit, then 120VAC will appear on the switch only when the bulb filament is intact. Use a standard 120VAC detect optocoupler circuit to see the signal (capacitive voltage divider) and provide your needed isolation to the PIC. Robert Jesse Lackey wrote: > On a related note ... I'm curious if anyone has any ideas on how to > detect an incandescent vs. CF (or LED) bulbs. The relevant difference > being that most CF (no idea about LED) can't be dimmed. Really not sure > how this could be done! Anybody ever do this? Can it be done reliably > with CF bulbs from different manufacturers? > > J > > John Walker wrote: > >>Hi all! Long time lurker, first time poster. >> >>I am working on a project where I want to use a PIC pin to detect that >>an incandescent light bulb (120VAC 25W) has been inserted into a >>standard light socket. I want to do this by using the fact that when a >>bulb is in the socket its filament will act as a sort of switch across >>the socket contacts. There are two ways I can think of doing this: >> >>1) I could use a DPDT relay connected across the socket and energize the >>relay when I scan the socket. (Seems dangerous to me) >> >>2) I could use the technique discussed in the Microchip App. note >>concerning AC interfacing. The problem with this is that I want to be >>able to detect the bulb without having to turn it on. I could flow low >>current through it but that would change the component values and cause >>problems when the bulb is actually turned on with full current. >> >>I'm sure there are several other ways to accomplish this and could use >>your recommendations. To recap, I want to detect when a bulb is in a >>socket using the filament as a switch. I will use a PIC pin to monitor >>this and will use another PIC pin to turn the light on/off. The light >>will be an incandescent type operating at 120VAC and be rated at 25W. >> >>Thanks in advance. >> >> -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist