Forgot your password?
typodupeerror
User Journal

Journal Alioth's Journal: [avr] The Luxeon Ray-o-Death is ready... 9

I've finished the enclosure for the Luxeon Ray-o-Death enough that I can try it out tomorrow (mainly to see how well the little sealed lead acid battery does). I still need to waterproof it (a temporary job can be done with a clear plastic bag).

I'll take a few pics later. (I may make a little project web page for it, in case someone else who's been knocked off by a car in broad daylight on a straight road with good visibility feels like they'd benefit from this).

In the meantime, the source code to the program that runs it is here:

http://www.alioth.net/tmp/bike.c

There are a few improvements that can be made to it, but it's late, the code does what it's supposed to, so it'll do for now :-) In any case, it compiles a binary that's well under 1K long.

But basically, it controls the three banks of LEDs. There are two PWM channels (which control 2 of the banks), and the last bank is just connected to an output pin and is only used during flashes. There are two buttons as well, one is to select flash mode or steady mode, the other controls the base brightness (so, for instance, on a foggy day, I can press the brightness button a couple of times to up the power of the steady state). The buttons are 'active low' (they just ground out its input pin, which is normally pulled high by the AVR's internal pull up resistor), and the action happens when the button is released, basically the simplest strategy for software debounce (when buttons are pressed or released, they tend not to cleanly turn on and turn off, there's bounce noise especially on button release. You can fix this in hardware, but to keep the component count down, I debounce the button presses in software).

This discussion has been archived. No new comments can be posted.

[avr] The Luxeon Ray-o-Death is ready...

Comments Filter:
  • Namely, explanation of what it's doing and some pics, coz I've had more than my share of car interactions, but having found this on Firehose, I'm not exactly sure what you're doing from this one journal entry.
    • You forgot to say "please".

      Also, don't forget to say "thank you" afterwards.

      HTH
    • by Alioth ( 221270 )
      Basically, it's just a fancy light that's powerful enough to be obvious even in bright sunshine (you can probably find a few more JEs about it if you look back a few entries). It has two modes, steady (for night use) and flashing (which has a very bright flash) for daytime use. The flash is meant to catch the peripheral vision of drivers who perhaps are distracted while fiddling with their radio (and get them to look up), as well as make drivers with defective vision realise that the blobby blur in amongst
      • That's *neat*. I'll dig through your journal. I've thought about building something similar for a while, but am always happy to stand on someone else's shoulders. Hopefully this didn't come from too many actual accidents.
        • by Alioth ( 221270 )
          It came from this one in particular:

          http://slashdot.org/~Alioth/journal/176493 [slashdot.org]

          My initial thoughts was to use a set of LEDs to provide the steady light and a strobe for the flash. However, the Luxeons are bright enough on their own and it means no mucking around with 6,000 volts. Each LED is 1 watt, and the flash pattern includes one flash with all 6 lit up. Testing it on myself from about 60 feet away showed that it was very noticable in the peripheral vision (like when a driver is looking down at his car s
          • Yow. Glad you came out okay.
            I really like what you're doing. My day job is designing test systems for driver circuitry for ultrabright LED's. If there's any way I could help you with what you're doing, I'd love to. I don't guarantee that I *will* be any help, but I know people who can.
            • by Alioth ( 221270 )
              That's good to know :-)

              You may have noticed that there really isn't a lot in the way of driver circuitry here (short of the AVR's two PWMs to set the brightness). I don't have much experience with LEDs (other than just using little ones with a current limiting resistor as indicator lights) and was slightly surprised to find that two in series would draw slightly less than nominal current when connected directly to a 6v sealed lead acid battery - about 300mA, the nominal current in the datasheet being 350mA
              • I was exploring/finding the same thing, before we started working on LED's at work: that stacking them in series really helps minimize what you have to do for current-limiting and power requirements. One thing that most people don't know about LED's is that they're *hot*. They don't radiate any IR, but they conduct lots and lots of heat, so they need enormous heatsinks if they're producing reasonable amounts of light. A reasonable estimate is that 70% of the power you put into an ultrabright LED is going

Surprise your boss. Get to work on time.

Working...