> 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. > > > One could use the PIC to generate a high frequency square wave using the PCM module. Then couple this to the AC line via a small value blocking cap and measure the injected signal level with a diode detector and the PIC's ADC. Presumably the injected high frequency voltage will differ whether the bulb is in place or not. Might need to isolate the bulb from the rest of the house wiring with an RF choke, however, as otherwise the total impedance of the wiring plus other devices will vary as loads are added, switches thrown, etc. A variant on this would be to inject a high frequency current into the line via a current transformer and measure it. Appropriate caution needed when selecting components that connect to the line, of course. Jack -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist