Arduino 8x8 LED Matrix

Thread Starter

Beanz1114

Joined Nov 13, 2014
18
Hi guys... The figure shown below is an 8 by 8 LED Matrix I got off of the Arduino website. If I were to replace the LEDs with 12V lamps, how do I change the circuit? I know that the Arduino pins only output a maximum of 5V. My hunch is to use a total of 16 transistors to control the 8 rows and columns. I have tried several circuit connections but all have failed to work. If anyone could please draw the circuit for me or walk me through the process I'd really appreciate it.

Here's the 8 by 8 LED Matrix circuit...
rowColScan_schem.png
 

Thread Starter

Beanz1114

Joined Nov 13, 2014
18
Does that mean I'd have to have 64 combos? I was thinking of controlling the different rows and columns using different transistors. That way I'd have to use only 16 transistors. Thanks for the suggestion though! :)
 

takao21203

Joined Apr 28, 2012
3,702
You need P channel for the Anodes. If you use 12 volts, you need another transistor, or a voltage divider for level shifting. But yes only 8 each. Why lamps? You can use power LEDs. There are several new kinds, circular ones and small strips. You dont have to drive them with full power. With a dc/dc converter you can set voltage precisely, for instance to make them draw 1/4 of rated current.

Or you can drive the enable inputs of 8 current drivers with opto couplers, and the cathode rails with N-channel MOSFETs. Its not totally neccessary but thats the totally "professional" approach. Opto couplers dont cost much and are available as SMD too.
 

Thread Starter

Beanz1114

Joined Nov 13, 2014
18
Thanks for the input takao. That's what I had in mind. Do you think I can use P channel for anodes and N channel for cathodes? I did try this out using a simulator (Multisim) but the lamps won't turn on. I've attached the circuit below:-
The LEDs are in a 1 by 2 matrix. The input at the respective N and P channels determine which LEDs are lit up. I can't tell what's wrong with the circuit though.
It looks pretty good on paper.
rowcolumn2.PNG
 

Thread Starter

Beanz1114

Joined Nov 13, 2014
18
OMG Alec_t!! That works just perfect!
Why didn't I think of that?
Thanks a lot. I really appreciate it! :)
Ohh before that. Can you walk me through the logic again? I can see the why you use the MOSFETs but I'm not too sure about the NPN BJTs. Would the circuit still work without them?
 

Alec_t

Joined Sep 17, 2013
12,477
Each NPN BJT acts as a level shifter, so that you can drive the base with 5V (or 3.3V) from a micro but switch a P-MOSFET gate from 12V to ground. Without the BJT there would be 12V trying to drive the 5V micro output pin!
 
Top