LED sequencing

Hi all,

I want to create a circuit that is able to store multiple profiles of different LED sequences/configurations. As I'm completely new to this (Recommended to this by a technician at university), I've no idea what components I'd need to be able to create a circuit that can do this. The LEDs i've been supplied with will be powered by a 12V battery.

Also I've minimal coding skills, so anywhere I can try and learn for myself how to code the LED sequences and profiles?


You will find loads of similar projects on here if the search option is working and people will willingly give you ideas and help if you describe the problems/needs and supply the relevant information. So questions that first come to mind are...
Do you have a datasheet for your LED's.

How many LED's are we talking about for the sequence.

How do you switch profiles and do they switch instantly or at end of sequence.

Thanks for your reply.

It doesn't need to be anything complicated since I just need a prototype for an experiment. It's a test to see whether certain lighting effects can make a motorbike more easily detected, thus decreasing chance of an accident.

As I don't know what you mean by a datasheet for my LEDs, I probably dont have that.

I have 16 LEDs to play with at the moment, but will be paired up to help raise the intensity. The LEDs are supplied by RS Components, the automotive 12V festoon lamp and holder.

I was initially thinking of just using a switch that goes: On -> Setting 1 -> Setting 2 -> Setting 3 -> Off ->
It would not be a problem for the profiles to switch instantly or at the end of the sequence. I would probably opt for the simplest code to save time.

Hi, what current does each festoon led draw, and how many lit at any instant? I think I would wire 16 Arduino outputs (would have to use analog input pins as outputs) to 2 x uln2803 chips to drive the festoon leds. If that uses too many pins, use 2 tpic6c595. This is assuming the current is less than 150 mA per led module.


The LEDs are supplied by RS Components, the automotive 12V festoon lamp and holder.

Can you supply the RS part number?

part number is LE-0503-03W and it draws 20mA according to their website.

Right, we have the details for the LED's.
They are 12V with an internal 450ohm resistor for current limiting so as PaulRB suggests you could use a Darlington array like the ULN2803 but this depends on how many LED's your driving (from what you have written before it looks like 8 ports with 2x leds per port.

yes. 8 ports, with 2 leds per port. would using the ULN2803 be fine ?

Yes, 40mA per port, 320mA total, is well within the uln2803's maximum current.


For software you can probably modify the MultiBlink example that is in my code repository (link below). Different sequences can be stored as program data.

Use TPIC6B595 shift register to sink current from the pairs, or use two and drive all individually.

Make an array with your pattern and shift it out, with 1 = on:

byte patternArray[] = {
// time to send out next pattern?
x = x+1;
if (x==8){x=0;} // reset to top of pattern
digitalWrite (ssPin, LOW); // connect to RCLK
SPI.transter (patternArray[x]); // SCK connect to SRCLK, MOSI to Ser Data it
digitalWrite (ssPin, HIGH); // outputs change on this rising edge

Thanks everyone! I've ordered the parts I needed and will crack on with the coding!

Thanks for all your help, I appreciate it.