Standlight and Martin's Circuit 12 help please!

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
Yeah, going fast is the easy bit! I did think about using a microcontroller, using a voltage divider to sense the voltage and therefore the speed. Could use a FET to turn on the extrab LEDs couldn't I? With a IC out could get real geeky and have it adjustable too!


This is great, thanks Steve. I won't be building this immediately, just want to do as much research as possible first. And I should be studying for my aircraft engineer degree, not tinkering in my workshop!

a microcontroller would make some of the control easier. Measuring the dynamo's speed would let you use knowledge of the dynamo's characteristics to match the load.

I matched my load by adjusting the number of LEDs hooked in series. I just shorted out half of the LEDs at low speeds, just to keep things simple. A more sophisticated technique would be to have the dynamo feed a buck converter, which then drives a single big LED like an XM-L. The microcontroller would measure the dynamo's speed and set the buck converter's duty cycle. Piece of cake. :)
I haven't worked with micro's for over 15 years, and that was with Motorola's 6811 family. A little PIC or Atmel seem like a good match for this sort of work.

A more general approach would be to use "maximum power point" or "peak power tracking" method that involves making small changes to the desired output power of the buck converter and seeing if the actual power to the load increased or decreased. When I designed a circuit for this purpose, I actually monitored the input power ripple while adding a small "dither" to the control voltage to the buck converter, and the control loop tried to minimize the ripple.

Is "aircraft engineer" similar to an aerospace engineering degree here in the US? Aerospace and/or aviation is a very interesting field of work. I spent a number of years doing electronics design for aircraft and satellites... lots of fun, but funding was very volatile.
 

Edocaster

Newly Enlightened
Joined
Mar 27, 2014
Messages
51
Yeah, I was a bit concerned about the Li Ion charging. I'll need to have another look at it.
This is almost exactly what I'm after. Using the batteries as a buffer.
I've come to realise, super caps or batteries, I'm still going to have to manage the standlight either manually or with a microprocessor. Nothing an arduino can't handle.
So like Steve mentioned above, I could use a driver to light up the powered by the batteries, with the dynamo charging the batteries.
It will be a little while before I get round to building this. Supposed to be studying, and I have another project involving servos, an arduino and the compression settings on my bike!

If you're using the forumslader circuit, and run the light off/parallel to the li-ion battery, you may not have to worry about the standlight at all. Your light will run off the battery, so when you stop, the light will just continue running at the same brightness. The only thing that will happen is that the dynamo won't be charging the battery then. No need to manage the standlight!

All you need is to make sure the battery gets charged up more than it gets used up, on average.

If you choose a driver with lots of configurations for drive current, you should be able to pick drive levels which are both above and below the average charging rate of the dynamo to li-ion part of the circuit, enabling you to control how much light you need vs how much the dynamo will recharge the battery. For example, a possibly good match would be a b3flex - I've never used it, but on paper it will accept a maximum input of 25V (which should be OK as it'll be behind the 12V regulator in the circuit), and is configurable upto 3A, but also down to very low levels.

So, if we take a 3 li-ion circuit with the 12V regulator boosted by a diode to a 12.6V output, you could set up three or four power levels, to drive, say, 2 XMLs. Once you know roughly how fast you can recharge the li-ions in voltage doubler and full-wave rectifier modes, you can optimise your choice:
- One: maximum power. Maybe not 3A, but something which you know the battery recharging can't keep up with. Use as a boost mode. Can help burn off power when the battery is full.
- Two: enough for full-wave rectifier to keep up. Let's say in FWR mode almost 0.5A goes to the li-ions. Accounting for some loss and the fact that you will frequently not be moving fast enough to attain optimum charge, 750mA may work for the 2 LEDs in series.
- Three: enough for voltage doubler to keep up. Assuming in VD mode almost 0.25A goes to the li-ions, 500mA may work for the 2 LEDs in series. You might have to go lower (I understand the b3flex uses PWM dimming at this point)
- Four: a super-low, get-you-home mode.

(In fact, the exact figures for Two and Three aren't that important, as you'll be adjusting the VD/FWR switch (or having it done automatically if you make an autoswitcher) based on your speed and charging management choices, not how much light you need at a given moment.)

(...if you use a 4x-li-ion circuit, you can adjust the figures for more current, but it will need more speed...)

It sounds complicated, but I understand the forumslader circuit comes with indicator lights to tell you when the battery is full and when it's going flat, so you just adjust your light level choices accordingly.
 

piesoup

Newly Enlightened
Joined
Oct 31, 2008
Messages
114
Location
East Anglia
16206244118_31bf1a94a8_c.jpg




Hi Steve, I have looked into the MPPT, again this requires mt to buy hundreds of components when I will only end up using a few. So annoying! I think I am going to try and keep it simple and use an arduino coded to behave kinda like a MPPT. It will sense the frequency, then switch in the extra leds when needed. I hope to use FETs, or something similar to do the switching. A B C and D as listed in my diagram.
A controls when the battery powered light is on. Arduino will also set the brightness by communicating with pin 3 of the atmel on the driver
B & C B is ON C is OFF and vise versa. These will control wether the battery circuit or the dyno light circuit get the power from the hub. Maybe in a slow speed situation when the dyno isnt producing enough juice.
D adds in extra LEDs when at a high enough speed.

The driver is still TBC, but only driving one LED, not two.
Also, I would like to have no more than 4 leds, dont want the light becoming huge. Maybe switching out the battery driven ones and use them as the high speed dyno driven ones. Wiring is going to become hectic!

I found a thread where you posed about not using a buck driver directly from the rectifier. Is it still not recommended?
http://lists.topica.com/lists/bikecurrent/read/message.html?mid=814052463&sort=a&start=13316


Ignore the XML in the corner, I haven't yet decided on what LEDs to use yet!

Edo, I'd love to build the forumslader circuit but I'd end up spending a fortune on loads of compenents I'll probably never use. I'd still need to buy most of the parts in the diagram above anyway. I'll make a simple circuit for the dyno light as it will be controlled by the arduino. I've seen you can buy the forumslader circuit but its about £100!

I'd still need to make sure I dont completely drain the battery light, as it will take ages to charge the next day. especially as I'll be charging the gps and phone too. But a 5Ah 1S running a light at 2A for a few mins here and there will last for AGES anyway!

So now I have to;
Find a simple dyno to LED circuit. Most probably end up on your Flickr page Steve!
Get the appropriate FETs to switch in the circuits
Decide on a driver, Lflex I think
And program the Arduino.

I will most definitely update this as I hope to help others. Wouldn't it be great if all that could end up on one PCB!

Oh, I am an aircraft maintenance engineer. I am studying to transfer my military quals to civilian ones. Much more money than being an aerospace engineer, but I doubt its as fun! Contract funding is just as volatile here too!
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
this seems like a reasonable starting point.

Has it only been 2011 when I was still doing anything with BikeCurrent? Seems like longer...
My advice was more "be careful when using a buck with a dynamo" than "don't do it". You do need to run the numbers to see what can happen, though. It's really only an issue at high speeds. With a small electrical load, I've seen 100V out of my Schmidt dynamo when going down a 14% hill that is part of my commute. Even with a 3 watt load, you might need a buck regulator that was rated for input voltages up to 60V or so.

One of my goals is to play around with a buck converter like this using circuit simulation. There are more buck converter IC's designed for inputs around 75V or so, so it would be easier to build one of these than it used to be.
 

piesoup

Newly Enlightened
Joined
Oct 31, 2008
Messages
114
Location
East Anglia
Yeah, those high voltages have me worried! Please excuse my ignorance, but when the Zener in parallel with the dyno starts conducting, to protect the circuit, does is become a dead short across the dyno. Or does it only drop the extra voltage. Say its a 50v Zener, and the dyno is producing 60v, does it just convert the extra 10v to heat? Or does the protected side of the circuit just shut down? I cant see this being a problem when I'm on my mountain bike, but I will eventually have a set up on my road bike too.
I have been looking into buck drivers but all the ones with a higher max Vin, also have a high Vmin. Surely this will be a problem at lower speeds when the driver will be out of regulation?

I want to go ahead and build a circuit and use the arduino to turn on and off the standlight when needed. With your circuit, as I wont be using the standlight part, can i just remove the sub circuit in parallel with D8?
Also, what is the purpose or U1. I've read up on monostable multivibrators but I am still none the wiser!
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
a 50v zener will start to conduct a tiny amount when the voltage is just below 50v, and it will conduct more as the voltage increases. You might want to look at the wiki page:
http://en.wikipedia.org/wiki/Zener_diode

for the questions about a particular circuit, can you provide the link to the specific schematic?

edit: I was looking through my physical copy of the Motorola TVS/Zener databook, DL150. It has some great application note and tutorials at the back, including one on zener diode theory. Motorola split into a bunch of sub-corporations since it was published, and OnSemi was the group that handles all of the discrete semiconductors. Well, I wasn't able to find the stuff on the OnSemi website, despite using terms like "zener diode theory".

Fortunately, the wiki page on zener has a reference at the very bottom with a link to a handbook on zeners on the OnSemi site. It has the sections on zener diode theory, which is a great way to be introduced to the details of zeners. Download and save this handbook in your big folder of technical references:
http://www.onsemi.com/pub_link/Collateral/HBD854-D.PDF
 
Last edited:

Edocaster

Newly Enlightened
Joined
Mar 27, 2014
Messages
51
A zener should effectively clamp the voltage, but at high bike dynamo voltages the power dissipation can be unmanageable.

It might not be passing 0.5A, but if the current rises above anything trivial, the zener will probably fry.

Overvoltage protection is usually a problem for USB chargers though, or anything which may not always present a full load. In lights, most manufacturers don't provide multiple modes, and simply have 'full on'. Hence, if they present a full load the overvoltage protection may never be invoked. In that case, a Dirty Great Zener as the final protection may be justifiable. But if it burns out, it may fail short circuit = no lights.

There are other solutions to keep the voltage down - e.g. http://www.google.co.uk/patents/US6788030
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
A zener should effectively clamp the voltage, but at high bike dynamo voltages the power dissipation can be unmanageable.

It might not be passing 0.5A, but if the current rises above anything trivial, the zener will probably fry.

You can always design a shunt regulator to handle high power, but there's no point in generating a lot of power just to turn it into heat.

My choice has been either to clamp the voltage to something low, or clamp it at a very high voltage so that the power dissipation is still low (I think it was 90v, when I built a high voltage pwm circuit to charge a battery)
 

piesoup

Newly Enlightened
Joined
Oct 31, 2008
Messages
114
Location
East Anglia
Thanks for the info on the zeners, I'll have a thermal switch on the zener, but that will cut all power. I'll strap a fluke to my bike and see what the voltage gets too when on different loads.

Steve, here is your circuit I want to use on my road bike, if that's ok?!
As I won't need the battery part, can I just not use the circuit that manages the battery? The part in parallel with D8.

7483782976_bfdfeb28ee_c.jpg



Here is the circuit I'm going to use for the mtn bike. Found a supplier that does individual components, yeah!

I know its not your one, but see my diagram above, can I place a FET or arduino controlled switch where the red mark is, to disconnect the entire circuit, but retain the function of the rectifier circuit? Or should I just switch the AC line from the Dynamo and have another rectifier for the 5v circuits? I'd like the first option, but can live with the second!

Sorry if these questions sound dumb, but I like to research everything before starting on the hardware. And you guys have a great way of explaining things. Cheers!

EDIT: Just realised the red mark is probably not the place to fit the FET, I need to look where the LEDs are powered.
16242301900_d0c1c9b0f8_c.jpg
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
....

Steve, here is your circuit I want to use on my road bike, if that's ok?!
As I won't need the battery part, can I just not use the circuit that manages the battery? The part in parallel with D8.

(see https://farm9.staticflickr.com/8027/7483782976_bfdfeb28ee_c.jpg no point inserting it again....)

The battery charging is controlled by the LM40401 and the PZTA42. U2, the Zetex boost circuit, is the portion of the standlight that drives the LED. It can be deleted without any problem. It is a nice circuit, though. :)

Here is the circuit I'm going to use for the mtn bike. Found a supplier that does individual components, yeah!

I know its not your one, but see my diagram above, can I place a FET or arduino controlled switch where the red mark is, to disconnect the entire circuit, but retain the function of the rectifier circuit? Or should I just switch the AC line from the Dynamo and have another rectifier for the 5v circuits? I'd like the first option, but can live with the second!

Most of Martin's circuit is about automatic switching of the voltage doubling circuit, isn't it? Almost all, I think.
Are you suggesting disconnecting the LEDs and only having the 5v regulator connected? That'll work, as long as you don't expose the regulator to excessive voltage.

Did I ever mention that one of my early bike headlights used the dynamo to charge a battery pack, and then there was a regulator to take charge from the battery and deliver a constant power to an incandescent headlight? I'm wondering if you wouldn't be better served by that sort of arrangement. My circuit was pretty simple... just a pwm scheme. The only downside was that it kept the headlight powered continuously, when it should have switched to a low power mode when stopped. It was hard to do low power with an incandescent.

anyway... you'll have to sketch up your idea. Or maybe start breadboarding parts of it and see how it does?? There's nothing like actually building a circuit to find out why things don't work the way that you thought they would. :)
 

piesoup

Newly Enlightened
Joined
Oct 31, 2008
Messages
114
Location
East Anglia
Hi mbanzi, not yet! But I'm back at my old job, which encourages tinkering so I will be building this. Looking to use a stepper motor as the generator instead of a dynamo hub. The stepper I have puts out 7w!!
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
Hi mbanzi, not yet! But I'm back at my old job, which encourages tinkering so I will be building this. Looking to use a stepper motor as the generator instead of a dynamo hub. The stepper I have puts out 7w!!

Can you elaborate on the use of a stepper motor as a generator/dynamo?

My familiarity with steppers is limited... aren't they usually set up with magnets on the rotor, and a bunch of windings on the stator? Do you just full-wave rectify the windings and wire them in parallel?
Maybe I should just do a web search....
hmmm... there's a lot of stuff out there.

Here's one site that does draw out the winding arrangement for some different stepper motors, and it does show that a separate bridge rectifier is used with each winding.
http://tomsinstitute.com/html/stepper_generator.html

I also found a hackaday video that mentions using a stepper as a bike dynamo. It's definitely a hack and not a substitute for a hub dynamo, but you could probably do a decent job with it. It doesn't address how well suited the stepper motor is for the use. i.e. can the bearings survive the side loads that it will see? Is it going to survive the dirt and rain/water that it will be exposed to?
If this is going to be a project just for fun, then I suppose you can't go wrong. :)
 

piesoup

Newly Enlightened
Joined
Oct 31, 2008
Messages
114
Location
East Anglia
Hi Steve,

We've probably read the same info on the steppers! You're right, it is going to be a hack job, nowhere near as good as a proper Dynamo.

I've got a few smallish ones and one bigger one. The big one is rated at 2.4v 1.5A and 1.8 degree per step.
The smaller ones have a 3.2v and 1.2A rating but don't produce nearly enough power, so I'll stick with the bigger one.
I've only measured the raw AC through an XML. At 1040 rpm it's kicking out 944mA and 6.9v! Going to find some big resistors at work and see what they give. Any suggestions on what the normal load on a dynamo is? Still 12ohms like the old days?

As I haven't rectified the two phases I'm not sure this is normal behaviour. Below about 400 rpm, if both coils are connected to the XML, the voltage and current sags and its noisey. Above 400, there is a noticeable increase in power when the second coil is connected.

I'll add pics tomorrow at work showing how I tested it.

I would want want to support the shaft on its own bearing to help protect the stepper's bearing. If it even has one! And I'll need to protect it against the weather somehow..

Anyway, back to the circuit designing, I'll start a new thread about this stepper once I get a rectifying circuit.
Any other testing I can do Steve, just ask!
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
The standard incandescent headlight was 12 ohms.

So 1040 rpm is the sweet spot... have you decided how big the roller needs to be in order hit this speed at typical bike velocities?
 

piesoup

Newly Enlightened
Joined
Oct 31, 2008
Messages
114
Location
East Anglia
Untitled by Andrew Fraser, on Flickr
This was an old XR-E led, running at a scary 1400rpm




Untitled by Andrew Fraser, on Flickr
Just a pic showing one of the coils disconnected.

Untitled by Andrew Fraser, on Flickr
This is an XM-L, even if I turn up the speed it doesn't draw much more power than this. Maybe its resistance is less, I'm not sure.

Yes the sweet spot does seem to be around 1000rpm. However, on a 700c 28 wheel and an 80mm wheel on the servo, that's only ~16kph! I think I need to find a way to run it slower.
The other smaller steppers may be better suited, even though they put out less juice.
Like the one below at 1200rpm...
Untitled by Andrew Fraser, on Flickr
 
Last edited:

piesoup

Newly Enlightened
Joined
Oct 31, 2008
Messages
114
Location
East Anglia
(see https://farm9.staticflickr.com/8027/7483782976_bfdfeb28ee_c.jpg no point inserting it again....)


Did I ever mention that one of my early bike headlights used the dynamo to charge a battery pack, and then there was a regulator to take charge from the battery and deliver a constant power to an incandescent headlight? I'm wondering if you wouldn't be better served by that sort of arrangement. My circuit was pretty simple... just a pwm scheme. The only downside was that it kept the headlight powered continuously, when it should have switched to a low power mode when stopped. It was hard to do low power with an incandescent.

I can't believe I have only remembered this now! Is that one of your circuits in your Flickr? That seems worth a look.
That's the idea I have come round to. Dynamo charges a battery, battery then powers a light and or charges Garmin / phone. The dynamo can power the light directly too if needed. I am trying to find that individual component supplier I found ages ago and pull my finger out and build this.
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
the circuit that you refer to is one of my more modern designs with a modest standlight and battery. The design that charged a large-ish battery, and then used the battery to power the light was much earlier. The schematics were done in a software package that is obsolete and I don't have many (any?) copies in a format that I can open up.

I did find a pdf of the circuit that charged the battery. I'll attach it when I can.
The charger just connected the rectified dynamo power to the battery until it charged up to the desired voltage, and then disconnected the battery. Very basic, although I ended up making it a pwm sort of design. If I were to do it again, I'd use a buck converter in order to extract more power from the dynamo.

The downside of sticking the battery between the dynamo and LED(s) is that there are losses when converting the power back and forth, and it's not as if there is much power to spare. That was one factor in my using a design that uses a small battery/supercap that is only used to power a standlight.

The requirements of the light will dictate what the best solution is. If you want to charge a large battery, you'll want to use a more complicated design that will probably include a MPPT and one or two switching power supplies. Managing the complication of extracting as much power from the dynamo as possible, as well as deciding how to allocate limited power between the light and a battery, could be tricky. Might be best accomplished with a microcontroller, or perhaps there is a clever simple analog circuit that can do it?? Figuring out the optimal solution where the real fun is. :)
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
update: I did find my old circuits for the "battery charge regulator" and "battery discharge regulator". The first takes power from the dynamo and charges a 5 cell nicad battery. The second takes power from the battery and regulates the power to the incandescent headlight. It's a fun little circuit, with a bit of feed-forward of the battery voltage to keep the power to the incandescent bulb fairly steady as the battery voltage drops.

Flickr is not playing well with me today, so I can't post the images. Instead, let me provide links to the images....

Battery charge regulator:
https://www.flickr.com/photos/kurtsj00/24171993235/

Battery discharge regulator:
https://www.flickr.com/photos/kurtsj00/24178087265/

Flickr isn't showing me the images. No idea why. I'm hoping that they might be visible to others
 

piesoup

Newly Enlightened
Joined
Oct 31, 2008
Messages
114
Location
East Anglia
Thanks for those schematics Steve, I can view them from the links you posted.

I think I'm going to keep my wishlist very simple! I understand what you mean about losses when charging a battery and then using the battery to power a light.
So what I will do is build your SonOneTwo with standlight as is. I'll use the newer XP-G leds.

What I'd still like is USB charging during the day. I would place a STDP switch in your circuit after Q3 and Q4, removing the connection to U1. Smoothing caps will be added. Then add the 5v system after that. Would that be correct? Is D10 your

Have you had much dealings with USB charging systems? From what I gather, the more you load up a dynamo, the more power you can extract from it. But if I'm just trying to charge a battery, is that enough load? A 1A charge rate would be ok, 2A even better! I'd still want to use that Traco switch mode converter as it can take 30Vin. And if nothing is connected, does your D10 act as over voltage protection?

Thanks again for always helping Steve, its greatly appreciated!
 
Top