Sequential LED turn signal

I was wondering if it would be possible to make a sequential LED turn signal out of one LED strip. So when I activate left turn the LEDs light up right to left and right signal vice versa. Any input would be appreciated. Thanks!

Sure, just need a 'smart' LED strip (controller per LED, like WS2812, which is also RGB - see adafruit.com for neopixel), vs a 'dumb' LED strip where one pin controls on/off of the whole strip.

Cool. I've never messed with any arduino boards so I'm not sure what all I would have to do. My idea is to mount the flex strip to the rear fender of my motorcycle.

  1. Would all of the components be too bulky for a motorcycle?
  2. Would/could they be weather resistant?
  3. The strips say they are powered by 5vdc, but automotive systems are 12vdc. How would that work?

Hi?

  1. No. Have a look at Arduino Nano 3, Arduino Pro Mini (you will need a Usb-Serial adaptor) or ATtiny85 (you will need a programmer like USBasp).
  2. Some strips are weather resistant, some are not. Your other components will certainly need a weatherproof enclosure
  3. You need a 12V to 5V DC-DC convertor.

Paul

PaulRB:
Hi?

  1. No. Have a look at Arduino Nano 3, Arduino Pro Mini (you will need a Usb-Serial adaptor) or ATtiny85 (you will need a programmer like USBasp).
  2. Some strips are weather resistant, some are not. Your other components will certainly need a weatherproof enclosure
  3. You need a 12V to 5V DC-DC convertor.

Paul

Thanks Paul. I'll do some more research on the board.

So this is what I was thinking:

-arduino nano 3

-neopixel 60/meter LED strip

Plus the usb>serial cable which I assume it's for loading the code from computer to board?

And something like this for the 12>5vdc converter?Amazon.com

As well as the capacitor and resistors they recommend in the neopixel guide.

Any problems with this setup?

That DC converter will be able to run a strip of around 40~45 leds, plus the Nano. How long/how many leds were you going to use on the bike's strip?

Have you thought how you will pick up the signals from the turn indicators on the bike? Did you want to use the strip as a stop/brake light also? And as a reversing light (I know nothing about bikes. Do they even have reverse gear?)

PaulRB:
That DC converter will be able to run a strip of around 40~45 leds, plus the Nano. How long/how many leds were you going to use on the bike's strip?

Have you thought how you will pick up the signals from the turn indicators on the bike? Did you want to use the strip as a stop/brake light also? And as a reversing light (I know nothing about bikes. Do they even have reverse gear?)

The strip will only be about 12 inches long at most. The strip has 60/meter. So it will only have about 30 lights at the very most. Should be no problem. Those aren't the EXACT products in going to buy. Just getting together what components I need.

If I'm using the board I can bypass the flasher relays and go from the turn signal switch to the 5vdc converter to the board.

For now I just want to do the turn signals. No bikes don't have a reverse.

The only question I have is how will I seperate left and right turn? It is 2 wires coming off the turn signal switch, can I hook up a left wire to a terminal and have it run the left program and the right wire to another terminal for the right signal program? How does it work?

The Nano/Promini/whatever has 20 IO pins.
One pin reads left turn input, another for right turn, third for brakes.
Making the left to right sequence, or right to left sequence, or all on/all off for brakes, is fairly simple software program.

void loop(){
if (digitalRead(leftPin) == HIGH){
// right to left turn sequence
}
if (digitalRead(rightPin) == HIGH){
//left to right turn sequence
}
if (digitalRead(brakePin) == HIGH){
// all on sequence
}

and expand from there.
Example, if turning, and brakes are applied, do something different.
If brakes are on, and then turned off, do something different.
If brakes are on and turn is selected, do something different.
That's the fun part.

Awesome! Thanks both of you.

Another thing I was thinking, each wire coming from the turn signal switch is 12v. What would I need to do to drop both to 5v and keep the signals seperate? I guess I could put the converter before the switch? So everything fun the switch on is 5v

Just need 2 resistors to make a voltage divider for each input.
http://www.raltron.com/cust/tools/voltage_divider.asp
Or use a transistor for better isolation from 12-14V on the signal pins:

Most motorcycles do not have reverse (makes sense), but there are some that do, such as some Honda Goldwings.

That is true. A very select few do. But 99% do not. Mostly big heavy bastards too big to back up by pushing with your feet have reverse.

How about these? 144 leds per metre, double the brightness if you need to make your strip less than 12".

WS2812 use up to 60 mA per led. However, that maximum is only when displaying full brightness white. When yellow, the current will be only two thirds of that. Flashing patterns even less.

drz400dude:

Plus the USB>serial cable which I assume it's for loading the code from computer to board?

And something like this for the 12>5vdc converter?

So you do not need a Nano and a USB-TTL converter as the Nano has USB built in. What you do want instead is a Pro Mini and a USB-TTL converter as you only use that for (re-)programming and disconnect it after.

drz400dude:
If I'm using the board I can bypass the flasher relays and go from the turn signal switch to the 5vdc converter to the board.

Well, there a re a few tricks to this. In general, indicator circuits have the flasher in the power line to the turn signal switch which then switches it to either left or right indicators. The flasher only flashes when it has the current from the lamps passing through it. I am not sure whether you proposed "bypassing" the flasher entirely - which would be a problem if you still need to have lights visible from the front - or something else.

The other aspect is that you probably just want the 5V regulator to be fed power whenever the ignition is on, so it can do its job properly, not switched on and off as you might do by having diodes feeding it from each of the signal circuits (including stop) that might be implemented.

drz400dude:
For now I just want to do the turn signals. No bikes don't have a reverse.

I was going to comment on that, but others have done it to death.

drz400dude:
The only question I have is how will I separate left and right turn? It is 2 wires coming off the turn signal switch, can I hook up a left wire to a terminal and have it run the left program and the right wire to another terminal for the right signal program? How does it work?

So given that you still have lights visible at least at the front and this is only in addition to the normal indicators, you feed power continuously from the ignition circuit and sense each of the left and right turn signals, and the stop signal, with separate lines via the voltage dividers mentioned.

Note that turn indicators - flashers - always work that the moment the switch is closed, the light starts by being on then turns off after a delay and so on. The reason it works this way should be obvious, but you might wish to take that into account in your program - perhaps half the display lights, then "wipes off" in the direction indicated before it proceeds with whatever other pattern. And since the signal will be flashing on and off, you have to determine what the maximum "off" time is before you can decide that the indication is actually stopped.

Are there any boards that are 12v? I feel like it'd be easier to keep the whole system 12 volts.

PaulRB:
How about these? 144 leds per metre, double the brightness if you need to make your strip less than 12".

WS2812 use up to 60 mA per led. However, that maximum is only when displaying full brightness white. When yellow, the current will be only two thirds of that. Flashing patterns even less.

I looked on amazon and the 2 reviews both said they do not have the solder pads for cutting and resoldering. I guess as long as I'm just trimming it to length and not extending I'll be ok.

drz400dude:
Are there any boards that are 12v? I feel like it'd be easier to keep the whole system 12 volts.

I don't think so, sorry. In fact, things are going the other way, with 3.3V replacing 5V.