# Prevent excess current through Zener regulator when system load is switched off

I use a hub-generator powered LED lighting system in my bicycle, made by myself using rectifier, capacitor, and Zener. It's working very well for many years, the Zener does not get hot, and the high-speed voltage is very stable:

simulate this circuit – Schematic created using CircuitLab

Now I want to modify the system, by introducing the possibility to turn the system load off. My first idea was to add a switch before system load, but preliminary tests show that if I disconnect the load and spin the generator, an excess current flows through the zener, as expected, and it gets very hot very fast.

I suppose that, with an always-on system load, there is no excess current through the zener, since the power from the generator (not much more than 3W / 0.5A) is well balanced with the load), and I can use the Zener as a current sink (that's why I chose a 5W zener in the first place).

But with a load that can be switched off, I think I should redesign the circuit in a way that the zener acts as a reference, and another type of "turn off switching" occurs.

I imagine there could be some configuration using perhaps a mosfet, but my knowledge is not enough to devise a safe, energy-efficient and effective configuration.

My goal is to have a simple-but-effective circuit that powers the system load, when present, with a clamped voltage, while preventing excessive, shunted current flow if the system load is switched off.

Some important considerations:

1. It is not enough to move the switch to the hub output, since my goal is, quite soon, to add a battery and a micro-controller to the system, in a way that no actual, physical switch will be present - I want the system to be "smart", in an "always on" sense, and this would be an initial step towards a DIY, poor-man's power-path management;
2. I'm not sure about this, but I think a 7806 regulator is not a good fit, since I don't have enough voltage drop (RMS voltage under load is quite close do 6V). Correct me if I'm wrong;
3. The hub generates relatively large voltage spikes when running without load (more than 5V), and the capacitor I am using (6800 uF) is rated at 16V. So of course any solution should prevent the large voltage spikes to raise the capacitor voltage above its limit.

UPDATE (in response to Peufeu's answer):

Your hub is a current source;

Your description fits perfectly with the manufacturer's, a lot of tests I have already seen online made by other technically-oriented bicyclists, and with my own experience as a bike and DIY electronics enthusiast. The voltages and waveforms vary a lot as a function of speed and load, but the current has a characteristic plateau around 500mA.

You want to use the dynamo to charge a battery or power a load, but when the battery is fully charged (or the load is off) then what to do?

Then I would like the rest of the circuit to behave as it was open, or with a high resistance/impedance, so that no significant current is drawn from the hub.

(...) you can safely short it. (...) it won't waste your muscle power.

Now this contradicts my practical experience. I happen to have wheel in a test stand beside my desk right now. If I spin it connected to some circuit, I can see the wheel decelerating. If I spin it without load, it runs much longer, almost as if it wasn't a generator hub at all. But if I spin it short-circuited, the deceleration is very pronounced, so I prefer not to consider this option.

it can actually output scary voltages open circuit (...) which will destroy any (...) kind of series regulator, LDO, switching regulator, etc.

I agree, and irrespective of any other solution I eventually adopt, I will always put some 5W zener in the circuit to shunt these voltage spikes. I suppose, though, that by then I could choose a larger value (16V or 25V, depending on the capacitor rating, seems to be fine) just "for the emergency".

The idea is to add a comparator (...) Make sure you add lots of hysteresis in the comparator.

That's what I want to do: use a voltage comparator to somehow detect "states" in my system, and switch the proper power paths on and off. I only would prefer to leave the hub circuit open when no load is present, instead of short-circuit.

• What kind of hub is it? Can you give a link to the hub? – Henry Crun Jun 26 '18 at 21:46
• @HenryCrun It is a Schmidt SON 28. – heltonbiker Jun 26 '18 at 22:02

The simplest fix for an off switch is between the bridge and the capacitor.

Now depending upon your load at 6 V ? The LDO will be very inefficient.

Better is an efficient converter (buck SMPS) that sees a rising voltage input with speed, which can be converted to constant power output to minimize drag on peddle power. These cards are cheap on the web.

Search for “OKI 3 terminal regulators”

• Thanks for your input! I think a more appropriate way to describe my need would be "I plan to make the system load variable". I plan to do it using a micro-controller, that might at any moment decrease the overall power consumption, then increase again, etc. But I don't want the regulation to be based on (software running in) the microcontroller itself. – heltonbiker Jun 21 '18 at 22:57
• Again a SMPS card is best with variable output power, either or both V and current limit – Tony Stewart Sunnyskyguy EE75 Jun 21 '18 at 22:58
• A bike generator has a large potential huge voltage range, as the operational speed varies 7:1 (i.e. my bike speedo shows max of 73km/h, min speed-10kmh). Many of the little smps modules could be expected to fail unless some protection arrangement is used. – Henry Crun Jun 21 '18 at 23:19
• A bike generator has a large potential huge voltage range, as the operational speed varies 7:1 (i.e. my bike speedo shows max of 73km/h, min speed-10kmh). From this graph, the open circuit voltage will be 120V@73km/h. Many of the little smps modules could be expected to fail unless some protection arrangement is used. – Henry Crun Jun 22 '18 at 6:41
• @HenryCrun I am planning to put a 5W Zener to prevent voltages higher than the input capacitor of the buck converter, which I already ordered after a lot of consideration. – heltonbiker Jun 26 '18 at 22:06

The system you have would appear to have one theoretical drawback: At high speed the zener conducts much more power than the load uses, and so slows the bike down.

However, if you are happy with how it has worked, then this is not a problem that needs fixing. You could simply fix the problem of overheating with a bigger zener that can take the heat. As big zeners are not readily available now, just use a transistor e.g.

simulate this circuit – Schematic created using CircuitLab

• simplicity
• clamps the voltage, so can't get overvoltage

A linear regulator is another option. You might want 2 things that conflict a bit: Low dropout voltage and high max operating voltage.

This is a crude discrete regulator. By using a 60V or 100V fet and BC546's, this regulator can stand 60 or 80V. You will notice that it regulates in the negative lead - you can have your regulator work in either side, but fets are better with N fets in the negative rail.

simulate this circuit

A possible very simple approach based on @peufeus answer is this:

simulate this circuit In this case the SCR provides inherent hysteresis, eliminating any complex IC comparator arrangements.

I am not totally sure if there is some kind of invalid operation that can happen with sub-threshold gate condition on scr/triacs. Someone with a more scr experience might comment.

• Thanks for your input! Actually I am not quite satisfied with the idea of "throwing energy away" like that, even if all the electrical parts are safe. So I keep looking for a way to avoid this approach. – heltonbiker Jun 21 '18 at 22:54
• Ah you want the microsoft/google solution: replace something that works with something much more complicated until it is unreliable. – Henry Crun Jun 21 '18 at 22:56
• I couldn't deny the truth of your comment (going complicated for the sake of it). But the fact is: I got enough of my crude "direct drive" bike lighting setup, and feel the lack of more features. This, and the desire to learn more about electronics. – heltonbiker Jun 21 '18 at 22:59
• Look at my answer -- dynamo hubs are a bit subtle. – bobflux Jun 21 '18 at 23:46
• @peufeu I expected they might be like that. See my new suggestion for a simple arrangement to implement your shunt switch regulator. – Henry Crun Jun 22 '18 at 2:11

I actually put a bicycle dynamo hub on the test bench a few years ago.

You can model a hub dynamo as an AC current source of about 500mA with a maximum output voltage that is proportional to speed. The "current source" effect is due to frequency being proportional to rpm (and voltage) and the very high inductance. When the wheel spins faster, open circuit voltage increases, but frequency increases, which means the impedance due to the huge internal inductance also increases, and this increase in impedance means the short-circuit current is always about the same, roughly 500mA, at all rpms.

A hub dynamo works at low rpms, so it has lots of turns. The inductance is enormous. It is actually designed to work like this, because its original purpose is to power an incandescent 6V 3W bulb, and make it light at low speeds, but not burn it at high speeds. So the high inductance, and the current source behavior, are all intended.

A current source generator is a natural match for a shunt regulator, like a zener.

However... what you should have done is get rid of your zener, and replace it with LEDs. Why waste valuable power as heat in a zener when you can turn it into useful light instead? I built a simple light for a friend, which looks just like your schematic, except the zener is replaced with 2 white LEDs which can handle 500mA and a few ohms resistor in series. It works nicely. LEDs are diodes, so they make decent shunt regulators (we arent looking for precision on voltage here, just some way to limit it).

Now, your actual question. You want to use the dynamo to charge a battery or power a load, but when the battery is fully charged (or the load is off) then what to do? The answer is simple, but very counter-intuitive: either disconnect the generator when you don't need it, or short-circuit it. The latter is actually the best option if you want to control it with a microcontroller.

Since your hub "dynamo" (actually it is an alternator) behaves as a current source, you can safely short it. It will dissipate RI^2 power inside the hub, with I=500mA and R about 0.5-2 ohm depending on your dynamo (you can measure it with a multimeter). This is a tiny amount of power. It won't overheat, and it won't waste your muscle power. This is a much better option than dissipating heat in a zener (or other shunt regulator) when the energy you dissipate comes from your legs!

If you go downhill fast, it can actually output scary voltages open circuit (like 80 volts if you are insane wrt speed... dont ask how I know...) which will destroy any circuit designed by someone who has no idea how a hub dynamo works. This includes any kind of series regulator, LDO, switching regulator, etc. I expect people will suggest them in answers, but they will not work. Your dynamo is a current source. If you ride fast, and the circuit does not use all the current provided by the dynamo, then the voltage will rise. When the input voltage rises, a switching regulator responds by lowering the input current (because it is efficient). This cause the input voltage to rise even more, until a problem occurs. When the generator is a current source, its natural match is a shunt regulator... but we can use a smart shunt regulator.

Therefore, a low-tech solution to your problem is:

simulate this circuit – Schematic created using CircuitLab

Connect the dynamo to a rectifier.

Then, a FET can short the output of the rectifier. Select a logic level FET if you want to control it from a micro.

Another diode prevents the capacitor from discharging when the FET is conducting.

On the right, a capacitor (or battery) receives the dynamo current.

The idea is to add a comparator (not shown on schematic) to control the FET. When voltage is too high on the cap (or battery) then turn the FET ON. Dynamo is now shorted through the rectifier bridge, wastes very little power, and it stops charging the cap, preventing overvoltage.

When voltage on the cap is too low (because load is consuming current), or battery needs charging, the comparator turns the FET OFF. Then the dynamo, acting as a current source, charges the capacitor (or battery) through the bridge and additional diode.

Make sure you add lots of hysteresis in the comparator, so the FET switches as a very low frequency (a few hertz or lower) because drawing power from the dynamo results in mechanical torque, and torque which is switched on and off is vibration, and you don't want vibrating handlebars. Switching every half second works very well. You can also do this with a micro.

EDIT:

I dug into these old files...

Inductance = about 150mH which is huge. It is not constant, as it depends on the rotor angle. It's a claw pole alternator, so the length of the air gap in the magnetic circuit depends on the distance between the pole pieces which varies during the turn. So expect inductance to be all over the place, but always high.

Internal wire resistance = 2 ohms

Frequency = 3.7 Hz per km/h, so at 20km/h you get: 20*3.7 = 74 Hz

Peak volts into a diode bridge and cap without load: about 1.1 V per km/h, so 22V at 20kMh

...and at 20km/h the reactive impedance of the internal inductance is $2 \pi f L$ or almost 70 ohms...

It is not obvious to calculate the AC RMS from the peak voltage on the cap since the waveform is not even remotely a sine, plus its shape depends on rpm and what is used as load... but you get the idea, huge inductance * rpm = impedance increases with speed which creates a kinda current source which is safe to short.

Now I had actually worried about the same thing as Immibis so back in the day I had run this test below. The wheel is spun up with a drill, then the drill is removed and the speed is plotted as the wheel slows down due to air drag and various resistive loads (values in ohms shown top right corner). The two cases "10 kOhm" and "1 ohm" are almost identical at speeds that matter. Shorting it does create a little bit more drag at low speeds, but if you compare it to other resistive loads like 20-40 ohms which burn a lot more power from a current source than the 1R load you will see that the wheel stops a lot faster with these loads.

This is just a frequency vs time plot done with a soundcard and a python script btw (except hertz is scaled to km/h). You can use a similar method to do the same test on your hub.

Besides, keeping it shorted instead of open when not in use will prevent your connector from electrolyzing if rain falls on it, which is definitely a plus...

EDIT...

Now this contradicts my practical experience. I happen to have wheel in a test stand beside my desk right now. If I spin it connected to some circuit, I can see the wheel decelerating. If I spin it without load, it runs much longer, almost as if it wasn't a generator hub at all. But if I spin it short-circuited, the deceleration is very pronounced, so I prefer not to consider this option.

Now that's weird, since I got the opposite results with a shimano dynohub, maybe yours is different? If it's a SON, I never had one, so I can't say.

Note that the time it takes to completely stop the wheel isn't a good measure of drag, that's why I'm using the time from 30k to 10k instead. This is because when the wheel spins slowly, its angular momentum is only a tiny bit of energy, so a tiny bit of drag like a half watt is enough to make a big difference in how long it takes for it to stop... and this kind of drag is completely negligible on a real bike.

Now if you want to leave it open instead of shorted when the load is off (or the battery is charged) then you'll need another type of circuit, but first make sure the drag when shorted is really a problem, and also determine peak voltage at the max speed you'll ever use in order to choose the correct rating for parts.

• Hi! I have no words to thank your kind and thorough answer. It's always a huge pleasure to find someone who saw it too!. I updated my question with considerations about some of your topics. Thank you very much already! – heltonbiker Jun 22 '18 at 2:26
• How do you prevent the shorted dynamo from stopping the bike (as specified in the question)? – user253751 Jun 22 '18 at 4:25
• @immibus What PF is saying is that the leakage inductance of the generator is very high - it is not a tightly coupled transformer. This results in constant current. If R.dc+R.loss is very low, then a short circuit on puts an imaginary reactive load on the generator. Real power is negligible, and so mechanical load will be negligible. How true this is depends on the actual values of the generator. – Henry Crun Jun 22 '18 at 6:37
• @heltonbiker thanks ;) I've added a bit more stuff – bobflux Jun 22 '18 at 12:56
• @immibis see my edited answer, the inductance is huge so when you short it, it limits the current (it acts like a current source) so the real power loss is very small as Henry says – bobflux Jun 22 '18 at 12:57