# DIY bike light



## scar (Jun 2, 2005)

That is crazy!

What, no optics or reflectors used on the LED's? Would like to see a picture of the light mounted on the bike without being lit up.




****


----------



## Foliveira_pt (Oct 30, 2009)

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 components:

20 x Cree XP-G
https://www.led-tech.de/de/High-Power...3_120_138.html
Microcontroller: Atmel 2560 ( with Arduino bootloader)
MegaMini Atmega2560 Arduino Compatible
Driver Hyperboost (modified to 1.6A max.)
Hyperboost Technical
EM-406A GPS Receiver SiRF star III
20 Channel EM-406A SiRF III Receiver with Antenna - SparkFun Electronics
2 batteries 4s 4500ma
HobbyKing Page not found.
2x 30x30mm Fan Sunon maglev
XSFans.com PC Parts & Cooling
2x current sensors:
ACS712 Breakout - SparkFun Electronics
16x2 character LCD
Basic 16x2 Character LCD - White on Black 5V - SparkFun Electronics
A humidity sensor
Humidity Sensor - HIH-4030 Breakout - SparkFun Electronics
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:










The massive battery pack:










Some tests in the wild:





































luz teste 2 - YouTube

luz testando - YouTube

I know that the light is very ugly

I would like to hear your opinions or ideas to make the system better. Or ideas to add new functions to the software.

Greetings.


----------



## bravellir (Nov 24, 2008)

Thats it's mad 
Are you feeding 1,6A to all the xpgs? 80 ma to each? How is it wired? 

I like the integration of the arduino and gps module a LOT. That opens up all sort of possibilities.. Nice work.


----------



## BKruahnndon (Jul 17, 2009)

bravellir said:


> Thats it's mad
> Are you feeding 1,6A to all the xpgs? 80 ma to each? How is it wired?
> 
> I like the integration of the arduino and gps module a LOT. That opens up all sort of possibilities.. Nice work.


the hyperboost driver means all 20 leds are likely in series and each can see 1.6a.

The gps speed-modulated light is a cool idea, but doesnt that make it kind of a passive system? ie you're required to go faster to get more light? or did i totally miss that one?

Nice work on the ducting for airflow, but get some covers on it right away!
Give pics of it lighting up the trail!


----------



## mfj197 (Jan 28, 2011)

bravellir said:


> Thats it's mad
> Are you feeding 1,6A to all the xpgs? 80 ma to each? How is it wired?
> 
> I like the integration of the arduino and gps module a LOT. That opens up all sort of possibilities.. Nice work.


The hyperboost will output up to 80v so it could drive all the XP-Gs in series, so each one would be seeing the full 1.6A. That would make this light capable of what - something approaching 10,000 lumens!?


----------



## Foliveira_pt (Oct 30, 2009)

scar said:


> That is crazy!
> 
> What, no optics or reflectors used on the LED's?


I used CARCLO optics with 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.

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


----------



## Foliveira_pt (Oct 30, 2009)

bravellir said:


> Are you feeding 1,6A to all the xpgs? 80 ma to each?


Olha, tas a gozar? :madmax:

The 20 LEDs are connected in series, but I put a mosfet in the middle of the series, controlled by the uC.

So I can choose to activate all 20 LEDs or just 12.

For now the first 2 levels of light 12 LEDs are turn on, and de other 2 levels turn 20 led´s on.

You can see that in the minute 1:15 of this video:

O Meu Filme - YouTube


----------



## Foliveira_pt (Oct 30, 2009)

BKruahnndon said:


> The gps speed-modulated light is a cool idea, but doesnt that make it kind of a passive system? ie you're required to go faster to get more light? or did i totally miss that one?


The "automatic light level" is only one mode of light that I can select. This mode will make a slight adjustment depending on the speed of the bike, and the amount of ambient light.

The best part is the light switch to the minimum when I stop, and return to the selected mode when I move. 

But this is something that I still have to program. At the moment the light modes are constant.

:thumbsup:


----------



## Foliveira_pt (Oct 30, 2009)

mfj197 said:


> The hyperboost will output up to 80v so it could drive all the XP-Gs in series, so each one would be seeing the full 1.6A. That would make this light capable of what - something approaching 10,000 lumens!?


Table values for the LED's emit around 9.5k lumen. But considering the losses in the lenses and the temperature, maybe around 8k OTF lumen.

It's one thing I was thinking .. if I can put a function like: "real time OTF lumen calculation " 

Based on current, temperature and efficiency of the lens, it may be possible to make a mathematical formula and put in the uC.

Any idea how to make the formula?


----------



## bigbbs (Feb 12, 2011)

That's freakin insane, I'm still trying to figure out how to build my first one


----------



## bravellir (Nov 24, 2008)

No, it was not a joke. I was thinking buck instead of boost, that’s why I got all confused.

As an add-on, why not put a small red led in the back of the bike and lit it up when you brake?


----------



## Foliveira_pt (Oct 30, 2009)

Bravellir, it would be interesting 

But it's hard to put the backlight to turn on when I brake.

The GPS module calculates the position only once per second, so to detect the deceleration of the bike takes a long time...

But I think maybe I can use an accelerometer :thumbsup:

Some more photos of the construction:



















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










Total of 27 xp-g @ 1.6A :madmax:


----------



## mfj197 (Jan 28, 2011)

Foliveira_pt said:


> Bravellir, it would be interesting
> 
> But it's hard to put the backlight to turn on when I brake.
> 
> ...


How about simply using a switch on the brake system somewhere?

Thanks for the pics. It certainly is an insane light.


----------



## uncle_bob (Jul 26, 2010)

You could use a momentary off switch (normally on) attached to the brake lever, But where will it end a toggle on off on switch to control left and right indicators?


----------



## Foliveira_pt (Oct 30, 2009)

Yes, put a switch in the brakes should work. But I think an accelerometer is a lot cooler 


I'm thinking in buil a back light completely sealed and rechargeable by induction on my Powermat :thumbsup:


----------



## tekkamaki (Mar 3, 2007)

You guys have come a long way from the MR16 halogens that many of us still run : )


----------



## Foliveira_pt (Oct 30, 2009)

Here are some pictures 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 :lol:

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

At 4 meter from the wall:



















At 12 meter from the gate:




























Led win!


----------



## uncle_bob (Jul 26, 2010)

And there is no point doing DIY unless it's cool


----------



## Foliveira_pt (Oct 30, 2009)

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 

Greetings!


----------



## Drkknt05 (Mar 29, 2011)

Love this


----------



## sergio_pt (Jan 29, 2007)

Insane lights.:thumbsup:
TUGA POWER


----------



## joel787 (Nov 21, 2011)

damn that **** is BRIGHT!


----------



## phburns (Sep 30, 2008)

An amazing amount of light, Love it!:thumbsup:


----------



## was8v (Apr 27, 2005)

This is insane! Theres some serious firepower here...


----------



## Foliveira_pt (Oct 30, 2009)

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:

lcd test - YouTube


----------



## klynk (Apr 18, 2010)

Wicked amount of light.
IMHO, it'll be dangerous to use it on full power on the road - oncoming traffic get blinded 100% sure.


----------



## who_is_john_galt (Jan 9, 2010)

Foliveira_pt said:


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


Can it really transmit FM signals too? What do you broadcast?


----------



## kwkouki (Mar 10, 2012)

dood this is about as bright as the front of my jeep  very impressive *high5*


----------



## Foliveira_pt (Oct 30, 2009)

who_is_john_galt said:


> Can it really transmit FM signals too? What do you broadcast?


Hi,

This is a normal mp4 player, but has the function of transmitting FM signal to a radius of few meters.

I can turn off the internal amplifier, and listen music of the mp4, in another device with FM.


----------



## sandaz (Mar 22, 2012)

That's awesome!


----------



## Morwa (Jan 26, 2012)

Inovation....


----------

