Hooking up 12v LEDs to an arduino uno

I am hoping to use an arduino uno to drive 2 12 volt seven segment common anode LED displays. The displays will be used as a counter. How can I get these LEDs to work with the arduino board? The most I seem to be able to output from the board is around 5 volts.

Put an NPN transistor between Cathode and Ground. Use the Arduino to turn the transistor ON and OFF.

Google: Arduino Transistor

If you need to multiplex the two digits you can use a small NPN transistor to switch a PNP transistor between +12 and the common Anode. Use a resistor to bias the PNP base to +12 (off) and use an NPN between the PNP base and Ground to switch the PNP on.

Use two TPIC6B595 shift registers to sink the current from the segments.
Daisy chain them so 3 pins can be used to control the 14 segments.

CrossRoads:
Use two TPIC6B595 shift registers to sink the current from the segments.
Daisy chain them so 3 pins can be used to control the 14 segments.

Well... yeh. If you want to do it the EASY way. :slight_smile:

Well, there's easy, and there's masochism 8)

CrossRoads:
Use two TPIC6B595 shift registers to sink the current from the segments.
Daisy chain them so 3 pins can be used to control the 14 segments.

can you explain a little more how you do this?

You do this:-

but use a TPIC6B595 in place of the one they use.

Connect one end of the LED strip to the +12V and the other end to the TPIC6B595's output pins.
Also connect the ground of the 12V supply to the ground of the arduino.

Here's how I'd do it.
The LEDs represent your LED strips with built-in current limit resistors.
Connect all the power supply grounds as Mike says.

  • on LED strip goes to +12V, - on LED strip goes to the shift register output.
    Shifting in a 1 makes the output go low and turn on the strip.

I prefer using SPI to send data out.
In this example they are daisy chained, so:

digitalWrite (ssPin, LOW);
SPI.transfer(byte1);
SPI.transfer(byte2;
digitalWrite (ssPin, HIGH);

Just that simple.
byte1 could be replaced with an array and a variable number if you want to control the strings that way, from position 0 in the array up to however many elements you have.

byte fontArray[] = {
B00111111, // 0 Bit 0 = segment A, 1 = B, 2 = C, 3 = D, 4 = E, 5 = F, 6 = G, 7 not used
B00000110, // 1 a
B01011011, // 2 f b
B01001111, // 3 g
: etc for 4,5,6,7,8 e c
: d
:
B01101111, // 9
}

thus:
digitalWrite (ssPin, LOW);
SPI.transfer(fontArray[byte1]);
SPI.transfer(fontArray[byte2]);
digitalWrite (ssPin, HIGH);

to make digits from LED strips. byte1, byte2 then are numbers from 0 to 9, or whatever pattern you want to define in fontArray
(or patternArrray, whatever you want to call it)

Hi

As you have got all the LEDs in can you program the chips to make the LEDs flash?

No, the Arduino would control the flashing in the sketch.
You can control the output enable pin to make all the segments flash together,
or you shift out patterns that have selected segments turned on & off to make them flash.
The TPIC6B595's onliy do what they are told, there is no intelligence there.