Table LED Matrix, Weeks of debugging, column problems


Closed Thread
Results 1 to 28 of 28

Hybrid View

  1. #1
    Join Date
    Sep 2007
    Posts
    22

    Default Table LED Matrix, Weeks of debugging, column problems

    1) I successfully constructed a programmable LED matrix using this schematic: http://www.injektilo.com/LEDTable/CIRCUIT.jpg

    Which worked prefectly.

    2) My next step was to make the real version, where each LED in the original version would be replaced by 6 LED's in parallel. All of this was going to be mounted in a table under some stained glass etc.

    3) I was told I would need to modify the schematic a little, by adding transistors to each column and row, like this:
    http://www.injektilo.com/LEDTable/NEW%20CIRCUIT.JPG

    Note: 4.7k's are actually 2.2k

    4) The rows work fine and independant, but when ONE column is programmed to be on, all the others go on as well! Video of it in action:
    http://www.injektilo.com/LEDTable/Debug%20xvid.avi

    I was told this:

    "what happen when you have a voltage difference between the emitter 12volts(column transistors) and 5volts when the 74ls line are not active the transistor base sees this as more negative and turns the transisitor on and is on all the time. What we need on the base of the column transistor is to get it up to 12volts the same as the emitter until the 74ls pulls it to ground and then turns the transisor on. The problem is can we put the base at 12volts which puts 12 on the lines of the 74ls and should only be a max of 5volts to hold it high."


    So far, I have tried removing the 2.2ks from the columns but that made the 74ls get really really hot really really fast. So I replaced the fried 74ls with a new one and re-added the 2.2k's. Then I was told to try adding a 100k resistor between the Base and emitter of columns but that didn't work either (I think, my soldering job on that may have been shoddy bcs there is little room to work with)

    Any advice? This is my last problem as my table has been constructed. I hope I don't have to start from scratch or something. I spent so much time making the LED bundles and circuits. Help!


    Edit: someone suggested: "if you add a 8.2V zeners in series with each of the base resistors for the column PNP transistors, and use a 22k between base and emitter to turn the transistor off, you will be good. This way the transistors will be turned properly off when not activated, even if the voltage difference is 7V. The zener voltage is a bit higher than necessary, to cancel any leak problems with the zener. They tend to start leaking a bit before they turn on. You still hav almost 4 volts to drive the transistor.

    Without the zener, all transistors is on all the time and will light the complete row you activate with the row transistors."

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    I have three suggestions.

    1. Replace all 2222 transistors and their base resistors with a single ULN2004 chip.

    2. Replace 74LS138 with a HC138 type.

    3. Add an NPN to drive the PNP transistors since there is current flowing from the emitter-base junction of each PNP transistor. I had this problem too. Put res. from +12 to base of PNP. Then res. from PP base to collector of NPN. Emitter of NPN to ground. Base of NPN with res. to driver.

    Ioannis

  3. #3
    Join Date
    Sep 2007
    Posts
    22


    Did you find this post helpful? Yes | No

    Default

    I don't think using the ULN2004 chip would require recoding. Would the replacement of the 74LS require the coding for the PIC to be different? Should I use an inverter, and if so, can you recommend one? I have been working on this for so long I am losing my mind haha. Here is the sample code I am using

    Code:
    #include <pic.h>
    
    
    __CONFIG(INTIO & WDTDIS & PWRTEN & MCLRDIS &
    UNPROTECT \
    	& UNPROTECT & BORDIS & IESODIS & FCMDIS);
    
    int i, j, k, n, Dlay, CurLetter;
    
    const char Letters[] = {
    	
    	0b0000001, // A
    	0b0000001,
    	0b0000001,
    	0b0000001,
    	0b0000001,
    	
    	0b0000010,
    	0b0000010, // B
    	0b0000010,
    	0b0000010,
    	0b0000010};
    
    main()
    {
    	PORTA = 0;			// All Bits are Low
    	PORTC = 0b000001;	// Start With Top Left
    	CMCON0 = 7;			// Turn Off Comparitors
    	ANSEL = 0;			// Turn Off ADC
    	TRISA = 0b101000;	// RA5/RA3 Inputs
    	TRISC = 0;
    	
    	CurLetter = 0;		// Start With "A"
    	
    	while (1 == 1)		// Loop Forever
    	{
    		for (Dlay = 0; Dlay < 25; Dlay++)
    		 for (i = 0; i < 5; i++)
    		 {
    			 j = Letters[(CurLetter * 5) + i];
    			 k = (j >> 2) & 0b010000;
    			 PORTC = j & 0b111111;
    			 PORTA = k + i;
    			 for  (n = 0; n < 259; n++);	// 4ms Delay
    		}
    
    	CurLetter = (CurLetter +1) % 2; //Increment Letter
    	}
    }
    If you have the time, a quick schem would be great. I am new to all of this, this is my first project. thanks!
    Last edited by mekohler; - 8th November 2007 at 03:27.

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    The ULN chip is inverter! Of course you will have to change the data driven to output of PIC. Just reverse 1's and 0's.

    Ioannis

  5. #5
    Join Date
    Feb 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Does the 74LS138 and 74HC138 see data in different ways. Is it truly a drop in replacement?

  6. #6
    Join Date
    Sep 2007
    Posts
    22


    Did you find this post helpful? Yes | No

    Default

    Before I go about trying to implement some of the suggestions, can anyone explain to me why my row's, when activated, only go to .98V? Also the ouput to my decoder from the PIC is at a constant 1.98, 1.98, .98 V (3 ouputs controlling 5 columns). Why is this so? I posted the code in a few posts back.

Similar Threads

  1. Conway's Game Of Life
    By wellyboot in forum mel PIC BASIC Pro
    Replies: 45
    Last Post: - 28th May 2020, 06:14
  2. Instant Interrupts - Revisited
    By Darrel Taylor in forum Code Examples
    Replies: 772
    Last Post: - 17th February 2016, 22:14
  3. Free Project - 245 LED Display
    By T.Jackson in forum Code Examples
    Replies: 221
    Last Post: - 16th August 2009, 04:59
  4. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  5. 18F452 "Unknown Processor" errors
    By schwinn_rider in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 27th April 2006, 03:56

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts