# DIY bike light with some special features



## Foliveira_PT (Nov 3, 2011)

Hello guys. I usually visit this section of the forum to see your designs on lights.

I have seen many fine buildings, and retained a lot of ideas here.

So I decided to share my latest project with you, here are some of the features:

20 x Cree XP-G 
http://www.led-tech.de/de/High-Power...3_120_138.html
Microcontroller: Atmel 2560 (​​with Arduino bootloader)
http://jkdevices.com/arduino-megamini
Driver Hyperboost (modified to 1.6A max.)
http://www.taskled.com/techhboost.html
EM-406A GPS Receiver SiRF star III
http://www.sparkfun.com/products/465
2 batteries 4s 4500ma
http://www.hobbyking.com/hobbyking/s...Lipo_Pack.html
2x 30x30mm Fan Sunon maglev
http://www.xsfans.com/index.php?main...roducts_id=565
2x current sensors:
http://www.sparkfun.com/products/8882
16x2 character LCD
http://www.sparkfun.com/products/709
A humidity sensor
http://www.sparkfun.com/products/9569
2x capacitive sensors "IQS127D" (for buttons)
Lm35 temperature sensors 3x
Etc..

Some features:

20 cree xp-g. Controlled by PWM, currently has four fixed light levels .. but is then to vary automatically as the speed of the bike and ambient light.

GPS receiver (for now just to know the altitude, speed, and time)

Information on ambient , LED and driver(mosfet) temperature. Information relative humidity and ambient light.

Read the voltage of individual 8 cells, the input and output voltage on driver, and the current input and output of the driver (for future calculation of efficiency and autonomy in the driver).

Capacitive Buttons (IQS127D chip), illuminated with RGB LEDs individually controlled by the 8-bit PWM. (all DIY)
(color of the left button depending on battery power, and the right side as the front light mode selected)



Some img:

Heatsink for servers:












Driver with a dedicated box and sink .. the driver is inside the light and is
ventilated by two fans along with the LED's:






Testing the GPS module:












Some tests in the wild: 


























I know that the light is very ugly  

I would like to hear your opinions and ideas to improve the light. Or ideas to add new functions to the software.

Greetings.


----------



## funkymonkey1111 (Nov 3, 2011)

*Re: diy bike light with some special features*

i've got nothing to offer other than to say the beam looks great


----------



## PapaLumen (Nov 3, 2011)

*Re: diy bike light with some special features*

 :bow:


----------



## wquiles (Nov 3, 2011)

*Re: diy bike light with some special features*

Pretty awesome project


----------



## Hack On Wheels (Nov 4, 2011)

*Re: diy bike light with some special features*

Love it! Is there anything that it can't do?


----------



## jeffosborne (Nov 4, 2011)

*Re: diy bike light with some special features*

Holy smokes! Good work! And with so many features, you must have spent many hours designing and building this light system.
A question, are those Carclo optics, and are they a narrow beam or wide beam? Also, are they cool white emitters? And, what country are you in?

Salute!
Jeff


----------



## Foliveira_PT (Nov 5, 2011)

*Re: diy bike light with some special features*

jeffosborne, the light took about a year to be built, because I was to learn programming, and various other things about electronics.

These are CARCLO optics, I used different angles. Medium and tighter in the center, and wide at the tips. The copper base where are the LED's seem flat, but is slightly curved, so the LED does not all point in front.

I think the light distribution is not bad, but the coolest part is having about 110 watts of power running smoothly and completely controlled by a simple capacitive buttons. I did not use any connectors, relays or other mechanical device in all the light :thumbsup:

There are 16 xpg R5 and 4 xpg s2, all cool white.


I am from Portugal!


Thanks everyone for the comments


----------



## The_bad_Frag (Nov 5, 2011)

*Re: diy bike light with some special features*

Can you do some beamshots with your bike vs you carlights? It doesnt look like 110W of led light on the videos... I could be the camera that makes it so dark.


----------



## Foliveira_PT (Nov 5, 2011)

*Re: diy bike light with some special features*

A few more photos of the construction:













With the "old" friend (7 [email protected] max):






Total of 27 xp-g @ 1.6A!


----------



## Foliveira_PT (Nov 5, 2011)

*Re: diy bike light with some special features*



The_bad_Frag said:


> Can you do some beamshots with your bike vs you carlights? It doesnt look like 110W of led light on the videos... I could be the camera that makes it so dark.




In the LEDs maximum power is around 100W. But the entire system consumes about 110W.

Usually the cameras compensate automatically the sensitivity according to ambient light.

I'll try to make a video comparing with the car's lights.


Thanks for the comment :thumbsup:


----------



## recycler (Nov 6, 2011)

*Re: diy bike light with some special features*

Foliveira, you are off your'e trolly man, well done, that is indeed a nice setup, how long has it taken you to complete


----------



## ifor powell (Nov 7, 2011)

*Re: diy bike light with some special features*

That's a lot of light. Glad to see someone else working with speed based controll. I have had it on my home made systems for a couple of years now. Nothing like the light you have but plenaty for 24 hour racing and the speed based controll gets me about 2-3 times the battery life without having to think about it while racing.


----------



## Foliveira_PT (Nov 7, 2011)

Hi recycler, the light took about a year to be built.

Much of the time was to learn programming. The light functions are simple, but it was difficult for me because it was the first time I worked with a microcontroller. And I learned almost everything by internet, in forums like this:thumbsup:

But the light is still not completely finished, I am thinking to add new functions to the software, and some funny stuff on the screen as custom characters, and animations .. only for the system has a less "rigid" look.

I also thought of putting an SD card to store GPS tracks, I've seen people do it with similar microcontrollers.


----------



## Foliveira_PT (Nov 7, 2011)

Hi ifor powell, thanks for the comment.

I've been seeing pictures of your buildings. They are very cool:thumbsup:


Which method you use to do speed based light?


----------



## ifor powell (Nov 9, 2011)

For my speed based control. The lights have have had a made where they except a light level sent from my home made bike computer. Curent setup has a serial link for the bar light and an Ant based radio link for the helmet light. I use TaskLed drivers but reprogram them. Next version will be all Ant based. I have a 4XML bar light just waiting for the nessasary driver work but am curentrly working on a mobile App version of the bike computer, so no more of my dodgy soldering at that end.


----------



## chanjyj (Nov 9, 2011)

Fantastic build.


----------



## Foliveira_PT (Nov 10, 2011)

Hi ifor powell,

Do you have a topic about your home made bike computer? I would like to see it.

I have a Garmin Heart Rate and it works by ANT +.

It would be amazing if I can put a receiver ANT + and show up on the screen of my flashlight :naughty:


I searched the internet and found a project with an Ant sensor to receive the information from Garmin Heart Rate, but the code seemed very complicated.


You build your own code?


----------



## ifor powell (Nov 11, 2011)

Sorry no writup on the bike computer. Best I have are some pictures of version 1 and 2 at https://picasaweb.google.com/iforpowell/Bike_Computer?authuser=0&feat=directlink

You can get an Ant module from Sparkfun. Coding for Ant is a bit tricky but at least Ant now have the Ant+ specs more publicaly avalible than they did when I was doing it. You may want to check out Golden embeded which is an open source Ant data reciver project. http://chomsky.shampoo.ca/goldenembed/

Ifor


----------



## Foliveira_PT (Nov 12, 2011)

Thanks for the reply.

I saw the pictures of your projects, you must be expert in programming to do that! 

I'll buy a module Ant + and I will try to put it to work. It will be difficult because I have little knowledge of programming.

Thanks for your help!


----------



## Foliveira_PT (Nov 12, 2011)

Here are some pictures of a kind of comparison, car VS flashlight.

The car has 2xH7 lamps for medium and 2xH7 for maximum.

I turn on both, so they are 4 x H7(55w) Vs 20 xpg at 1.6A 



The camera is a Nikon p300 in manual mode, with 1/25 sec 1.8f.


At 4 meter from the wall:












At 12 meters from the gate:


----------



## The_bad_Frag (Nov 13, 2011)

That is awesome.  Thats some serious light for a bike. I dont think there is any other bike with more light.

I would install on each side of the light 1 XM-L with a mid-size reflector for more far light. 


...I think I need to ride my bike a bit more so I can upgrade my current led light on it.


----------



## ifor powell (Nov 13, 2011)

I think I would let you past if you came up behind me, I don't like riding in my own shadow... That is some realy serious light. I would not want to meet you coming the other way I hope you can dim it quickly.


----------



## chanjyj (Nov 13, 2011)

I'm just curious though. How's the battery life considering the number of things thrown in?


----------



## moderator007 (Nov 13, 2011)

Thats one awsome bike light. Great job Foliveira_PT. I wouldn't mind owning one of those myself.:thumbsup:


----------



## Foliveira_PT (Nov 14, 2011)

The_bad_Frag said:


> I would install on each side of the light 1 XM-L with a mid-size reflector for more far light.



Yep, I think I will add 2 led's xm-l with aspheric lenses and create a very tight focus with them to illuminate further :devil:


----------



## Foliveira_PT (Nov 14, 2011)

chanjyj said:


> I'm just curious though. How's the battery life considering the number of things thrown in?




My goal is build a powerful flashlight, but at the same time be possible to make real use of it.

So i take advantage of the bike have a very good place to put the battery .. the bottle :naughty:

The battery has 8 cells of 4.5A so are around 130w capacity.

All the electronic components turn on, consume less than 10W, even with the two fans at max speed.


Using the table consumption of xp-g, + 10% for losses and + 10w for peripherals. Autonomy must go around:

1 hour at 9500 lumen
3 hours at 5000 lumen
6 hours at 3000 lumen
13 hours at 1500 lumen


But I'll do a real test with the light at max power and see how long the battery can handle.


Thanks everyone for the comments!


----------



## Foliveira_PT (Nov 17, 2011)

Hi, just to add some more pictures in different lighting conditions and exposures.


1/8 sec. 1.8f.








1/2 sec. 1.8f.






1/2 sec 1.8f.






1/30 sec. 1.8f.







I realized that the focus is spreading a lot of light to the sides so i will change some of the medium lens by some tight :sick2: 


Greetings!


----------



## chanjyj (Nov 18, 2011)

WOAH! 

Are you willing to make and sell a custom light? No need for the extras, just the light only :devil:


----------



## Walterk (Nov 19, 2011)

Great ! 
'some special features'... man, this is way over my head


----------



## dmarti (Nov 19, 2011)

That is an awesome build. I am sure you could sell a few if you wanted to. Great work!


----------



## Bullzeyebill (Nov 19, 2011)

Have you considered the aiming of your light relative to auto's passing you and what they see in their rear view mirror? Aiming of vehicle headlights on the road is very important so that they do not hit the rear window of a vehicle, so the beam should be in the low beam category. Can you point the beam low enough while riding in traffic.

Bill


----------



## Foliveira_PT (Nov 21, 2011)

chanjyj said:


> WOAH!
> 
> Are you willing to make and sell a custom light? No need for the extras, just the light only :devil:





The light is very simple, just add 1Kg of copper, 20 Xp-g, a hiperboost driver and something that generate the PWM signal 


I would like to build lights for sell, but I'm limited in space and tools ..


----------



## Foliveira_PT (Nov 21, 2011)

Bullzeyebill said:


> Have you considered the aiming of your light relative to auto's passing you and what they see in their rear view mirror? Aiming of vehicle headlights on the road is very important so that they do not hit the rear window of a vehicle, so the beam should be in the low beam category. Can you point the beam low enough while riding in traffic.
> 
> Bill




On the road I put in low light of course!

The first two levels of light only turn on 12 led´s. And in the first level is only 100ma.


Most power only if where there is no people, or in the mountains


----------



## Foliveira_PT (Dec 17, 2011)

Hi, after a few rides it was evident that the flashlight was very flood light :duh2:


So I changed 10 medium carclo lens for 10 tight narrow. And added 3 xm-l with 28mm aspherical lenses producing a tight focus.

Now this is close to 120watt power and about 11k lumen :naughty:

It's still in testing phase so it look real bad.. but I was very happy with the result of the light focus change.


Some beamshots, all at 1/25 sec. f1.8.






Control:






12 meter from the gate:











4 meter from the wall:







Greetings!


----------



## 1 what (Dec 18, 2011)

I've just found this post!
Fantastic build!
Congratulations.


----------



## The_bad_Frag (Dec 18, 2011)

Now that is an awesome upgrade!


----------



## reehasmith (Dec 18, 2011)

Nice attractive designs. I like some designs because they looks professional.


----------



## Foliveira_PT (Mar 11, 2012)

Hi,

I have done some modifications on my flashlight and liked to hear your opinion.

I bought a touch screen 2.8 "and started to develop some code, I used an atmel 328 dedicated to control the LCD screen, and kept the atmel 2560 to control the rest of the system. So now the flashlight is "dualcore " 

For now only the 328 is capable of sending information for 2560, and not the reverse. I still have to implement the bidirectional i2c protocol.

I added also a mp4 player with FM transmitter, an audio amplifier and two speakers drawn from a portable PC.

For now the two screens running at the same time, but I'll remove the oldest.

I made a short video to demonstrate the system, please launch your opinions :thumbsup:


----------



## mat_the_cat (Mar 22, 2012)

Unbelievable! That is all. :thumbsup:


----------

