# Computing stuff tied to the physical world

## Capacitive power supply

In Hardware on Jan 29, 2012 at 00:01

(Thanks for your overwhelming understanding w.r.t. not making the Low-power supply available as kit!)

The concept of the transformer-less capacitive power supply still puzzles me – intuitively I still don’t get it: (the above image was copied from this excellent site with a web-calculcator for it all)

So what exactly is going on here? Tomorrow, I’ll simplify that circuit in an attempt to really get it, but for now let me show you what I see on the oscilloscope. What I did was feed a ≈ 100 Vpp signal into the above circuit, which is essentially the same as in the Low-power Supply.

To interpret the graph, you need some info:

• the scope ground was connected between the capacitor and the resistor
• the yellow trace is the voltage over the resistor
• the blue trace is the voltage over the capacitor
• the yellow trace is inverted, i.e. negative voltages at the top, positive at the bottom
• zero is the middle of the screen for both signals

Here’s the scope capture: Ignore the fact that these waves are hideously complex, ignore the red lines for now, and also note that watching voltage over a resistor is the same as watching current through that resistor. Voltage and current are always proportional in a resistor, that’s what defines a resistor (Ohm’s law: voltage = current x resistance).

So what are we seeing here?

Well… when the yellow line is high, the blue line rises sharply. When the yellow line is zero, the blue line is flat.

That makes a lot of sense: the resistor is charging the capacitor. And similarly for negative values, it’s discharging the cap (and then charging it negatively).

So ignoring the zener and the rest of the righthand side of the circuit, this is really all that’s going on: when the input voltage is highly positive, current flows in one direction, charging the cap and dropping to zero, and when the input voltage is highly negative, the whole process unfolds in the opposite direction.

One more piece of the puzzle: current is “charge per time unit” (in units: Amperes is Coulombs per second).

In other words, the capacitor accumulates the charge pushed into it, in either polarity. And while it does so, the resistor “takes the heat”, so to speak: it limits the current by creating a voltage drop over itself.

Please let this sink in, dear reader. It’s essential to get a solid intuitive grasp on what’s going on.

Note also that it really makes no difference at all how complex the input signal is. The resistor and capacitor work in tandem, sharing the task of dealing with that signal. In other words: the capacitor is always trying to catch up!

This is where it gets interesting.

You may or may not have given up in high school when it came to advanced maths / calculus – derivatives and integrals, in particular. If so, then get ready to finally get to grips with these incredible concepts.

Let me explain the red lines in the above image – they are generated by the built-in math functions of this scope. One red line is the integral of the value measured across the resistor, and the other red line is the derivative of the voltage across the capacitor. But here’s the big surprise:

• the integral of the voltage over the resistor is the same as the voltage over the capacitor!
• the derivative of the voltage over the capacitor is the same as the voltage over the resistor!

What’s the point? Well, this means that I didn’t have to measure both signals to see what’s going on. I could have omitted the blue trace, because it can be calculated from the yellow trace (and vice versa). Even though these traces have completely different shapes, they are in fact totally inter-locked and inter-related.

As I said before, the voltage over a resistor is proportional to the current through it. So the derivative of the voltage over the cap is the same as the current through it (the current flowing through the resistor and the capacitor is always the same, since they are connected in series).

The derivative is the rate of change, i.e. the slope of the graph. Integrating the current (i.e. the derivative) is like adding “all the little currents together over time. A capacitor is no more and no less than a “current integrator”.

And that’s exactly the same as saying that a capacitor accumulates charge. It’s like a tiny rechargeable battery, it takes the current pushed through it and it stores that current (as charge). As the charge accumulates, the voltage rises. Loosely speaking, this is the same as saying that it pushes back harder and harder against the incoming current. At some point it pushes back so hard, that no more current comes in. At that same point, there will be zero volts over the resistor, and the voltage over the cap stays constant. Check the graph to see where that happens.

One last observation is that the blue line is a lot smoother than the yellow line. That’s not surprising: when you integrate (accumulate) a jittery signal, things tend to smooth out. That’s why capacitors are also a fundamental component in filters, i.e. circuits which let some frequencies through more and others less. That schematic we’ve been looking at here is also known as an RC circuit – if you ignore the zener and the rest. One way to look at an RC filter is to see the capacitor as the sluggish part, and the resistor as taking up the slack. So with any input signal, the voltage over the cap is related to the low frequencies, while the resistor follows more the high frequencies.

Did this explain how a capacitive power supply works? Probably not. But first we need to get to grips with what a capacitor does, and hopefully this little experiment helped you get some intuition for what’s going on.

I’ll try to take this further tomorrow, by simplifying things a bit. Stay tuned!

1. You should really get the proper certification by now. Apart from some details you might not yet know about, you’ll probably pass with flying colors. ;-) Some very cheap KAKU-alike units also use this type of power-supply, but they didn’t pass the KEMA-tests so they are not used as often as they could.

However, I think this technology might make all homes smarter one day, but it’s very hard to get products to the consumer level. It is also not easy to mass produce this circuit, because it cannot be easily fitted into an SMD design. If something goes wrong, you can create a miniature version of Arc-Attack’s show. ;-)

• If JC wasn’t in Europe it wouldn’t be such a problem. He could sell what he wanted, and it would be down to the person importing it into Europe to decide if they want to use it or not.

So maybe he could emigrate somewhere? :-D

• He could sell what he wanted

Which goes to show how broken the system really is.

I don’t intend to emigrate, BTW – been there, done that :)

• I hear Switzerland is nice ;-)

2. Looks quite straightforward to me:

– R1 limits zener diode (D1) current

– R1,D1,D2,C2 is “linear” power supply

C1 represents resistance for AC current so you can calculate equivalent impedance: Zc1 = 1 / (jwC) + Resr

j is imaginary unit, Resr is equivalent series resistance (should be low (0.01 … 0.1) and we can ignore it) and w is 2 * pi * f

Zc1 = 1 / (j * 2 * pi * 50 * 0.47e-6) = -j * 6k7

-j represents phase shift between I and U. You can say that .47uF behaves like 6k7 resistor for AC current. Voltage drop across C1 would be U = Zc1 * I = 6k7 * 10mA = 67V.

You can replace C1 by 6k7 resistor but heat dissipation will be .67W (10mA^2 * 6k7) instead of 100uW (I^2 * Resr = 10mA^2 * 0.1)

3. Thanks for that jcw, looking forward to tomorrows post.

4. Hmm, the supply is ~150V peak to peak, call that 53Vrms. Icap is ~10mA, so Vcap is ~67V ?? Something doesn’t add up in that analysis.

``````Beware of non-sinusoidal waveforms....
``````

• Good catch – more like 200 Vpp probably. I eyeballed it using the wrong scale on the scope.

5. Hmm – the plot thickens. 5.1v zener? The scope scrape Y-axis asymmetry would suggest ~12v.

• I used a 12V zener, so your assessment is right. The circuit was taken as quick example only.

6. Just looking at the circuit, as Ondrej said, the reactance of the 0.47μF capacitor has to be taken into account. It’s also probably good to look at this circuit in two parts, the positive part of the cycle and negative, ie with L positive wrt to N and vice versa.

In the positive part the current will flow through the C1 and R1 and be clamped to 5.1V, wrt N by D1. You should therefore see a DC voltage across C2 of approximately 5.1V – a diode drop say 0.7V, +4.4V wrt to N. The magnitude of the current with no load should be 31mA. Calculated from (230VAC rms – 5.1V)/(6.7×103 + 470).

During the negative part of the cycle current will flow through D1, R1 and C1 in that order. The magnitude of this current should be approximately 32mA. Calculated from (230VAC rms – 0.7V)/(6.7×103 + 470).

The circuit is a very simple half wave rectifier. Using only one diode D2.

There is a wide tolerance on the line voltage nominally being 230VAC rms but it can be +10% and -15%.

BTW You have made a wise decision with regards the kit, if it is the case that N (which is normally at approximately 0VAC) is make so that Direct Contact is possible and if there is a fault house wiring at some stage it could rise up to a lethal potential and or impede the correct operation of your RCD.

7. Correction, forget the ‘it could rise up to a lethal potential’ but it could if shorted to your house electrical supply earth, impede the correct operation of your RCD.

• In the Netherlands (and Germany) even 3-pole mains plugs are not polarized, so it’s even worse than that: no way to tell whether N is neutral or not – 50% chance to hit the jackpot.

8. wow! you are indeed a scary man martynj.

• Don’t worry, I think he’s on our side ;-)

• And he will probably stay on our side for as long as we have cookies!

• What cookies? munch munch munch

Ooops.

9. Oops – sorry. Didn’t want to sound harsh, but the broken Euro regulatory system is I guess a pet topic of mine.

Cookies & hopje gratefully received – the sugar and caffeine will help my mood ;-)

Comments are closed.