Bi-Color matrix

Post here to let others know of a project you're working on.

Moderators: Chuckt, Garth, bitfogav

MrDEB
I practically live here!
I practically live here!
Posts: 372
Joined: Fri Feb 18, 2011 4:24 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Bi-Color matrix

Post by MrDEB » Thu Oct 04, 2012 1:53 am

The matrix is a common cathode
TC40-11SRWA
I know its kinda confusing what is what. I did a google to double check just what defines a common cathode and common anode.
Trying to find a multiplexing . bas module. MIGHT? aid in the blinking between one row to the next. Need to SMOOTH it out. Maybe multiplexing?
Graham over at DDIY made note of a bas module he used but no post on its contents.
will post a video of what I have so far. kinda clunky
Attachments
common cath.png
common cath.png (343.4 KiB) Viewed 22640 times

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Bi-Color matrix

Post by brad » Fri Oct 05, 2012 8:11 am

Unfortunately it isn't a common cathode matrix. If you have one set of anode connections and two sets of cathodes then it means it is common anode. I.E. the anodes of the red and green LED's are connected together and are therefor common.

If you build the circuit I drew it will work for you (that's how I normally run a common anode LED matrix).

You can then just copy and paste the Christmas code that I put up in a previous post - you will just want to modify it slightly to suit a 5x7 matrix as opposed to an 8x8 matrix.

MrDEB
I practically live here!
I practically live here!
Posts: 372
Joined: Fri Feb 18, 2011 4:24 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Bi-Color matrix

Post by MrDEB » Fri Oct 05, 2012 12:50 pm

OUPS I grabbed the wrong circuit board. I have two boards that look identical
the correct number is TBC40-11EGWA which is a bi color common cathode. The number I posted (TC40-11SRWA) is common cathode but one color. I reconfirmed this from the manufacture as well.
Got my code working great, just need to tweek it as I get lots of blinking. Not a smooth transition. Thinking about multiplexing but it is basically what I am doing now. The routine I found for multiplexing uses tmr2.
Also found that my resistor calculations are way off (nobodies perfect) . Forgot to include the voltage drop of the LED and the voltage drop of the ULN2803.
Using a DMM I measured .002ma.
I have some new brighter displays forthcoming so I may need to recalculate the resistors again.

MrDEB
I practically live here!
I practically live here!
Posts: 372
Joined: Fri Feb 18, 2011 4:24 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Bi-Color matrix

Post by MrDEB » Fri Oct 05, 2012 1:54 pm

here is a video of what I have so far. Looking over some sample code I see no delay in the main program loop but I have a 50ms delay. Going to try without.
Code needs lots of work but it does work. Maybe not very efficient but ??
http://s992.photobucket.com/albums/af44 ... Video2.mp4
Should look better with brighter LEDs hopefully.

Code: Select all

{
*****************************************************************************
*  Name    : UNTITLED.BAS                                                   *
*  Author  : [select VIEW...EDITOR OPTIONS]                                 *
*  Notice  : Copyright (c) 2012 [select VIEW...EDITOR OPTIONS]              *
*          : All Rights Reserved                                            *
*  Date    : 9/19/2012                                                      *
*  Version : 1.0                                                            *
*  Notes   :brads suggestion 9/19/2012                                                                *
*          :                                                                *
*****************************************************************************
}
Device = 18F4520
Clock = 8
Config MCLRE = Off
 

'*********************************************************************
'Includes
Include "InternalOscillator.bas"

Include "utils.bas"
Include "convert.bas"


'*********************************************************************
'Dimension Statements (variable and constants

//Dim row As PORTD    // row 0 to 6 


Dim row_buffer(7) As Byte
Dim count As Word
Dim x As Byte
Dim y As Word
//
Const Red_Data(7) As Byte =   (%0010001, %00001010, %00000100 ,%00010001, %00001010,%00000100, %00010001)// 5 colums left to right
//Const green_data(7) As Byte = (%00000001, %00000011, %00000111 ,%00011111, %00111111, %01111111, %01111111)
Const R_ows(7) As Byte =      (%00000001, %00000010, %00000100 ,%00001000, %00010000, %00100000, %01000000)// 7 rows top to bottom
Sub display()
y=30
     For x = 0 To 100
     
                  PORTC = Red_Data(0)
     PORTD = R_ows(0)
     DelayMS(y)
                  PORTC = Red_Data(1)
    PORTD = R_ows(1)
     DelayMS(y)
                  PORTC = Red_Data(2)
    PORTD = R_ows(2)
     DelayMS(y)
                  PORTC = Red_Data(0)
     PORTD = R_ows(1)
     DelayMS(y)
                  PORTC = Red_Data(1)
    PORTD = R_ows(2)
     DelayMS(y)
                  PORTC = Red_Data(2)
    PORTD = R_ows(3)
     DelayMS(y)
                  PORTC = Red_Data(0)
    PORTD = R_ows(2)
     DelayMS(y)
                  PORTC = Red_Data(1)
    PORTD = R_ows(3)
    DelayMS(y)
                  PORTC = Red_Data(2)
    PORTD = R_ows(4)
     DelayMS(y)      
                  PORTC = Red_Data(0)
    PORTD = R_ows(3)
     DelayMS(y)
                  PORTC = Red_Data(1)
    PORTD = R_ows(4)
     DelayMS(y)      
                 PORTC = Red_Data(2)
    PORTD = R_ows(5)
     DelayMS(y)      
                 PORTC = Red_Data(0)
    PORTD = R_ows(4)
     DelayMS(y)
                  PORTC = Red_Data(1)
    PORTD = R_ows(5)
     DelayMS(y)      
                 PORTC = Red_Data(2)
    PORTD = R_ows(6)
     DelayMS(y)
  Next                  
           
End Sub
// set ports as outputs
TRISA = %00000000
TRISB = %00000000
TRISC = %00000000       
TRISD = %00000000
count = 0
SetAllDigital

//row = 0
PORTB = 0
PORTC = 0
PORTA = 0
PORTD=0
While true
 For count =0 To 20    // run 21 times
// load()

 display()                // sub call
 DelayMS(50)
 Next Wend

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Bi-Color matrix

Post by brad » Sat Oct 06, 2012 9:30 pm

Thanks for the video, but I really would recommend that you wire it up differently.

Notice how the LED's have varying brightness levels? That's because you are trying to get one output pin to drive multiple LED's at a time (rather than letting a transistor do it for you) This means that your current draw will be severely limited by the output pin. The more LED's in a row that you try and turn on at once, the less current each of them will have, so the dimmer they will be.

However, if you just allow the output pins to be connected to the cathodes, and the anodes (through the transistors) to VCC you will be able to get them the same brightness even with one or multiple LED's lit up in a row at once.

Keep us posted!

MrDEB
I practically live here!
I practically live here!
Posts: 372
Joined: Fri Feb 18, 2011 4:24 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Bi-Color matrix

Post by MrDEB » Sat Oct 06, 2012 10:24 pm

I discovered the limitations of my design.
I see in your projects you use alot of 74373. Thinking about either this route or perhaps the transistor route.
This is going to be battery operated and size is a consideration as well.
Back to the drawing board

MrDEB
I practically live here!
I practically live here!
Posts: 372
Joined: Fri Feb 18, 2011 4:24 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Bi-Color matrix

Post by MrDEB » Fri Oct 12, 2012 12:36 am

while researching different methods of controlling an LED matrix, I came across a couple of interesting componets that are Constant Current Sink devices
http://www.onsemi.com/pub_link/Collateral/CAT4016-D.PDF

http://www.alldatasheet.com/datasheet-p ... 6DP05.html

http://picprojects.org.uk/projects/lc/index.htm
an 8 channel device is available as well.

MrDEB
I practically live here!
I practically live here!
Posts: 372
Joined: Fri Feb 18, 2011 4:24 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Bi-Color matrix

Post by MrDEB » Sat Oct 13, 2012 11:17 pm

Project update
The LED segments are dim so after adding some PNP's to the mix BUT the switched voltage was 7v so this won't work (had 7v on the base and the transistor never switched on)
After doing some research I find these two components.
http://www.ti.com/lit/ds/symlink/tlc5917.pdf

http://www.toshiba.com/taec/components2 ... 3/8992.pdf
parts ordered.
Issues are the display has a Vf of 4v. could never get full brightness from segments.
After I get the code sorted out I will attempt to get the 7555/TX idea tested. Using a 7555, transmit one of two pulse streams. If say lower than 1hz, switch one pressed. If higher than 5hz then switch 2 pressed.
maybe a crazy idea but ??

MrDEB
I practically live here!
I practically live here!
Posts: 372
Joined: Fri Feb 18, 2011 4:24 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Bi-Color matrix

Post by MrDEB » Sun Oct 14, 2012 4:58 am

Good article explaining the Constant Current sink chip http://www.electro-tech-online.com/cust ... lc5917.pdf
I have parts ordered and hopefully have sucess by next weekend?
web page that describes the constant current sink
http://picprojects.org.uk/projects/lc/index.htm

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Bi-Color matrix

Post by brad » Sun Oct 14, 2012 8:01 am

I can promise you that my circuit that I drew for you will work :)

MrDEB
I practically live here!
I practically live here!
Posts: 372
Joined: Fri Feb 18, 2011 4:24 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Bi-Color matrix

Post by MrDEB » Sun Oct 14, 2012 10:47 pm

Your circuit uses an NPN transistor. I tried same but used a PNP. The issue was I am using 8v to power the anodes. The base on the PNP showed 7v.
The matrix display has a 4Vf on each segment so using a ULN2803 on the cathodes.
If I use the NPN but use a 50ohm resistor it might work but maybe very dim?? 5v supply - 4Vf / .020 = 5o ohms.
ONLY if I have only one LED on per row. Going to play with it using an NPN and having only one LED on per ROW but ??
The big problem I see is the 4Vf.

MrDEB
I practically live here!
I practically live here!
Posts: 372
Joined: Fri Feb 18, 2011 4:24 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Bi-Color matrix

Post by MrDEB » Mon Oct 15, 2012 12:04 am

I connected up your posted circuit
Using either a PNP or NPN and 5v the current draw is 3ma. Won't even light up a segment
Using 8.45v and a 120ohm resistor on the cathode = 30ma
Connecting two cathodes = 58ma (one green and one red segment.
Conclusion LED will not operate at 5v. I tried.
Duplicate perhaps by putting two LEDs in series should = 4Vf If I am thinking right lol

MrDEB
I practically live here!
I practically live here!
Posts: 372
Joined: Fri Feb 18, 2011 4:24 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Bi-Color matrix

Post by MrDEB » Mon Oct 15, 2012 5:35 am

Reading the data sheet on the TLC5916 for 8 channel or the TLC5926 for 16channel constant current sink LED drivers.
This chip sounds like the perfect solution for different LEDs etc. Up to 17v output. Programmable
current as well.
http://www.ti.com/lit/ds/slvs814/slvs814.pdf

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Bi-Color matrix

Post by brad » Mon Oct 15, 2012 7:05 am

Unfortunately you must be connecting something up incorrectly.

LED's will have a forward voltage drop around maybe 1.8V - 2.5v (roughly) You can run them quite happily on 5v (with a series resistor)

I have even run an LED matrix with a 3v coin cell battery. I'm happy to order a 5x7 matrix and show you that the circuit will work. It is a tried and tested method :)

MrDEB
I practically live here!
I practically live here!
Posts: 372
Joined: Fri Feb 18, 2011 4:24 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Bi-Color matrix

Post by MrDEB » Mon Oct 15, 2012 2:00 pm

The Kingbright LED matrix I am using (TBC40-11EGWA) has a 4Vf on each LED segment. This i where the problem is.
Hopefully the TD62783APG will solve the higher voltage issue. I have to increase the voltage due to the 4Vf issue.
Have tried several different methods but going to wait for parts.

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 1 guest