Author Topic: Making a mobile device charger to work with your hub dynamo  (Read 14290 times)

Andre Jute

  • Hero Member
  • *****
  • Posts: 4064
Making a mobile device charger to work with your hub dynamo
« on: December 02, 2012, 11:32:42 pm »
[I've since described an easier and cheaper way of doing this with newly available components. See http://www.thorncycles.co.uk/forums/index.php?topic=8447.0 ]

Today I outline the principle of using a dynamo to charge your devices with a homemade adaptor.

If you know only a little electronics, you can make your own charging port for the (presumably) limited and fixed range of mobile devices you want to carry on your bike on a tour or a day trip or your commute. You need only two functions:

(1) to rectify the output of the dyne from alternating to direct current, and

(2) to regulate the charge voltage to what the device to be charged expects, generally 5V.

A cap (which will also smooth the flow and buffer it, a couple of diodes, and that's the rectifying job done.

A potentiometer (or some small fixed resistors; a pot is just a variable resistor) will do the voltage control job fine. Er, unless you try to charge an iPad, which will try to draw 10W and will fry underrated resistors. However, making a basic charger for an iPad is just an upscaling of the smaller circuit.

The whole thing, both parts, need be no bigger than a shrinkwrapped bump in the lamp cabling.

It won't be very versatile, or refined, but we're not looking for the ultimate (BUMM charges over a 100 smackers for the E-Werk, which is just better packaged crudity!), we just want something that you can make yourself with discrete analogue components -- that works.

Andre Jute
« Last Edit: February 21, 2014, 02:10:11 pm by Andre Jute »

Danneaux

  • Administrator
  • Hero Member
  • *****
  • Posts: 8229
  • reisen statt rasen
Re: Making a mobile device charger to work with your hub dynamo
« Reply #1 on: December 03, 2012, 04:53:55 am »
So looking forward to it, Andre...I figure you'll have *the* answer for low- peak loss rectification in a low-power circuit. MOSFET+diode or CMOS active low-loss bridge, or...? Maybe just "circled" diodes to keep costs low?

All the best,

Dan. (...with bated breath!)

Andre Jute

  • Hero Member
  • *****
  • Posts: 4064
Re: Making a mobile device charger to work with your hub dynamo
« Reply #2 on: December 03, 2012, 08:54:03 am »
Well no, Dan. I was thinking of something really crude, from the steam age of electronics, so that members who aren't into electronics can learn enough of the principles to make the next generation for themselves when their equipment to be charged changes. -- Andre Jute

Danneaux

  • Administrator
  • Hero Member
  • *****
  • Posts: 8229
  • reisen statt rasen
Re: Making a mobile device charger to work with your hub dynamo
« Reply #3 on: December 03, 2012, 04:42:07 pm »
Good choice, Andre, and appropriate to need as well.  Looking forward to it; good on you for the effort!

All the best,

Dan.

Andre Jute

  • Hero Member
  • *****
  • Posts: 4064
Re: Making a mobile device charger to work with your hub dynamo
« Reply #4 on: December 06, 2012, 08:41:13 am »
Right. The first thing we determine is what our resources are, and then we choose a regulator.

The rectifier for such a small device is trivial, just a few diodes corrected oriented across the input. I'll publish a visual circuit later.

What we have from a dynamo is nominally 3 watts, made up of 6 volts at 500mA or 0.5 of an amp. 6 Volts times 0.5 Amps equals 3 volt-amps or "apparent Watts".

In real life the hub dynamo is current-controlled to 500mA, so the voltage varies with speed.

The output of the dynamo is alternating current, alternately positive and negative around a central reference; this is what causes the characteristic wave form. But the devices you want to charge expect direct current, which is just the top half of the wave, above the reference, smoothed off by capacitors. (The transformers you often see in circuits are safety devices, intended to isolate you from the lethal alternating current, AC. Since we're working with only 7V and half an amp, we don't need a transformer.)

The low speed flicker of a LED lamp is the symptom of that *alternating current*, AC, and it disappears as the voltage rises with speed, in most hub dynamo installations to something over 7V.

Almost every component in electronics drops some voltage over itself, and a very useful characteristic it is too, as we shall see.

We have a real-life 7V from the road speed of a touring cyclist or a commuter who isn't being too badly held up by traffic jams. My guess is that approx 10mph or 15kph (to take round numbers) is the breakpoint above which the SON, the most high-speed-biased dynamo known to me, crosses the 7V line. (Those of you with more time than me right now might volunteer to find us a reference and hard facts.) My old Shimano (nee Sanyo, it is that old!) on measurement gave 7V at about 6mph.

But that 7V of AC is in fact nearly ten volts of DC (9.8V; divide the AC by 0.707 to get DC), so we have some headroom. We can use four diodes with a drop of 0.6 to 0.7V each, and still choose a meaty 1.5A regulator that drops 2V. The higher rating than we want (1A) or can use (around half an amp) is another kind of headroom, to avoid heat-death, a devastating disease common in amateur-brewed electronics.

Now, as it happens, the common or garden regulator I had in mind for this job, because it is so easy to work with and understand even for rank amateurs, as I once was, is the LM317. At room temperature and producing 500mA (which is the dynamo limit, remember?) the 317 has a forward voltage Vf or voltage drop of 1.7V, certainly not more than 2V. It can deliver up to 1A at 2V drop. Ideal. There are lower drop regulators but they're trickier to understand and work with, and nowhere near as robust as the 317.

TO BE CONTINUED Meanwhile comments, discussion and questions are welcome.

Andre Jute

phopwood

  • Sr. Member
  • ****
  • Posts: 301
Re: Making a mobile device charger to work with your hub dynamo
« Reply #5 on: December 07, 2012, 08:06:16 pm »
Andre,

You are heading in the right direction, as a younger man electronics was my thing, but moved out of it in to IT.  Some things to consider, the voltage from the hub will vary greatly when unloaded, and this is the killer for an unloaded regulator circuit.

You will find that your charger will need a load all the time, or you will end up killing your circuit, the best way to handle this is a cache battery, a simple 4.8v will be ok, this also helps you charge when you are stopped.

Or simply fit a switch so you can switch it off when not charging.

Have a look at this from maplin it is almost all you need, but I suspect the voltage drop will be too great. Keep in mind that an 317 is good but a dedicated 5v reg would be better.

http://www.maplin.co.uk/k18231a-power-supply-3488?c=maplin&utm_source=endeca&utm_medium=endeca_search&utm_campaign=VE58N&utm_content=Miscellaneous+Kits

And this for a cache battery

http://www.maplin.co.uk/2200mah-portable-power-bank-for-mobile-devices-625615?c=maplin&utm_source=endeca&utm_medium=endeca_search&utm_campaign=N49LK&utm_content=Rechargeable+Batteries

Keep up the good work, I am interested to see your idea working.



Peter


Andre Jute

  • Hero Member
  • *****
  • Posts: 4064
Re: Making a mobile device charger to work with your hub dynamo
« Reply #6 on: December 08, 2012, 01:20:29 am »
Some things to consider, the voltage from the hub will vary greatly when unloaded, and this is the killer for an unloaded regulator circuit.

You will find that your charger will need a load all the time, or you will end up killing your circuit, the best way to handle this is a cache battery, a simple 4.8v will be ok, this also helps you charge when you are stopped.

Or simply fit a switch so you can switch it off when not charging.

Peter, thanks for that. I'm taking this one step at a time, so as not to overload people who know absolutely nothing about electronics. i like batteries; i used to use them as cathode bias for tube amps, for instance in my single-ended 300B amps, see http://www.audio-talk.co.uk/fiultra/T39-KISS-300B-Ultrafi-crct.jpg (There's more at Jute on Amps http://www.audio-talk.co.uk/fiultra/JUTE%20ON%20AMPS.htm if you're interested.)

Have a look at this from maplin it is almost all you need, but I suspect the voltage drop will be too great. Keep in mind that an 317 is good but a dedicated 5v reg would be better.

http://www.maplin.co.uk/k18231a-power-supply-3488?c=maplin&utm_source=endeca&utm_medium=endeca_search&utm_campaign=VE58N&utm_content=Miscellaneous+Kits

And this for a cache battery

http://www.maplin.co.uk/2200mah-portable-power-bank-for-mobile-devices-625615?c=maplin&utm_source=endeca&utm_medium=endeca_search&utm_campaign=N49LK&utm_content=Rechargeable+Batteries

I suspect we're going to run into a problem soon, that sourcing the parts and paying carriage will cost more than buying a complete Nano lamp with a charger built in. So I was already looking at prebuilt boards from China, to keep the cost down.

Thanks again. Good to know someone's interested, and there to catch the ball when I drop it!

Andre Jute

Andre Jute

  • Hero Member
  • *****
  • Posts: 4064
Re: Making a mobile device charger to work with your hub dynamo
« Reply #7 on: December 08, 2012, 02:12:48 am »
The next question is making a design with specified part numbers, and then sourcing them. This is where our difficulties start. As a sometime designer of audio gear, I have plenty of leftover parts from various prototypes, but you aren't in the same position. The problem is that we in Europe don't have electronics hobby shops in the same way Americans have Radio Shack. We generally have to order electronic parts by mail. Even if you have an account with RS or Farnell, the carriage can kill enthusiasm, and any remaining joy in achievement is usually destroyed by minimum unit packages that waste a lot of money.

So, please, just take it as read that you can't buy the components for the price of an entire circuit, given only that you shop right. So what you do is to buy a pre-built module, usually surplus from some other purpose where it was used in the thousands or even the millions. That means you have to trust someone else to have drawn a good circuit. But in fact most circuits of utility boards are good, because they are cookbook circuits, straight off the manufacturer's data sheet. The only two remaining questions then are the quality of the components and the quality of the workmanship.
   
http://www.ebay.co.uk/itm/LM317-DC-AC-4V-30V-Out-DC-1-5V-27V-1A-Converter-Fiber-Glass-PCB-Brand-New-/300694378839?pt=LH_DefaultDomain_2&hash=item4602c81957 shows a "LM317 In DC or AC 4V-30V Out DC 1.5V-27V 1A Converter" for around £4.26 (depending on Paypal's conversion rate on the day). You can't buy the components for that. Let's check out the circuit they used.



Hmm, that looks pretty good, perfectly standard, a cookbook circuit straight off the manufacturer's spec sheet. The input of AC or DC current is on the left, full wave-rectified by the four diodes (arrowheads with wavy lines across them), smoothed and buffered by a capacitor (two short parallel lines; it's a sort of battery device that works much faster though, for practical purposes discharging all its power in a very short space of time) and then the current is fed to the 317, which is the rectangulare yellow integrated circuit. The 317 is protected by a diode across it (above it in this piccie). The output voltage is set by the ratio between the two resistors R1 and VR1, the VR resistor being variable merely for convenience. The rest of the devices, of types already introduced, are simply protection and convenience devices. At the righthand side a controlled, fixed voltage, DC current, is delivered.

So let's look at the underside of the board and see if it is nicely soldered.



Okay, that looks like a professional job off a practiced assembly line. Note that the soldering points are widely spaced, a useful feature if you want to change anything.

Next we take a good look at the heat sink because it is one of the most critical components.



Looks big enough to offer us some substantial headroom. Notice also the beginnings of rust on its edges. This board is cheap because it has been sitting in someone's store, surplus production of a very commplace board. It does no harm though. We can also read 50V 470uF on the capacitor (tall blue and silver tower) facing us, and see that the designers and productionizers didn't skimp on the rating of the cap (in a cheaply made board, you'd probably find 35V caps in there, marginal headroom for those who push this circuit, as we won't do). We see also the red LED, a nice touch, and just that margin of constant current draw that will keep this circuit nice and stable. (It's actual purpose is as a protection device.) The 317 is the chip screwed to the heat sink, the potentiometer  (commonly "pot") is the blue block with the screw on top as the adjustment knob, and the black block with the corner cut off contains the four rectifier diodes; it appears well sized to handle the 1W max we aspire to, and will probably never see. The stripey blue bar is a resistor and appears big enough to handle the heat it will radiate. The small red item next to it, half obscured, is a control rather than a storage cap. The green blocks are screw terminals for attaching your wires, much more convenient than solder patches or holes for those of you without a soldering iron or soldering skills.




It appears to be a standard design board, made to a good commercial standard, sold very cheaply as surplus. We can risk a fiver on it!

Those of you who have at least a multimeter, or a voltmeter, can buy this board. All the images are from the vendor I suggest:
http://www.ebay.co.uk/itm/LM317-DC-AC-4V-30V-Out-DC-1-5V-27V-1A-Converter-Fiber-Glass-PCB-Brand-New-/300694378839?pt=LH_DefaultDomain_2&hash=item4602c81957

Those of you without a voltmeter or a multimeter, check my next post.

Andre jute
« Last Edit: December 08, 2012, 10:29:37 pm by Hobbes »

Danneaux

  • Administrator
  • Hero Member
  • *****
  • Posts: 8229
  • reisen statt rasen
Re: Making a mobile device charger to work with your hub dynamo
« Reply #8 on: December 08, 2012, 02:13:29 am »
Andre,

Have you thought about adapting and improving upon an existing DIY solution, rather than starting from scratch?

I linked to a few of these here...
http://www.thorncycles.co.uk/forums/index.php?topic=3953.0
...and wondered if they might save you a bit of work.

This one sounds philosophically close to where you're going, could be modified to needs, and would be easy for many solder-experienced beginners to make...
http://www.arenddeboer.com/diy-hub-dynamo-usb-charger/
...the next generation of this unit is here: http://www.arenddeboer.com/bicycle-usb-charger-using-a-hub-dynamo-update/
Or...
http://parttimetinkerer.wordpress.com/2011/11/12/charging-gadgets-from-a-hub-dynamo/
These units output the same plain-vanilla USB voltage/current you'd get from a computer port, can be weatherized, and look reasonably nice in compact enclosures.

For most cycling-related charging, the standard USB 5.0v@0.5A is not a bad route to go. A lot of things will run safely on that voltage and current, and it is easy to buy USB-powered accessories to plug into it. Tout Terrain chose that route with their The Plug2 for a reason -- it's foolproof and safe -- and chose to refine it only in terms of ruggedness/reliability and to maximize power generation at lower speeds. In contrast, I just heard from another cyclist (third this week, sadly) who fried their electronics when they got tired and forgot to check the settings on their e-Werk chargers before plugging in.

All the best,

Dan. (...whose current mantra is, "Ohm...Ohm...Ohm")
« Last Edit: December 08, 2012, 02:19:57 am by Danneaux »

Andre Jute

  • Hero Member
  • *****
  • Posts: 4064
Re: Making a mobile device charger to work with your hub dynamo
« Reply #9 on: December 08, 2012, 02:23:45 am »
Those of you without a multimeter or voltmeter of any kind, in other words the complete electronic virgins, should instead buy the board below. It has a built-in voltmeter, and a bigger knob on the pot, and the delivered price is a bit over a fiver.

http://www.ebay.co.uk/itm/PX-1011-LM317-Adjustable-Power-Supply-Module-Voltage-Meter-/220965444339?pt=LH_DefaultDomain_0&hash=item3372911af3

I don't necessarily recommend this board for everyone, though. It's a much bigger board and therefore more difficult to protect and package on the bike. It's more complicated and therefore more likely to be damaged or to break spontaneously.

The only people who need it are those without a meter. Even tourers with several devices demanding different charge voltages don't need the meter on the board, and don't need to carry one either, because they can use an indellible pen (the kind you write on DVDs with is good) to make ticks around the knob for the various charging voltages.

Andre Jute
« Last Edit: December 08, 2012, 10:19:37 pm by Hobbes »

Danneaux

  • Administrator
  • Hero Member
  • *****
  • Posts: 8229
  • reisen statt rasen
Re: Making a mobile device charger to work with your hub dynamo
« Reply #10 on: December 08, 2012, 02:39:24 am »
Andre,

I think our posts crossed. I agree; a ready-made solution of whatever kind is surely more convenient and more easily brought to completion by those for whom electronics aren't a hobby. The eBay modules look attractive, and are surely priced nicely.

All the best,

Dan.

Andre Jute

  • Hero Member
  • *****
  • Posts: 4064
Re: Making a mobile device charger to work with your hub dynamo
« Reply #11 on: December 08, 2012, 03:05:20 am »
What would be good to avoid the problems Dan mentions with people carelessly frying their phones on the E-Werk, is a low dropout rectified 5V regulator board. One built on the new LM2940 would be super. I'm out of time now; I have to work. See you tomorrow. Maybe by then someone will have found such a board.-- Andre Jute

phopwood

  • Sr. Member
  • ****
  • Posts: 301
Re: Making a mobile device charger to work with your hub dynamo
« Reply #12 on: December 08, 2012, 07:06:50 pm »
Yes a per built 5v dedicated module would be best.  I am going to invest in the maplin kit and build it up and see where it leads.  I still have a soldering iron and a multimeter somewhere.

Peter.

phopwood

  • Sr. Member
  • ****
  • Posts: 301
Re: Making a mobile device charger to work with your hub dynamo
« Reply #13 on: December 08, 2012, 08:09:06 pm »
Peter, thanks for that. I'm taking this one step at a time, so as not to overload people who know absolutely nothing about electronics. i like batteries; i used to use them as cathode bias for tube amps, for instance in my single-ended 300B amps, see http://www.audio-talk.co.uk/fiultra/T39-KISS-300B-Ultrafi-crct.jpg (There's more at Jute on Amps http://www.audio-talk.co.uk/fiultra/JUTE%20ON%20AMPS.htm if you're interested.)

I suspect we're going to run into a problem soon, that sourcing the parts and paying carriage will cost more than buying a complete Nano lamp with a charger built in. So I was already looking at prebuilt boards from China, to keep the cost down.

Thanks again. Good to know someone's interested, and there to catch the ball when I drop it!

Andre Jute

Wow your skills are very impressive, I can see that you will have no problems finding the parts and assembling them.  But as you point out not everyone has the skills or tools required.

Peter

Andre Jute

  • Hero Member
  • *****
  • Posts: 4064
Re: Making a mobile device charger to work with your hub dynamo
« Reply #14 on: December 08, 2012, 10:48:42 pm »
Yes a per built 5v dedicated module would be best.  I am going to invest in the maplin kit and build it up and see w

Smart. I had dealings with Velleman (they used to sell my handheld battery-operated scope) and they're the best of the kit makers by a considerable margin. Don't forget to report your findings in this thread.

Wow your skills are very impressive, I can see that you will have no problems finding the parts and assembling them.  But as you point out not everyone has the skills or tools required.

I stopped publishing valve amp circuits when some complete novice wrote to me, about a circuit that had health warnings printed in all four corners, "I've ordered the tubes and transformers to build your Millennium's End 845 amp. But I'm new to electronics so can you please advise me where to buy a soldering iron and meter that will work with the 1400 volts?" I didn't want the life of even an idiot on my conscience! The high tension end of high end audio is only for the pathologically paranoid...