DIY tail light- Mtbr.com
Results 1 to 17 of 17

Thread: DIY tail light

  1. #1

    Reputation:
    Join Date
    Mar 2009
    Posts
    16

    DIY tail light

    Hey everyone - this is my first post, so please forgive me if I commit a MTBR Lighting forum faux-pas. I'm writing this thread more or less as a project log of my attempts to build a first class rear blinker light. Before I started building, I read about achesalot's 1inch aluminum tube housings, and decided to go from there. I ordered two Luxeon III red LEDs and 80x10 flare optics from ledsupply.com, and found two 18650 A123 LiFe cells from a cordless tool battery pack on clearance at Lowes. Attaching the lights and lenses to the 1inch aluminum tubing was pretty straightforward. I then started constructing my driver.

    I decided to go with a LM3405 for the driver, which is a constant current 1A LED driver IC - basically an integrated current programmed buck converter controller and MOSFET on a chip. The circuit was pretty easy to implement, save soldering the tiny SOT-23 package. However, when I tested the circuit, I found that the LED was only drawing 250mA. Attempts to debug this circuit have been fruitless. I think I'm just going to build a schmitt trigger based controller and use a discrete NMOS switch; it'll be much easier to debug than the LM3405 IC. Also, with an appropriately sized FET and components, I'll be able to push each LED up to the full 1400mA that they're rated for. I'll update this thread when I get the driver working. Attached image is of the LM3405 based driver on a breadboard and the LED+housing
    Attached Images Attached Images

  2. #2
    mtbr member
    Reputation: znomit's Avatar
    Join Date
    Dec 2007
    Posts
    1,980
    Quote Originally Posted by shinkansen
    ...I found that the LED was only drawing 250mA....
    Isn't 250mA plenty?

  3. #3

    Reputation:
    Join Date
    Mar 2009
    Posts
    16
    Quote Originally Posted by znomit
    Isn't 250mA plenty?
    It's indicative that the circuit isn't operating as expected. I'd rather have something that I know is working properly than something that works well enough now and might fail later. To answer your question, I have no idea if 250mA is enough. Is there any reason I shouldn't push the lights up to the maximum rated drive current if I run them at a low duty cycle?

  4. #4
    Lets RIDE!
    Reputation: Jim Z in VT's Avatar
    Join Date
    Sep 2007
    Posts
    1,548
    I'm mostly ignorant when it comes to anything more than simple electronics, but you might be interested in these two threads, here and here (the driver part of this one start half way down page 2). Neither are tail lights, but both are home-brewed circuits with flashing modes.

    I have a couple of the red/orange Lux IIIs sitting on my workbench. Driven at 1000 or 1400mA, they're really bright....190 lumens I think.

    JZ
    It's not about speed, it's about lack of control.

  5. #5
    www.hahntronix.com
    Reputation: mhahn@hvc.rr.com's Avatar
    Join Date
    Mar 2007
    Posts
    252
    shinkansen,

    How experienced are you at developing electronics? I just ask because getting one of these buck circuits to work has lots of traps for the uneducated. I've played around with the LM3404 (almost the same chip) and will share some of my educational experiences:

    Bypass everything, everywhere. Bypass means put a cap from the positive side of the supply to the negative side. Do this as close to the LM3405 as you can. I usually use .1 uF caps to do bypassing. Anything from .01 to 1 will work. Use ceramic caps.

    Add a huge electrolytic (100 uF) or tantalum cap across the power supply lines, close the the LM3405.

    Your power supply voltage should be at least 2 volts higher than the LED forward voltage at the current you want to drive it at. If you're trying to drive a diode with a 3.7 V forward voltage from a 3.7 volts LiIon cell, you'll be disappointed. If you are using 2 LiIon cells in series (7.4 volts), that should work.

    What are you using as an inductor? If it's the black tube stuck up in the air, between the two smaller green cubes, it looks kind of small. Start with a big beefy inductor that can handle several amps of current (called saturation current) and has a low resistance (less than .25 ohms). Once your circuit works, you can try different sized inductors.

    Be sure your current sense resistor is not a wirewound type. Wirewound resistors have an inherent inductance, which messes up what your circuit is trying to do. I usually use surface mount chip resistors. Use a resistor that has a wattage rating 4 or more times greater than the power you expect to run thru it. If you use a .2 ohm resistor and run 1 amp thru it, it will need to be able to dissipate .2 watts. I'd use a 1 watt resistor. A 1/2 watt one will get pretty hot.

    Use a "stiff" power supply, one with low internal resistance. At high currents the internal resistance of a power source limits the voltage available to drive the LED. NiCd or NiMh batteries work pretty well, they have very low internal resistance. Use ones rated at 2000 mAH or higher.

    Start with a circuit that is as close to an exact copy of one of the examples in the data sheet.

    It really helps to have an oscilloscope to check how the circuit is working. How did you measure the current thru the LED? A multimeter will usually give a bogus reading. Does the LED get hot to the touch after less than a minute. If it does, you're probably pumping more than 200 mA thru it.

    Check, and recheck your circuit. I like to use an highlighter pen to color every line in a schematic as I check it against my prototype with an ohm-meter.

    Designing your own driver takes time, don't get frustrated. If you get really frustrated, buy the eval board. For $40 you can see how National did it.

    Designing your own driver will always cost more than buying a pre-built one. If you only want one, it's probably not worth the effort.

    I apologize if I sound condescending. It's hard to gauge someone's experience from a couple of posts.

    Good luck,

    Mark

  6. #6

    Reputation:
    Join Date
    Mar 2009
    Posts
    16
    Thanks for the tips, Mark. I have some experience designing circuits, but I've never actually built a switch-mode converter before. I'll try and fill you in on what I've done, for the purpose of being informative -

    -The inductor is rather small, at 10uH with 1.62A rated current. Probably going to replace that for the new driver. The green things are 1uF 63V caps; I have some with lower voltage rating that I intend to use for the final design. For that circuit, the schematic diagram is just from the appnotes for the IC, with an external 5V supply to charge the bootstrap capacitor (I have a 5V rail anyway for my uC, so I figured I may as well have used that)

    -My supply is around 6.6V, coming from two of the LiFe cells in series. this battery chemistry can do over 30A continuous discharge, so current should be no problem for the supply. Each cell is rated at 1100mAh.

    -My current sense resistor is 3W 0.200 ohm. The datasheet specifies it as "low inductance, non-inductive below 0.25 ohms).

    -I do wish I had a scope! Would be very useful for seeing what's going on in the converter. I did use a multimeter to measure the current through the LED; I've biased the LED with a power supply to 1A and it's much brighter using the power supply than with the driver circuit, so I think that the results from the multimeter are at least in the ballpark. Also, the LED doesn't get hot at all. Designing my own converter from the ground up seems easier to me, I'll have the analog inputs on my uC for debugging purposes, and by nature of the process I'll have a better idea of how the circuit behaves. It'll also probably save board space if I use a buck-boost topology and just drive both LEDs in series, which will cut the number of passive components in half.

    Again, thank you for the tips. I'm having a lot of fun with this project, hopefully I'll be able to get driver working soon.

  7. #7
    mtbr member
    Reputation:
    Join Date
    Apr 2008
    Posts
    105
    I have a tail light project in progress. Here is the curent version.

    <table style="width:auto;"><tr><td><a href="https://picasaweb.google.co.uk/lh/photo/vCWV5QbtjGcDp_uOsOnf_w?feat=embedwebsite"><img src="https://lh4.ggpht.com/_CFBbJM0CWfE/SZhhoCRHYoI/AAAAAAAAGqk/maR661PQHaw/s400/P1020800.JPG" /></a></td></tr><tr><td style="font-family:arial,sans-serif; font-size:11px; text-align:right">From <a href="https://picasaweb.google.co.uk/iforpowell/TailLight?feat=embedwebsite">tail light</a></td></tr></table>

    It's two red Crees driven linear style controlled by an AVR based off this tutorial. I can run each led at up to 500ma but that is very bright with the diffuse and oval optis I have at present. I would possibly use it like this in fog in the day but at night I think it's bright enough with just 150-200 ma. I have just got a flare optic so will at some point get around to reworking the casing and geting everything nicly intergrated.

    I have a breadboard setup with an LM2675 based buck circuite. I had quite a bit of trouble getting it working over a decent range of input voltages, it all started behaving better when I reduced the some of the wire lengths I had. I have stoped working along this line for now untill I am ready to do a proper PCB rather than just stripboard style. It's easier for me to get TaskLed drivers and re-program them for my needs.

    Ifor

  8. #8
    www.hahntronix.com
    Reputation: mhahn@hvc.rr.com's Avatar
    Join Date
    Mar 2007
    Posts
    252
    shinkansen,

    I've been down the "roll your own" route before. It's not that easy (though it seems like it should be).

    If you run only off batteries, and nothing else runs off the batteries (like a headlight), you'll probably be OK using an average of the current thru your current sense resistor. I'd filter it thru at least a RC low pass filter. And you will want to do some kind of averaging in software. If you have the room, you might want to use an op-amp filter.

    If you go the buck only route you want to look at using a p channel mosfet, or else you'll need a high frequency high-side driver to supply the voltage (and current pulse) needed by a n channel mosfet. Buck is typically more efficient than buck-boost.

    If you go buck-boost (with an n channel mosfet), you'll need some heavy filtering of the current sense signal, since it only senses current while the mosfet is on. You won't be able to directly measure the LED current just by sensing the voltage drop across your current sense resistor, so you'll have to lower your drive current to allow for component tolerances.

    You can use a high-side current sense amplifier (in either mode), but make sure it has decent bandwidth, and figure out some way to low pass filter the output.

    All the filtering is necessary because of the noise the inductor injects into the circuit when you switch it off. If you looked at your circuit with a scope, you'd understand what I mean. Data sheets for LED drivers usually don't show the wild gyrations the inductors output voltage do when you stop driving it. Most chips have some sort of time delay to allow them to ignore this noise. That's hard to do with a micro unless you use a really big inductor (or very fast micro).

    But hey, don't let me talk you out of it. You might find a clever solution that I missed. I'm mostly a software engineer, though I have a degree in electrical engineering. I'm not a switched power expert.

    Mark

  9. #9

    Reputation:
    Join Date
    Mar 2009
    Posts
    16
    Been busy lately with other things, but I decided to put the old driver circuit on a breadboard and see if it would work - sure enough, the LED output voltage was 2.68V, which is about 1A according to the lux3 datasheet. I guess the parasitics in the protoboard I had it on earlier were screwing up the control. I think I'm going use a pair of these for the LED drivers because they have very small inductors which will be good for blinking. Next step is to build the battery charger.
    Attached Images Attached Images

  10. #10
    Randomhead
    Reputation:
    Join Date
    Sep 2008
    Posts
    1,183
    Nice job. Thanks for sharing, I'm going to get some of those optics.

  11. #11
    mtbr member
    Reputation:
    Join Date
    May 2008
    Posts
    37
    how are you going to make it red?
    I have been thinking about turning an 801 flashlight from DX into a tail light

  12. #12
    Randomhead
    Reputation:
    Join Date
    Sep 2008
    Posts
    1,183
    I'm going to make it red by using red leds from DX. They sell Cree XRE in red.

  13. #13
    mtbr member
    Reputation:
    Join Date
    May 2008
    Posts
    37
    Quote Originally Posted by unterhausen
    I'm going to make it red by using red leds from DX. They sell Cree XRE in red.
    Cool, this is the only one I can find, is there a brighter one?
    http://www.dealextreme.com/details.dx/sku.1776

  14. #14
    Randomhead
    Reputation:
    Join Date
    Sep 2008
    Posts
    1,183
    that's the one. Red LEDs don't get as bright as the white ones. In case it's not bright enough, I have 3, but it's very bright in my testing. Since we don't know exactly which LED that is, I'm not sure how much brighter you can get.

  15. #15
    mtbr member
    Reputation: yetibetty's Avatar
    Join Date
    Dec 2007
    Posts
    1,781
    Quote Originally Posted by unterhausen
    that's the one. Red LEDs don't get as bright as the white ones. In case it's not bright enough, I have 3, but it's very bright in my testing. Since we don't know exactly which LED that is, I'm not sure how much brighter you can get.
    I bought 2 of those and can tell you that they should be bright enough. But if you want to go silly bright then Luxeon have one, it requires quite a bit of current though.

    http://www.ledsupply.com/lxk2-pd12-r00.php

  16. #16

    Reputation:
    Join Date
    Mar 2009
    Posts
    16
    I'm using two of these -

    http://www.ledsupply.com/lxhl-ld3c.php

    At 140 Lumens each, they should serve their purpose.

  17. #17
    Lets RIDE!
    Reputation: Jim Z in VT's Avatar
    Join Date
    Sep 2007
    Posts
    1,548
    Quote Originally Posted by shinkansen
    I'm using two of these -

    http://www.ledsupply.com/lxhl-ld3c.php

    At 140 Lumens each, they should serve their purpose.
    That's the brightest red single led I've heard about. (there is a red EndorStar triple rated 195 lumen). If red/orange is OK, this one can put out as much as 190 lumen.

    You can drive with one of these DX drivers for close to max output (if the narrow Vin range suits your needs). But they're plenty bright running off a 1A buckpuck, and gives you more battery options.

    JZ
    It's not about speed, it's about lack of control.

Members who have read this thread: 0

Posting Permissions

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

THE SITE

ABOUT MTBR

VISIT US AT

© Copyright 2020 VerticalScope Inc. All rights reserved.