ElCaron:
Would his cuircuit even work? There is a lot of current going over those Zeners, so I guess they are not really 5.1V in his application.
Hello there,
With the bridge shorted and 60Hz line frequency, i calculate about 45ma RMS.
There are some problems with this circuit though. That is, the big filter cap is directly in parallel to the zener(s). What that means is that once the cap charges up to the zener voltage, as the instantaneous line voltages changes the voltage will drop below the zener voltage for some time.
A better approach is to put the cap first, followed by another current limiting resistor, followed by the zener(s). That gives the zener(s) some overhead voltage to work with so even if the instantaneous line voltages changes the zener will draw energy from the cap through this new resistor and thus maintain regulation. Well, as good as you get with a zener ![]()
I'd use a regulator chip of some kind myself if i was going to go through all the trouble to build this thing.
Unfortunately, we still have the line isolation issue. 120vac rms available on nearly all the circuit connections. That's not good from a hobby perspective.
I've been doing this stuff for over 40 years and even i would not do that unless it was going to be built into some commercial equipment or i was going to incorporate it into a box that can not be accessed inside. In other words, only in a professional or semi-professional project.
Not only that, i hate to see what would happen if he plugged the USB connector from the computer into the Arduino when it was being powered by the line. That's like connecting one side of the line right to the computer port, ground or +5v line or something. Not a good idea at all ![]()
As i was saying before too, there are numerous safety issues that have to be addressed. Another important one is the failure mode analysis of the components, in particular the series capacitor, 1uf. Caps sometimes fail short, and that means a huge surge current at that point and unless two fo the diodes blow open we'll see a larger current for a significant time period which can easily overheat the two 56 ohm resistors and cause a fire or melt something. That means that an important ingredient is still missing: the fuse. A special low value type would be good.
If we want to get picky, another thing missing is the high value discharge resistor that should go across the cap. If the unit is unplugged when the cap is fully charged, the voltage would be nearly 170v. That means that 170v becomes available at the two AC plug prongs for a time period that only depends on the self discharge of the cap if there is no high value discharge resistor. To test for this, unplug and then short the two AC prongs and watch a small LED on the output light up for a second ![]()