Need Help 5x7 Bi-Color LED Dot Matrix Switched Counting Flashing Changing Project

Discussion in 'Embedded Systems and Microcontrollers' started by eazy2001x, Mar 26, 2008.

  1. eazy2001x

    Thread Starter New Member

    Mar 26, 2008
    5
    0
    Hi,

    I am very new to this and not even sure where to start. I have been searching Google for a good forum to post to that will be helpful and answer my questions and well. Here I am. Hope I made the right choice.

    Ok.

    I am working on a project that consists of:
    6 micro switches
    1 Bi-Color Red - Green LED Dot Matrix

    What I want to do is when switch 1 is selected it will make a number one light up in green the dot matrix LED. I will also have single wire that will send a 12v (haven’t decided if it was going to be - or + yet) at any given time. When that single wire is active I want that number 1 to change to red.

    When switch 2 is pressed it will work the same way as number 1 but display a number 2 and when that single wire sends the 12V it will switch to a red number 2. I will need this to work all the way up to number 5. When switch 6 is pressed it will display an R.

    Now if no switches are pressed I want it to display a Green N. It will also need to operate off of a 12V power supply. I will also need it to have another output that will light up another set of LEDS only when the 12V is sent from the other device.

    So it will need:
    6 inputs from switches
    1 input from a 12v source
    20 pin on the screen

    What I think I need.
    Some type of microcontroller a pc board and lots of help :)

    I really don’t know where to start and will accept any help provided. There is more to this project but this is where I'm starting.
     
  2. mrmeval

    Distinguished Member

    Jun 30, 2006
    833
    2
  3. eazy2001x

    Thread Starter New Member

    Mar 26, 2008
    5
    0
    Ok looking at my options.

    First: ATmega168 based Arduino Diecimila

    14 digital input/output pins
    only 12 can be used because of the USB communication
    Input Voltage (recommended) 7-12 V

    Now if i decide to go with a 5x7 Bicolor Dot Matrix LED which has 20 pins (http://www.lc-led.com/products/lc2057auryg1c.html) I would need one pin for pins 12 20 11 7 17 1 10 2 for a ground and a positive for 18 3 5 13 8 for red and 19 4 14 9 for green. just to control the LED screen i need 18 pins for output. Then I still need something to take my 7 inputs. I think this system would work fine for a single color 5X7 matrix that only uses 12 pins.


    If I’m wrong about this please let me know.

    Price 35 bucks and its already put together.

    Second: PICAXE-28X1 chip
    8 inputs
    8 outputs
    Input Voltage unkown?

    If I can use 1 of the inputs as outputs it puts me at 7 inputs and 9 outputs, still not enough.

    Now the PICAXE-40X1 has an extra 8 pins on it that look like they can be used for input or output. If that’s the case i can use 7 for input and have 17 for output. I should be able to run 12 to the 5X7 Matrix LED and have 6 for the switches then end up with 6 unused pins.

    Please advise, I am not sure if I’m getting this right or if it will even work to control the LED screen and take 7 inputs from my switches.
     
  4. eazy2001x

    Thread Starter New Member

    Mar 26, 2008
    5
    0
    or could i use three PICAXE-28X1 chips and bridge the 7 switched imputs to the three chips. Then I could run 7 in and use chip one to control the first three rows on the 5X7 LED then the second chip to control th next three and the last to control the last two. It should work like this..

    Display the number 1

    Chip 1:
    XXOXX
    XOOXX
    OXOXX
    Chip 2:
    XXOXX
    XXOXX
    XXOXX
    Chip 3:
    XXOXX
    OOOOO

    which will display:

    XXOXX
    XOOXX
    OXOXX
    XXOXX
    XXOXX
    XXOXX
    XXOXX
    OOOOO

    what do you guys think or am i still looking at it all wrong?
     
  5. eazy2001x

    Thread Starter New Member

    Mar 26, 2008
    5
    0
    Ok so after a lot of Google searching and reading I came up with this wiring schematic. This is my first time at something like this and i had no clue of where to start when i posted on here the first time.

    Please see my attached pic and let me know if everything seems ok. Because I didn’t have enough outputs on one chip I decided to use three to fully control the LED. The first chip will control all the grounds, the second chip will control the green LED’s and the third chip will control the red LED’s.

    The three chips will have each switch wired to the same ports. So when switch one is pressed it will supply a negative voltage to pin 11 on all three chips. Once that happens a green number one should be displayed on the LED’s. Then when switch 7 is pressed it should display a red number 1.

    My current problem.. I t seems that I can light up all LED’s one color but not select which ones I want to light up. So instead of all LEDS lighting up I cant display a number 1 or make it change red when switch is pressed.

    If the chips perform the following action:

    Chip 1:
    Negative signal sent to pins 21-27

    Chip 2:
    Positive signal sent to pins 21-25

    And when switch 7 is pressed

    Chip 1:
    Negative signal sent to pins 21-27

    Chip 2:
    Negative signal sent to pins 21-25

    Chip 3
    Positive signal sent to pins 21-25

    Now If I had 35 individual LED’s with 3 pins per LED’s, I would need 105 pins. So if I need 105 pins and each 28 pin chip only had 8 outputs, I would need 14 chips. Or I could use a 40 pin chip that has 16 outputs then I only need 7 chips correct?

    Need Help!
     
  6. eazy2001x

    Thread Starter New Member

    Mar 26, 2008
    5
    0
    Ok after reading more it seems that I can I have to display the image in parts to make up a full image. So I could try this with the chips..

    When switch 1 is pressed,

    Chip one:
    Negative signal to pin 27(Led 12)

    Chip two:
    Positive signal to pin 23(Led 15)
    Wait 5ms

    Chip one:
    Negative signal to pin 26(Led 20)

    Chip two:
    Positive signal to pin 23 & 24(Led 15 & 3)
    Wait 5ms

    Chip one:
    Negative signal to pin 25(Led 11)

    Chip two:
    Positive signal to pin 23 & 25(Led 15 & 18)
    Wait 5ms

    Chip one:
    Negative signal to pin 24(Led 7)

    Chip two:
    Positive signal to pin 23(Led 15)
    Wait 5ms

    Chip one:
    Negative signal to pin 23(Led 1)

    Chip two:
    Positive signal to pin 23(Led 15)
    Wait 5ms

    Chip one:
    Negative signal to pin 22(Led 10)

    Chip two:
    Positive signal to pin 23(Led 15)
    Wait 5ms

    Chip one:
    Negative signal to pin 22(Led 2)

    Chip two:
    Positive signal to pin 21, 22, 23, 24 & 25 (Led 8, 13, 15, 3 & 18)
    Wait 5ms

    Then loop this forever until switch 1 is no longer pressed.. I still need at least 33FPR which is a total of 33ms so I'll need to take 33ms and divide it by 7 rows of LED’s and that will give me 4.7ms. So if I do 5ms it should be just about 30 frames per second across 7 rows and display a number 1 correct?

    Then if switch 7 and 1 are pressed stop the loop on Chip 2 and start it on Chip 3. That should switch the number 1 green to red on the LED dot matrix.

    The code should be something like this on
    Chip 1: if switch 1 is pressed goto loop 1 green/red then if switch 1 is not pressed stop loop.
    Chip 2: if switch 1 is pressed goto loop 1 green then if switch 7 is pressed stop loop.
    Chip 3: if switch 1 and 7 are pressed goto loop 1 red then if switch 7 is not pressed stop loop.
     
Loading...