Jump to content

Connecting RGB LEDs


FantomXR

Recommended Posts

Can you test the SDcard in a card reader attached to a PC? (doubt this will be the problem, but must be eliminated)

Start each NGC with RESET_HW to clear the pool.

 

 

We should continue the diagnostics.
With the following NGC use a midi keyboard to activate row/column combinations to test each LED: (you'll need 2 hands,  or sticky tape, or weights to hold down  2 keys...)

#row 1
EVENT_BUTTON id=1  fwd_id=LED:5  type=NoteOn key=36

#row 2
EVENT_BUTTON id=2  fwd_id=LED:6  type=NoteOn key=37 

#row 3
EVENT_BUTTON id=3  fwd_id=LED:7  type=NoteOn key=38

#row 4
EVENT_BUTTON id=4  fwd_id=LED:8  type=NoteOn key=39 

#column 1..8 red
EVENT_BUTTON id=5  fwd_id=LED:9  type=NoteOn  key=40 
EVENT_BUTTON id=6  fwd_id=LED:10  type=NoteOn key=41
EVENT_BUTTON id=7  fwd_id=LED:11  type=NoteOn key=42
###fill in the rest

#column 9..16 red
EVENT_BUTTON id=13  fwd_id=LED:17  type=NoteOn key=47 
EVENT_BUTTON id=14  fwd_id=LED:18  type=NoteOn key=48
EVENT_BUTTON id=15  fwd_id=LED:19  type=NoteOn key=49
###fill in the rest

#column 1..8 green 
  ###fill in the rest
#column 9..16 green
  ###fill in the rest

#column 1..8 blue
  ###fill in the rest
#column 9..16 blue
  ###fill in the rest

 
Where it says "###fill in the rest" you need to complete the definitions.
The rules are:

  • id= <unique number>
  • LED:<nn>, where nn is a DOUT pin counting up through the SR's (from D7 to D0 in each SR), i.e SR1,D0=8    SR2,D7=9  SR2,D6=10    
  • key=<unique midi key number>

So I'll leave it for you to complete the NGC (filling in the rest of RED and all of GREEN and BLUE)
 
So the completed NGC should have (4+3*16)=52 EVENT_BUTTON defintions!

Link to comment
Share on other sites

  • Replies 74
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

I go on..

 

Finally the core is running fine. It was the SD-Card...

 

Here is my code:
 

 

#row 1
EVENT_BUTTON id=1  fwd_id=LED:5  type=NoteOn key=36

#column 1..8 red
EVENT_BUTTON id=5  fwd_id=LED:9  type=NoteOn  key=40

 

I've got the same results as with the buttons (meanwhile I disconnected the DIN-module). Key 40 activates the first column (four LEDs). With key 36 I'm than able to switch between 100% and maybe 30% brightness of the first LED. The other three are still on.... by releasing key 40, the column goes off.

 

Maybe I did a mistake in the wiring? Here is a diagram!

All boxes with the same color are connected (cathode - rows).

All boxes with the same number are connected (anodes - column).

post-10331-0-38721900-1373372146_thumb.j

Link to comment
Share on other sites

The diagram doesn't tell me much.

However, the cathode to rows and anodes to columns is correct. 

With the above script:

When you start the script, you get:

  • 0V on the output pin of DOUT SR for each and every row? 
  • 0V on the output pin of DOUT SR for each and every column? 
Link to comment
Share on other sites

The diagram doesn't tell me much.

However, the cathode to rows and anodes to columns is correct. 

With the above script:

When you start the script, you get:

  • 0V on the output pin of DOUT SR for each and every row? 
  • 0V on the output pin of DOUT SR for each and every column? 

 

Sorry for the delay!

Yes, I do measure 0V on every output pin of the rows and columns.

Link to comment
Share on other sites

Can you press (and hold) key #36 (there should be no LED alight) and check with your meter that only DOUT pin for this row (before the ULN) is 5V?

If you expand the NGC with more EVENT_BUTTON definitions as suggested earlier, then you can repeat for all 4 rows?

Link to comment
Share on other sites

Can you press (and hold) key #36 (there should be no LED alight) and check with your meter that only DOUT pin for this row (before the ULN) is 5V?

If you expand the NGC with more EVENT_BUTTON definitions as suggested earlier, then you can repeat for all 4 rows?

Yes. I can confirm the 5V by pressing & holding #36 and measuring this output pin. The other pins are 0V.

I can repeat this for all four rows by expanding the NGC.

 

So, that's working too ;)

Link to comment
Share on other sites

Very good.

Next step is to complete the columns

  • Fill in the EVENT_BUTTON definitions like in post #51
  • Measure the DOUT pin on each column, they should be 5V when key is down, otherwise all should be 0V
  • If this is so, then pressing  (key for row)+(key for col)=LED lit! (just 1 LED at a time)
  • Should be able to activate any LED in the matrix with the combination of row and column keys
Link to comment
Share on other sites

Hey!

 

Yes! By pressing for example #36 and #40 at the same time, the first LED in the first column in the first row lights up. I can repeat that for all rows / columns. But again: The other three LEDs of the same column are glowing too! Not as bright as the first one, but they are defintaly not off!

Edited by FantomXR
Link to comment
Share on other sites

OK, we're homing in on that problem!

It's something to do with the ULN because all the (other) rows leak some current when one is turned on....

I have an empty DOUT PCB in front of me.

Did you ground pin 9 of the ULN? (I think not!!!) If you didn't then solder it to the ground plane next to the pin(scrape off some of the solder mask). Then turn on and repeat the previous testing.

For some reason the ground pin on the PCB artwork is left open (ULN is not that commonly used).

 

Link to comment
Share on other sites

Duggle, you are my hero!!

I connected Pin9 to the groundpin of the next SR. It works like a charm. Now I can start, connecting all other LEDs.

 

Maybe I overlooked something. But we should add this at least to the wiki documentation. Sadly I don't have permissions, to edit the wiki with my forum accout...

 

Thank you so much!!

Edited by FantomXR
Link to comment
Share on other sites

Very cool, FantomXR!

I would recommend that you continue the current process of testing the hardware with all the LEDs before attempting to configure the potentially confusing DOUT MATRIX definitions.

 

I do! I connected the red, blue and greens now of the first DOUT module. Everything is working fine. I will start, adding the second DOUT module for the other LEDs.

 

Now I got the "real" colors too! It's great.

Link to comment
Share on other sites

Damn it!

 

I turned around my frontpanel to look at the LEDs from the front. I didn't see, that:

When I press #36 and #40 together, the first LED of the first column shines bright. The 2nd LED of this column is glowing, the other two LEDs of this column stay dark. When I just press key #40 without anything else, the 2nd LED of this column starts to glow.

 

 

:pinch:

post-10331-0-30765500-1373736302_thumb.j

post-10331-0-74426600-1373736305_thumb.j

Edited by FantomXR
Link to comment
Share on other sites

I think, maybe there is something wrong in the soldering:

 

I disconnected all colors. I started connecting the rows to the DOUT in SR1.

Now I put in:

 

red: error occurs on column 1-4 / 6-8

 

replacing red by green: no error

 

replacing green by blue: no error.

 

I will desolder the red connections and solder them again. I keep you posted.

Link to comment
Share on other sites

Okay... the LEDs are going crazy now... I don't know, where the mistake is. It's definitely in the wiring.

 

I decided to rip up all connections and wire them again. But this time I will take another kind of wire. With this one I used now, electrical shorts are more easy to get...

 

I keep you posted... again ;)

 

Thanks for you help!

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...