Re: [Lightuino] Digest for toasted-circuits-lightuino@googlegroups.com - 2 Messages in 1 Topic

8 views
Skip to first unread message

Mauricio Gómez

unread,
Sep 2, 2011, 1:00:51 PM9/2/11
to toasted-circu...@googlegroups.com
Hi Andrew

I wired up the matrix like this:

la foto.JPG

this is a 4x4 RGB LED matrix with common anode, there are 4 rows which are the anodes, and 12 columns which are the cathodes. The anodes are connected to the source drivers pins, and the cathodes are connected to the sink drivers pins.

I commented some functions on the "begin_here5"sketch at the loop function and uncommented the MatrixDemo() function. I loaded the sketch just like that to the board

Captura de pantalla 2011-09-02 a las 11.05.58.png
At the serial monitor I had this:

Captura de pantalla 2011-09-02 a las 11.03.30.png

But nothing happened, the LED matrix still turned off all the time.

Is there something that I'm doing wrong?
Can you write a little sketch example?

Thanks
________________________
Ing. Mauricio Gómez
Hardware Developer



2011/8/19 <toasted-circuits-...@googlegroups.com>

Group: http://groups.google.com/group/toasted-circuits-lightuino/topics

    Maw <maurici...@gmail.com> Aug 18 04:05PM -0700 ^
     
    Hi Andrew, I have no idea of how I should connect a LED matrix with
    lightuino v5 neither program it, can you help me with that? for
    example with a 9x9 charlyplexed matrix, sorry for my english..

     

    Andrew Stone <g.andre...@gmail.com> Aug 18 09:51PM -0400 ^
     
    Hi Mauricio,
     
    Imagine an LED matrix with rows and columns. Let's say that the rows
    connect to the LED's anodes (+) and the columns connect to the LED cathodes
    (-). Its just a convention if your matrix is the opposite, then rotate it
    by 90 degrees :-).
     
    So if you energize a single row and a single column, a single LED (the
    intersection between the row and column) will light.
     
    Or energize a single row, and all columns. This will turn on ALL LEDs in a
    row. Or a single row, and specific columns. This will turn on specific
    LEDs in that row.
     
    Now in a "for" loop, energize rows 1 through 9 in order and when row 1 is
    on, turn on just the columns you want to show on row 1. When row 2 is on,
    turn on the columns you want for row 2. And so on for all 9.
    Do this really fast > 30 times a second and the eye will see the rows as
    always on.
     
    The Lightuino provides 16 500mA "source drivers". They emerge out the top
    right 16 pin right angle connector. Hook 9 of these up to your rows.
    It also provides 70 20mA "sink drivers". Hook 9 of these up to your
    columns. Or if you want 40mA per LED hook 2 up to each column (they are
    additive).
     
    Write the for loop I described above & you are done!
     
    The "begin_here5" sketch shows how to turn on the source drivers and the
    sink drivers.
     
    Specific matrix example code is located at:
    http://code.google.com/p/arduino-m5451-current-driver/source/browse/trunk/latest/libraries/lightuino5_lib_dev/lightuinoMatrix.cpp
    This code works for a 16x70 matrix which is a lot bigger then you need.
    That is why you should treat it as an example. You should use the smallest
    matrix possible because the fewer the rows, the greater % time each row will
    be on.
     
    In fact, if your matrix is not wired up yet, if I were you I'd consider
    wiring up a "matrix" that is electrically 2x41 that happens to be physically
    arranged as 9x9
     
    Cheers!
    Andrew
     
     
     
     

     


Captura de pantalla 2011-09-02 a las 11.05.58.png
la foto.JPG
Captura de pantalla 2011-09-02 a las 11.03.30.png

Andrew Stone

unread,
Sep 2, 2011, 2:42:13 PM9/2/11
to toasted-circu...@googlegroups.com
Hi Mauricio,

Nice PCB!  Is that homemade?  But first let's verify it.  I verify my matrix by turning the Lightuino entirely on and then touching pins.

In the begin_here5 sketch add this function:

void AllOn(void)
{
  sources.set(0xffff);
  sinks.set(0xffffffff,0xffffffff,B00111111);
}

And add a new loop that only calls that function:

void loop()
  {
  AllOn();
  mydelay(10000);
  }

Now take any sink pin and connect it to the cathode side and any source pin and connect it to an anode side.  One LED should light!
If it does not light the problem is probably in your matrix (since I test all sources and sinks before I ship you the board).  You'll have to use a multimeter to figure out the issue.

If it works, I'd recommend testing all LEDs.   Wire up every cathode (sink) and then touch jumpers from the Lightuino source pin to each anode.  All should light. 

Cheers!
Andrew


2011/9/2 Mauricio Gómez <maurici...@gmail.com>
la foto.JPG
Captura de pantalla 2011-09-02 a las 11.03.30.png
Captura de pantalla 2011-09-02 a las 11.05.58.png
Reply all
Reply to author
Forward
0 new messages