Hey,
I've had this idea knocking around in my head (I'm sure I'm not the first by a long way) about how to power 5V logic type stuff off mains voltage without burning watts in an adapter. My particular application is completely enclosed (radio controlled or something, haven't got that far yet) so isolation is not a requirement. I'm budgeting ~1mA typical draw, with bursts of 20mA.
One classic approach that I heard once was coupling AC in via a capacitor, and using two diodes to turn that into a charge pump. I think this suffers from a pretty bad power factor, but apart from that seems pretty nice. The only problem is that you basically pick the output current by choosing the capacitor, if your load varies, you have to burn off excess current in a zener or similar. So my idea was, use an optotriac to turn the mains input on and off, and have the logic monitor the input and control the optotriac accordingly. Basic schematic attached.
One obvious issue is that although it works fine once it's up and running, it'll be stuck off at initial turn-on. I could perhaps use some kind of battery backup, and design things so that that battery never runs out. Something involving depletion-mode fets perhaps. The huge capacitance of the supercap isn't really necessary, a standard eletrolytic would probably work fine with a higher frequency on the CTRL line.
But that issue aside, I'm curious to hear your thoughts on this idea. Obviously it's a fairly complex replacement for batteries, but are there simpler solutions that last for ten years (a claim I fabricate) and consume a similarly small amount of (real) power?
EDIT: After writing all this, I just realized this circuit pulls the full 5V load current (let's say 10mA) from mains, which works out at 2.4VA (similar to a wall adapter from memory), but just almost completely 90 degrees out of sync with mains voltage. How would my electricity meter report this?
EDIT 2: OK, further processing going on in my mind. Why not remove the charge pump sillyness, and just use a little transformer instead? In other words, hook up a transformer with input voltage chopped at a 5% / 10% duty cycle, f << 1 Hz. This actually sounds like a good idea to me now...