hi, the method i've used previously is the current loop/transformer method. You only need around 25mA for driving a burden resistor which can then be monitored by a pic a/d port. The trafo will be quite small, in the region of say 1cm^2 This also makes it electrically isolated. On 12/14/05, M Graff wrote: > > Tim ODriscoll wrote: > > The PIC is running off a 7805 from a wall-adapter, and is happily > > controlling the floodlight via a triac. The floodlight is running off a > > 240vAC fused spur and is rated for 500W. I have another floodlight I'd > > like to use for a second interface that is 250W, so I'd like to be able > > to create a 'generic' broken-filament detector that doesn't rely on > > there being a specific wattage of bulb. > > > > I've seen the X-10 Microchip app note where they just use a mega Ohm > > resistor to connect a PIC pin up to the mains for the zero-crossing > > detect, but I'm not sure on the safety issues of that one. > > The the pic is totally isolated from everything but A/C, that would > work. There are tricks they are doing there that, if you tie the pic to > (say) a RS-232 port on a PC, will probably cause sparks and/or smoke at > the least. > > > My other idea was a transistor with it's base connected via a suitably > > sized resistor to the 240v live just before the floodlight. The > > transistor would drive an optoisolator. I've seen something similar on > > piclist.com describing a stalled motor detector, but I've no idea if it > > would work with a lamp of variable wattage at 240vAC. > > You need to detect current flow, not just voltage, right? > > How about a very small resistance between the triac's output and the > lamp, and measure the voltage drop across it somehow? Opto-isolate that > and you'll make it safe. > > --Michael > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- -- Regards John DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist