Arduino 8x8 LED Matrix

Discussion in 'The Projects Forum' started by Beanz1114, Nov 17, 2014.

  1. Beanz1114

    Thread Starter New Member

    Nov 13, 2014
    18
    0
    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
     
  2. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,766
    1,099
    You could replace each LED by this combo:-
    LampMatrixNode.gif
     
  3. Beanz1114

    Thread Starter New Member

    Nov 13, 2014
    18
    0
    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! :)
     
  4. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    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.
     
  5. Beanz1114

    Thread Starter New Member

    Nov 13, 2014
    18
    0
    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
     
  6. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,766
    1,099
    How about this? Only a 2x2 matrix shown, but can be extended
    LampMatrix.gif
     
    Sensacell and Beanz1114 like this.
  7. Beanz1114

    Thread Starter New Member

    Nov 13, 2014
    18
    0
    OMG Alec_t!! That works just perfect!
    Why didn't I think of that?
    Thanks a lot. I really appreciate it! :)
     
  8. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,766
    1,099
    You're welcome :).
     
  9. Beanz1114

    Thread Starter New Member

    Nov 13, 2014
    18
    0
    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?
     
  10. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,766
    1,099
    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!
     
    Beanz1114 likes this.
  11. Beanz1114

    Thread Starter New Member

    Nov 13, 2014
    18
    0
    That makes a lot of sense now that I think about it. Thanks again Alec! :)
     
Loading...