I am considering a project whereby a lot of PICs/Arduinos/RaspberryPi(0,2,3)/others monitor various AC (120v, maybe 240v) lines and log their state. Because of the qty and low budget, I need the absolutely lowest cost and simplest way to do this, bearing in mind protection of the processor circuits. This isn't for resale, so extreme idiot-proofing isn't needed, just reasonable protection of the electronics involved. The processors may be powered by battery, switching supply type wall warts, or old fashioned transformer supplies. That may affect a solution (ie common grounding, etc). There are some neat, simple solutions for zero-crossing, but I would like a constant signal as long as the AC is detected, relative short rise and fall times (prevent uncertainty at the processor), and am flexible about delay, within a handful of cycles perhaps (however many cycles fit in a handful... ;) I would like it to be a few passives and maybe a discrete semi, but I keep making it too complex, so looking for some help in staying 'grounded' in simplicity... ;) I'm pretty sure others here have done this successfully and on the cheap and have considered all the pitfalls and refined a solution, so please share. ;) TIA, Dr Skip --=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 .