{"id":81,"date":"2013-12-08T21:20:43","date_gmt":"2013-12-08T20:20:43","guid":{"rendered":"http:\/\/axotron.se\/blog\/?p=81"},"modified":"2013-12-08T21:20:43","modified_gmt":"2013-12-08T20:20:43","slug":"simple-dynamo-powered-bicycle-led-light","status":"publish","type":"post","link":"https:\/\/axotron.se\/blog\/simple-dynamo-powered-bicycle-led-light\/","title":{"rendered":"Simple Dynamo Powered Bicycle LED Light"},"content":{"rendered":"<p>After the incandescent bulb of the bicycle light broke for the second time in a few weeks, I thought it was time to retire Edison&#8217;s invention and move into the 21st century by replacing it with an LED.<\/p>\n<p>I had a cheap battery powered bike LED light laying around, but I wanted the LED to be powered by the hub dynamo and so I decided to convert it from battery power to dynamo power. The dynamo generates AC current at a voltage and current that depends both on the speed of the bike and on the load that is connected to it, so some circuitry had to be designed and built to suitably drive the LED.<\/p>\n<p>The bike light contained a battery holder for four AAA batteries, a single power LED and a small circuit board containing a glob-top chip, a decoupling capacitor, a small external MOSFET and a connection to a button that could put the LED in one of three modes: off, on and flashing. Text printed on the light said &#8220;3W&#8221;, but I doubt the LED can actually handle that much power and I also doubt the four small batteries could deliver the close-to-one-amp of current required for 3 W. 300 mA and thus approximately 1 W seemed more reasonable. As a hub dynamo can easily generate more than 300 mA and I wanted to get the full brightness at a reasonably low speed while still not overloading the LED at higher speeds, some form of constant current source was required.<\/p>\n<p>If I had wanted to spend lots of time and development effort on building the perfect dynamo-driven bike LED light, I would probably have opted for a schottky bridge rectifier followed by an elaborate switch-mode converter driving one or more big LEDs, preferably with a control scheme that tries to maximize the power put into the LEDs at lower speeds, while keeping the power constant at higher speeds.<\/p>\n<p>My priorities were however somewhat different with this project. I wanted a quick solution that I could finish in a few hours using components I had available at home. The solution I opted for was to build a bridge rectifier using four 1N4002s and follow it by an LM317 adjustable voltage regulator that drives the LED in series with a 1 ohm power resistor; see schematic below. By setting the output voltage of the LM317 to a suitable value, the 1-ohm resistor limits the current through the LED to the desired 300 mA.<\/p>\n<figure id=\"attachment_82\" aria-describedby=\"caption-attachment-82\" style=\"width: 713px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/12\/bike_light_sch.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-82\" alt=\"Schematic for constant current bike LED light.\" src=\"http:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/12\/bike_light_sch.png\" width=\"713\" height=\"389\" srcset=\"https:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/12\/bike_light_sch.png 713w, https:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/12\/bike_light_sch-300x163.png 300w\" sizes=\"auto, (max-width: 713px) 100vw, 713px\" \/><\/a><figcaption id=\"caption-attachment-82\" class=\"wp-caption-text\">Schematic for constant current bike LED light.<\/figcaption><\/figure>\n<p>I first measured the LED voltage at 300 mA of current and selected feedback resistors to the LM317 to get a little more than 0.3 V above that value (to account for the voltage drop across the current limiting resistor). That gave me the values for R1 and R2. Then I built the circuit on perf board, but without R3. After that I connected the LED (D5 in the schematic) and tested it while powered from a bench supply. I added R3 as required to reduce the current to 300 mA. Depending on what LED you have and how much current you want to supply it with, you need to adjust the voltage divider R1-R2-R3 accordingly.<\/p>\n<p>The finished circuit board is shown below while fitted in the battery compartment of the original bike light. The LM317 does not get a lot of cooling, so maybe it will be get quite hot if pedalling fast. If that turns out to be the case, I will have to figure out a way to thermally connect it to the housing.<\/p>\n<figure id=\"attachment_83\" aria-describedby=\"caption-attachment-83\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/12\/bike-light-1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-83\" alt=\"Top view of the electronics fitted in the battery compartment\" src=\"http:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/12\/bike-light-1.jpg\" width=\"800\" height=\"397\" srcset=\"https:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/12\/bike-light-1.jpg 800w, https:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/12\/bike-light-1-300x148.jpg 300w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><figcaption id=\"caption-attachment-83\" class=\"wp-caption-text\">Top view of the electronics fitted in the battery compartment<\/figcaption><\/figure>\n<figure id=\"attachment_84\" aria-describedby=\"caption-attachment-84\" style=\"width: 533px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/12\/bike-light-2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-84\" alt=\"Side view of the electronics as well as the original circuit board that is left in place.\" src=\"http:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/12\/bike-light-2.jpg\" width=\"533\" height=\"800\" srcset=\"https:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/12\/bike-light-2.jpg 533w, https:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/12\/bike-light-2-199x300.jpg 199w\" sizes=\"auto, (max-width: 533px) 100vw, 533px\" \/><\/a><figcaption id=\"caption-attachment-84\" class=\"wp-caption-text\">Side view of the electronics as well as the original circuit board that is left in place.<\/figcaption><\/figure>\n<p>I drilled a hole through the housing and fitted it with a grommet suitable for the cable I intended to use to connect the light to the dynamo. I used a 6.35 mm stereo plug and put a corresponding jack on the bike so that the light could be unplugged and removed. Hopefully these connectors are robust enough to work reliably outdoors for a few years. We will see. The photo below shows the finished light.<\/p>\n<figure id=\"attachment_85\" aria-describedby=\"caption-attachment-85\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/12\/bike-light-3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-85\" alt=\"Test of the bike light using a bench supply hooked up to the 6.35 mm plug.\" src=\"http:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/12\/bike-light-3.jpg\" width=\"800\" height=\"534\" srcset=\"https:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/12\/bike-light-3.jpg 800w, https:\/\/axotron.se\/blog\/wp-content\/uploads\/2013\/12\/bike-light-3-300x200.jpg 300w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><figcaption id=\"caption-attachment-85\" class=\"wp-caption-text\">Test of the bike light using a bench supply hooked up to the 6.35 mm plug.<\/figcaption><\/figure>\n<p>A quick test drive demonstrated that the contraption worked as intended. The light flickers when the bike rolls very slowly, but for any reasonable biking speed, the light is stable. Maybe I will build a more powerful bike light in the future, but for now this will do.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After the incandescent bulb of the bicycle light broke for the second time in a few weeks, I thought it was time to retire Edison&#8217;s invention and move into the 21st century by replacing it with an LED. I had a cheap battery powered bike LED light laying around, but I wanted the LED to &hellip; <a href=\"https:\/\/axotron.se\/blog\/simple-dynamo-powered-bicycle-led-light\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Simple Dynamo Powered Bicycle LED Light<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-81","post","type-post","status-publish","format-standard","hentry","category-electronics"],"_links":{"self":[{"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":1,"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"predecessor-version":[{"id":86,"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/posts\/81\/revisions\/86"}],"wp:attachment":[{"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/axotron.se\/blog\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}