Introduction: Batteryless Bicycle Safety Light

Picture of Batteryless Bicycle Safety Light

When riding your bike at night making yourself visible to others can greatly benefit your health! With this instructable I'll show you how to make blinking bicycle lights on the cheap.

These types of lights are sold here in Switzerland for 50$ and even on Aliexpress they cost about 25$ for a pair. Out of curiosity I started experimenting with different circuits and after some initial failures found a really cheap way to make my own bicycle lights for less than 4$ per piece and the fun and pride of making it yourself.

Step 1: Preparation

Picture of Preparation

All the parts required can be bought online from Banggood and Dealextreme. You may even find them cheaper on aliexpress. Here is the list of things you need:



  • 3D-printer
  • Ruler
  • Caliper (optional but it helps)
  • Soldering iron
  • Superglue (or some other glue)
  • Electronics sidecutter
  • Knife
  • Sandpaper
  • Tweezers
  • Stuff to mix the resin
  • PC to create the customized 3D parts

Measure your bicycle

Every bicycle is different. The design I made for the housing is fully customizeable and can be easily adjusted by just measuring and changing two things: the diameter of the bicycle frame part where you will install the light and the distance to the spokes. Measure these as accurately as possible and write them down.

The diameter and the distance need to be measured at the height where the spokes are spread 5cm apart. This is where the magnet-holder will be clipped on. Check the photos on how to measure it. Measure both the front and the back wheel.

Step 2: Create Your Own Custom Housing

Picture of Create Your Own Custom Housing

First you need to create an Onshape user account. Onshape is the best online CAD tool around at the moment and it is completely free. It comes very close to a professional tool like SolidWorks.

Open my VeloBlinky design files and create a copy so you can edit the files.

There are four basic design files (tabs at the bottom) named

  1. blinky_back
  2. blinky_front
  3. Magnetholder_A
  4. Magnetholder_B

Open the 'blinky_back' file and edit the two numbers at the top of the feature tree on the left named 'diameter_back' and 'distance_back'. Enter the distances you measured for the back wheel (in millimeters!) The distances that produce an acceptable design are between 29mm and 39mm.

Do the same for the file named 'blinky_front'. Here the limits on the distance are 13-28mm.

Note: the appropriate gap between the light and the magnet is automatically added so there is no need to factor in extra space, just enter the full distance measured.

If you would like to tweak the design you may want to change some stuff in 'sketch5'. Occasionally the fillets cannot be produced properly and they are just dropped. If you still want them, try tweaking the features 'fillet3' and 'fillet4'.

There are two more design files for especially wide front wheel gaps and especially narrow back wheel gaps in the 'extras' folder in case you have a really weird bike ;)

Once you are happy with your design you need to export the file to an STL to print it. In Onshape this is really easy: just right click on the tab of the file you want to save and select 'Export...'. Then select STL as the format with the resolution set to 'Medium' and the units as 'Millimeters'.

Don't forget to also export the magnet holders. If you are using different magnets than the 15x5mm round ones you also have to adjust those designs. Be aware that the light may not work properly with magnets thinner than 4mm.

Now go on an print away in your favourite colors. Make sure to use supports when slicing the 'blinky_front'. The other parts print well without any support structures. As a material I am using ABS because it is less brittle than PLA and tends to break less, especially when it is cold. But PLA is probably fine too, the best choice would probabably be PETG but I did not try it yet.

Important: after printing test if it fits your bicycle. Also put on one of the magnet-holders and check that there is a 1-2mm gap to the printed housing. If the gap is too small, the holder can hit your housing. If the gap is too big you can still flip the magnet-holder around so the thicker side faces the lamp. When I did check mine it seemed ok but it turned out that the gap was too small. Since the lamp was already finished I created new magnet-holders with a larger gap for the spokes so I could put it further up on the wheel. If this happens to you too just print the larger magnet holders in the 'extras' folder.

Step 3: Build the Induction Light: Prepare the Relay

Picture of Build the Induction Light: Prepare the Relay

In order to induce voltage from a magnet we need a wire wound coil with lots of windings and a magnetic circuit. A cheap 12V relay has already everything we need but the magnetic circuit is closed by the switching part. What we need is an open magnetic circuit so lets cut it open!

The relay can be cut open using a saw or a grinding wheel but that can destroy the whole thing. I found that a more clean and elegant way is to melt it open using a soldering iron. I set it to a temperature of 230°C which isperfect to melt plastic without ruining the tip and creating almost no smoke.

After melting the housing at about 3mm from the top just use the side cutter to open it up. The switching mechanism has to be completely removed such that at the top there is the round end of the coil and the yoke part without any of the copper/brass parts sticking out. You can also use sandpaper to make sure it is flat at the top.

On the bottom side there are five contacts: three on one side, two on the other. Cut both on the side where there is two and the center one of the three. The two that are left are connected to the coil and will produce a voltage spike when a magnet is moved along the open magnetic circuit. Actually there is two spikes, one positive as the magnet moves in and one negative as the magnet moves away. Keep that in mind when reading the next step.

Step 4: Build the Induction Light: Prepare the LEDs

Picture of Build the Induction Light: Prepare the LEDs

Open the LED keychain light using some pliers, it should open pretty easily. Remove the battery using the soldering iron then cut the circuit board from the solar cell.

Notice anything odd? Where is the connection to the solar cell? Right, it's not there. These cheap lights are not even solar, they just use reject solar cells that did not meet specifications and pack it in a flashlight with a normal battery. Pretty sneaky! Most of the cells still work, you may want to save them and use them for some cool solar project. Also we do not need the batteries, put them to good use or discard them properly.

The button can be replaced by a dead short. Remove it with the soldering iron and short out the two contacts using one of the cut legs from the relay.

Now comes the more tricky part: one of the three LEDs needs to be flipped. This is to protect them from overvoltage. As mentioned earlier there are two voltage spikes. LEDs are very sensitive to reversed polarity and will quickly burn out if the voltage gets too high which will happen when you ride your bike like a maniac as I do. By flipping one of them the voltage is clamped at about 2-3V and the energy is turned into light: win-win. As you can see in the last foto I flipped the one in the center: the slot in the shiny part inside the LED is on the other side when compared to the other two. The center one is the most tricky to solder back on, you can also flip one of the outer leds.

For the back-light we have to switch the white LEDs for high brightness red ones you ordered in step 1. They have to be high brightness, the standard LEDs will not be bright enough for a safety light. Cut the leads to the correct length of about 5mm. Don't worry about the anode and cathode, just make sure not all three are in the same orientation by checking the gap inside the LED.

Step 5: Build the Induction Light (finally...)

Picture of Build the Induction Light (finally...)

Solder the relay to the circuit board as shown in the foto. Make sure to use some fresh solder and apply enough heat so it really holds well.

Carefully bend the relay on top of the circuit board. If the solder joint breaks, start over and use a little more solder or apply some flux first.

Already got your magnets ready? If you move one or better yet a whole stack of them swiftly past the top of the relay the LEDs will light up briefly. How cool is that?! Careful though not to pinch your fingers.

Step 6: Assemble the Parts

Picture of Assemble the Parts

Take the printed housings and insert the finished induction lights. Put the right color into the right housing! White goes front and red to the rear. Make sure that the LEDs are well seated in the holes and that the open relay is not sticking out of the housing. If it keeps coming out more than 1mm you can try this: remove the light from the printed housing and bend the LEDs down a little bit then put reinsert it. You can always resort to scotch tape to make it sit flush at the top.

For the magnet holders I use a little superglue to make the magnets stay in the holder. Cleaning the magnets first using a paper towel to remove any fat from fingerprints improves the bonding strength.

Step 7: Potting the Light

Picture of Potting the Light

The light has to be waterproof in order to survive out there. Potting the whole thing has proven to be an effective method. I am using Polyester from the DIY store because it is cheap and easily available. Epoxy also works but it is way more expensive. Soft potting compounds like slicone may also work but I did not try that and it probably is even more expensive. Polyester is quite smelly until it is fully cured and the fumes are probably toxic, be sure to perform this step outside or in a well ventilated room.

First mix a small amount only, about 5ml is enough. Pour half of the mixture into each housing and tilt it in varous angles to wet the inside. This step is necessary to seal any small holes in the printed part and especially the holes around the LEDs. If any of it spills through the LED holes just wait until it gets a little thicker, then clean the outside with a paper towel then let it dry. This took about 30 minutes with the compound I used. Once the stuff is solid make sure that the holes around the LEDs are properly sealed. If not, repeat the process.

Now remove any tape used to hold the light down and fix the thing in an upright position such that the opening is positioned horizontally. I used clamps for this as shown in the fotos.

Mix more of the Polyester with hardener about 50g-80g this time. Pour it in slowly until the whole housing is filled. Wait for any air bubbles to come up and pour some more if necessary until the liquid nicely covers the relay. Now let it set completely which took a few hours in my case.

Test the two lights again with the magnets to check that they still work.

Step 8: Grinding It Flat

Picture of Grinding It Flat

This step may not always be necessary. In my case the cured Polyester was sticking out of the top quite a bit so i used grit 80 sandpaper to grind it nice and flat followed by grit 200 sanpaper to smooth things out. As you can see in the foto I also got the metal part of the relay a little which does not affect the functionality at all.

Step 9: Install It to Your Bicycle

Picture of Install It to Your Bicycle

Just a heads up: you probably already know that 3D-printed parts are not as strong as your usual plastic parts which are injection moulded so be careful when installing the lights and do not tighten the screws more than necessary. I am writing this notice of caution because I broke my light and had to weld it using acetone (for ABS parts only) and then letting it dry for a few days.

The design is made for M4 socket cap screws (most similar imperial screw: UNF 8-36). Get a screw that is at least 10mm longer than the measured diameter of the bicycle 'post' you are going to install it to (as measured in step 1). Also you need a nut for each screw.

Before mounting the lights put two or more magnet-holders with the magnets glued in on the spokes and close the clip. Put the thicker part of the holder on the inside of the wheel so the smaller clip faces outward. I use a little superglue to make sure the clip does not get loose.

Install the light by putting it on close to the center of the wheel and then slide it up to where the magnets are. Now add the nut first and then put in the screw and tighten it until it is clamped nicely and does not move easily.

Step 10: Testing

Picture of Testing

All done, congratulations!

When you turn the wheel the light will now blink each time a magnet passes by. If it does so only at a certain speed you may need to re-adjust the position of the light so the magnet passes just where the relay is.

Please ride safe!

If you would like some more details on the development of the circuit just visit my blog: Bäschteler of Science


rachl009 made it! (author)2017-11-03

Is this right? 3 leds in parallel, with one of them flipped?

dedehai (author)rachl0092017-11-05

Yes, exactly. I just added a schematic to step 5.

rachl009 (author)dedehai2017-11-05

Great! Thank you.

mottimosh (author)2017-10-26

I Would love to see the Electrical Schematics

dedehai (author)mottimosh2017-10-26

Good point. I will add one.

mottimosh (author)dedehai2017-10-26

Thanks !!

dedehai (author)mottimosh2017-11-05

Done. See step 5.

Megrathea69 (author)2017-10-26

Hi,this is a good idea but you have the lights on the wrong side of the bike

dedehai (author)Megrathea692017-10-26

Why is 'towards the road' the wrong side?

Megrathea69 (author)dedehai2017-10-29

It depends on which side of the road u drive on.if you are in a country
where they drive on the left side of the road then the chain side of the
bike is to the road so lights would be on that side.if you drive in a
country where you drive on the right side of the road then the chain
side of the bike would be to the kerb.the lights have to be the on the
outside or the side you would get passed on by other traffic and the
position of the lights is right for driving on the right side.As i stay
in the UK i was thinking from my perspective as we drive on the left
here.The diagram i attached shows driving on left view.I suppose it would be easy enough to fit the lights on either side of the bike depending on which side of the road you drive on where you are.

dedehai (author)Megrathea692017-11-05

I forgot about left-lane driving countries... sorry. You can just mirror the design before exporting it and you can mount it on the other side of your bike.

martonthenagy (author)2017-10-30

Great work.

My personal favorite DIY induction bike light is this:

dedehai (author)martonthenagy2017-11-05

Thank you. So I stand corrected of this being the first open design, did not know about that one.

Antzy Carmasaic (author)2017-10-28

I ride my bicycle everyday part of the way to work and there are lots of days when I forget to charge the bike lights. Though I guess these won't be as bright, they could provide backup in those cases.

Most bike lights are made from silicon and attached using stretch and hook mechanism. You could try with flexible filament instead of ABS to prevent it from cracking again and falling mid ride.

dedehai (author)Antzy Carmasaic2017-10-29

Good idea, let me know if you try it. So far I did not have any problems with broken lights. It is very rigid once it is installed. The ones on my old bike have been working for two years, summer and winter. Now the bike is broken but the lights still work :)

euronight446 (author)2017-10-28

Great Idea, using induction power for the LED´s. I wonder if there are SMD´s with more Lumen to be usable for such a device.

dedehai (author)euronight4462017-10-29

There are higher brightness LEDs for sure. You also need to provide more energy.

cuyler1 (author)2017-10-28

ALERT!! i downloaded onshape and now i cannot remove it. they reply that they do not have a way to remove your account at this time and you have to sign up to be on a list IF they ever have a way for you to remove your account. now i have telemarketers calling day and night. my spam folder is growing. i feel that this is a malicious site and have contacted Google hoping to resolve this sites rogue issues. Just want to help the members of our site as they have helped me with some great ideas.

dedehai (author)cuyler12017-10-29

I am sorry to hear you messed up your computer. Whatever you downloaded it surely was not OnShape as it is a cloud based service and there is nothing to download or install.

SuperjamieQ (author)2017-10-26

Very cool! Great idea and a nice design.

dedehai (author)SuperjamieQ2017-10-29

Thank you!

Mihir230898 (author)2017-10-29

Awesome built, try attaching a resistor series with capacitor (1f or more) in parallel with any led to continue light even during halt

СергейР5 (author)2017-10-24

It's a really smart idea!
Will 5V relay do the thing? And I'm trying to figure out, if there's a way to add a capacitor, so the LED stay on for a few seconds after you stop?

fdlsys (author)СергейР52017-10-24

Charging capacitors is much less demanding than charging batteries. You can easily fit a 1000uF/16V cap in parallel and LEDs will have more than enough juice to run for hour(s). You might want to put a little toggle switch on the housing to switch the LEDs off but even allowing the LEDs to fully discharge the cap is not a problem.

dedehai (author)fdlsys2017-10-25

Your statement is very inaccurate. First you need a diode rectifier to turn the AC voltage from the relay into a DC voltage to charge the capacitor. Then there is a resistor necessary to limit the current from the capacitor to the LED. And last but most important: a 1000uF capacitor charged to say 12V will only light a single LED for about 1 second until it is discharged.

JohnC430 (author)dedehai2017-10-26

This looks like a great idea. i have been wanting to do it ever since i saw an advertisement for one of those. too lazy....

1 second is plenty. the wheel is moving and will keep charging the cap. watching your video the interval is slightly less than 1 sec so the cap charges up to 12V, it will stay lit and of course you can add more magnets to increase the pulse rate. Use one LED as a rectifier and put the cap across other two. when you stop the two will stay lit for a second or so. I read your blog. the coil resistance is 400 Ohms. that's more than enough for current limiting so an added resistor is not required. so just add a 1000uF cap across two LEDs but make sure the + of the cap is at the cathode (flat edge of the diode base) of the first diode and the neg of the cap is where the two diodes and the coil meet. draw the schematic of it on a piece of paper so you know where to make the connections. in any case i don't see the value of this modification.

dedehai (author)СергейР52017-10-24

Thank you. A 5V relay does not work as well as a 12V relay because the output voltage is not enough to light up the LEDs brightly at lower speeds but in theory the energy output is the same. See my measurements and comments about that in my blog.

JohnC430 (author)2017-10-26

whats cool about this is that the fragile coil is still protected in its original box. great idea.

Mukund parelkar (author)2017-10-26

A ready made dynamo gives bright front light as well as tail light.

dedehai (author)Mukund parelkar2017-10-26

Sure but 'ready made' is kind of missing the point of an instructable isn't it?

JanS127 (author)2017-10-25

I really love the idea as technical proof of concept. For lazy people, you can find such light commercial e.g. on eBay searching for "induction bike light". It is available for some $12+.

dedehai (author)JanS1272017-10-26

Yes. See the introduction text in step 1.

sue.donim.144 (author)2017-10-24

this could also work as walking lights ... use appropriate materials string? to attach to legs/arms .... but boooo have to run close legged or armed ... maybe a bounce magnet in a housing when walking your steps will cause magnet to pass by relay and flash light.

Yonatan24 (author)sue.donim.1442017-10-25

Great idea! Didn't think of that, but I guess that's also true - not as easy as it sounds. :)

Dr H (author)2017-10-24

Very good instructable.

I would like to draw your attention to a recent Kickstarter project on a similar technology:

dedehai (author)Dr H2017-10-24

similar as in 'same same but more fancy and expensive' :)

Chuckwilcox (author)2017-10-24

Great work and good idea and nice instructable. Thanks for sharing :)

wtito (author)2017-10-24

Great job, I saw something similar years ago, but very expensive. I will make it.

fsoliveira (author)2017-10-24

What a cool idea!

Do you think is it possible to place the LEDs somewhere more visible an run some wires to carry the energy?

dedehai (author)fsoliveira2017-10-24

You can certainly do that. In fact someone already made an instructable about this exact thing using an off the shelf inductive light.

oaking (author)2017-10-24

Good idea in that you don't need to change batteries and should always work, especially if you are caught in the dark without your normal lights - I would suggest a second magnet mounted at 180 degrees from the first to keep the wheel balanced (or 2 more at 120 degrees apart)

dedehai (author)oaking2017-10-24

If you look closely at the video in step 1 you can see that I actually mounted three magnets on the wheel. Not balance the wheel (the weight influence of the magnet is negligible) but to make it blink faster at lower speeds.

edrandall (author)2017-10-24

I think a magnet from an old hard drive could be used to good effect.

dedehai (author)edrandall2017-10-24


voenie (author)2017-10-23

Great execution!
Can you tell me if you need the led keychain for this project? Could I just solder the leads of 3 led's in series (with 1 inversed) instead of soldering them to the salvaged circuitboard? Or has the circuitboard still got a function?

Thanks in advance, as soon as I get a reply from you I will start ordering the parts. I will mount the lights with zipties, that way I won't have to print different mounts for different bikes.

dedehai (author)voenie2017-10-23

Thanks. The LED keychain is not needed if you solder the LEDs dirctly to the relay. Do not put them in series but in parallel, one of them in reverse which is called 'antiparallel', just google it and you will find the circuit. You can also just use two LEDs instead of three, or even four if you like (two parallel, two 'antiparallel')

Good Idea of using zipties, will make it easier indeed. I may add a redesign of the housing to suit that.

theartfulbirder (author)2017-10-22

Wow what a great idea!

dedehai (author)theartfulbirder2017-10-23

Thank you :)

Owl Trained ED Doc (author)2017-10-22


DIY Hacks and How Tos (author)2017-10-22

Clever idea. I have never seen this kind of bike powered light before.

About This Instructable




More by dedehai:Batteryless Bicycle Safety Light Easy pixel nightstand lampChained mood-light using high power RGB LEDs
Add instructable to: