SunwayLED
Results 1 to 13 of 13

Thread: Home made tail light for my bicycle.

  1. #1

    Default Home made tail light for my bicycle.

    Hi Guys,


    I want to share with you my experience in building a tail light for my bicycle.
    I live in Ukraine and I like to cycle to my work but commuting by bicycle is not really popular in here and we don't have bike lanes on roads. So, I have to ride on the public roads along with cars.
    I'm really concerned about my safety so I decided to build a really bright tail light. So, every car driver would notice me on the road.


    I wanted to build a small and compact tail light so I decided to use the case from the cheap Chinese tail light which I bough on DX (SKU:110252)
    The description to this light says that it has 3w led. It's obviously not true. I disassembled it and found out that it has 40mA forward current PLCC led.
    But the case was fine. It had the lens which perfectly matches with a 1W led on a star which I bought on ebay (1W red LED 40-45lm).


    To power the device I decided to use two 10440 Li-ion batteries connected in parallel. Each of the batteries is rated to 600mAh but the real capacity is around 300-350mAh. So the total capacity of two batteries is around 600hAh.
    DX SKU:974
    The batteries fitted the original battery holder perfectly. Only minor soldering was needed to connect them in parallel.


    To control the led I used the led driver board which I also bought on DX (SKU: 6190).
    It has Atmel Attiny13A microcontroller on board and that is great because I've had some experience in programming them.


    The led is rated for forward current 700mAh but the control board provided 1000mAh current. So I removed one of the 7135 chips to lower the output current.
    I also soldered an ISP programming connector to flash a new firmware.


    Here are some pictures of the process:
    The original board from the tail light

    The new control board

    Original schematic:

    Modified schematic:





    I decided to leave the programming connector for future firmware update.


    And glue it back.




    Main features of my firmware:
    - Two flashing modes. (I decided that flashing modes are more than enough for the bicycle light)
    - Low battery warning. Changes flashing mode and reduces led power to minimum.
    - Turn off at critical battery charge.
    - Check battery charge. Flashes one to five times depending on the battery charge.


    The source code is open and everybody is free to modify it.
    http://code.google.com/p/tail-light-attiny13a/


    The total cost of build is:
    Tail light case: $5.30
    Control board: $3.19
    Led: $2
    Batteries: $4.30
    Total: $ 14.79


    I understand that It just a little cheaper than the original Planet Superflash tail light. But mine has 1W led and the Planet has only 0.5W
    Also I got a satisfaction from building something with my hands and you can't put a price on that
    Unfortunately I don't have the original Planet light so I can't compare them. I can only say that my light is bright, very bright.

    Last edited by shein; 04-03-2012 at 01:45 AM. Reason: Source code link updated

  2. #2
    Moderator Kestrel's Avatar
    Join Date
    Oct 2007
    Location
    The Willamette valley, in Oregon
    Posts
    4,642

    Default Re: Home made tail light for my bicycle.

    Hello shein, welcome to CPF.

    Please edit your posts to remove the DX and ebay links, I replaced your first DX hyperlink with the DX SKU # as an example. Edit: Thanks.

    I have also moved your thread to the /Bicycle/ subforum where I believe it to be a better fit.

    Regards,
    Last edited by Kestrel; 04-02-2012 at 05:26 PM.
    In the past we have had a light which flickered, in the present we have a light which flames, and in the future there will be a light which shines over all the land and sea.
    - Winston Churchill

  3. #3
    Flashaholic* Steve K's Avatar
    Join Date
    Jun 2002
    Location
    Peoria, IL
    Posts
    1,891

    Default Re: Home made tail light for my bicycle.

    Nice work! It's always fun to modify a product and add your own bit of genius/madness.

    regards,
    Steve K.

  4. #4

    Default Re: Home made tail light for my bicycle.

    That's really cool. Nice to be able to reprogram an existing DX circuit. Can you upload your sourcecode elsewhere(maybe github.com)? The zip file that I downloaded contains an http server error.

    <b>Warning</b>: fclose(): supplied argument is not a valid stream resource

  5. #5

    Default Re: Home made tail light for my bicycle.

    Quote Originally Posted by tomgopher View Post
    That's really cool. Nice to be able to reprogram an existing DX circuit. Can you upload your sourcecode elsewhere(maybe github.com)? The zip file that I downloaded contains an http server error.

    <b>Warning</b>: fclose(): supplied argument is not a valid stream resource
    Thanks!

    I moved the source code to http://code.google.com/p/tail-light-attiny13a/
    So, there shouldn't be a problem accessing it.

  6. #6
    Flashaholic* Changchung's Avatar
    Join Date
    Oct 2005
    Location
    Where the night is too short...
    Posts
    2,084

    Default

    Very well done, I like it... Welcome to the CPF and thanks for share...


    SFMI4UT
    Zebralight Spark Princeton Inova Petzl Maglite Bushnell 4 XM-L MagMod and a lot of Cree XM-L Lights Nitecore i4 Intellicharger Intl-outdoor 3400 Panasonic 3100 Bare and protected Samsung 3000 Sanyo 2600
    Please, respect the planet, dont kill animals...

  7. #7
    Flashaholic* 1 what's Avatar
    Join Date
    Jul 2007
    Location
    Australia
    Posts
    617

    Default Re: Home made tail light for my bicycle.

    Hi Shein.
    Nice job.
    You'll find there are a few of us here at CPF who enjoy either designing or modifying bicycle taillights.
    Welcome to the "group".
    I especially enjoyed your reprogramme of the DX driver.

  8. #8

    Default Re: Home made tail light for my bicycle.

    Wow. That's great. Nice work! I've been working on an Attiny10-based flasher, which is kind of a pain because it has to be programmed in assembler, but it does come in a SOT23-5 format, which is nice and small. Out of curiosity, what IDE did you use to code the firmware for the Attiny13?

  9. #9

    Default Re: Home made tail light for my bicycle.

    Quote Originally Posted by minisystem View Post
    what IDE did you use to code the firmware for the Attiny13?
    To build the project I used WinAVR which uses gcc as a compiler.
    But to actually write the source code I used Microsoft Visual Studio because it's convenient for me.
    I've recently discovered a great IDE to develop a firmware for AVR. It's Atmel AVR Studio 5. It's free and it uses open source gcc compiler and avr-lib. So it's just like WinAVR but with a nice IDE and a great simulator.

  10. #10

    Default Re: Home made tail light for my bicycle.

    Yes, I've been using AVR Studio 5 as well. I'm just not a command line kind of guy, so the GUI makes things much easier for me.

  11. #11

    Default Re: Home made tail light for my bicycle.

    Nice light, great project.

    Here is the one I am running, and it is 95% close to the real Planet Bike Superflash Turbo/Blinky.. $4.00 with free shipping, on ebay..

    Is the one in red.. The other one is the real thing..











    That is a SUPERFLASH TURBO I am comparing it too. ($28) Yes, they are both only .5 watt. But, this light only cost me $4 shipped. Since this I have ordered about 10 of them. Outfitted all my helmets and putting two on a bike, and on my backpacks. They come to about 1/5th the price of the real thing, and in performance, they are 95% to the real thing...

    Just sayin...
    Last edited by cehowardGS; 05-09-2012 at 11:47 AM.
    71, Old, Dirty, and Fast. http://www.cehoward.net/1poster.jpg
    My daily warmup routine. http://www.cehoward.net/stclock.wmv

  12. #12

    Default Re: Home made tail light for my bicycle.

    Hi cehowardGS,
    nice tail light!
    have you measured the burn time?
    have you try to use it with two 10440 li-ion battery in parallel for best runtime?

    Quote Originally Posted by cehowardGS View Post
    Nice light, great project.

    Here is the one I am running, and it is 95% close to the real Planet Bike Superflash Turbo/Blinky.. $4.00 with free shipping, on ebay..

    Is the one in red.. The other one is the real thing..



    ...cut...





    That is a SUPERFLASH TURBO I am comparing it too. ($28) Yes, they are both only .5 watt. But, this light only cost me $4 shipped. Since this I have ordered about 10 of them. Outfitted all my helmets and putting two on a bike, and on my backpacks. They come to about 1/5th the price of the real thing, and in performance, they are 95% to the real thing...

    Just sayin...

  13. #13

    Default Re: Home made tail light for my bicycle.

    Quote Originally Posted by werto.palomin View Post
    Hi cehowardGS,
    nice tail light!
    have you measured the burn time?
    have you try to use it with two 10440 li-ion battery in parallel for best runtime?
    No, I have just been running rechargeable aaa batteries. I also run one on my helmet, and I carry spare batteries.. Sorry for the late reply too, just seeing this...
    71, Old, Dirty, and Fast. http://www.cehoward.net/1poster.jpg
    My daily warmup routine. http://www.cehoward.net/stclock.wmv

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •