Use of a PIC


Closed Thread
Results 1 to 9 of 9

Thread: Use of a PIC

  1. #1
    Join Date
    Mar 2007
    Location
    perth
    Posts
    4

    Question Use of a PIC

    An absolute newbi with PICs, I would like to make a LED display in a dome, using about 1200 -1500 LEDs. It has to turn on all at once for a few minutes, then rotate, run in different patterns...etc.My question how do I drive all the leds on using a PIC and supply enough current to light them fully? Can anyone help please?? Ed

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default

    Hi Edwardo,
    My question how do I drive all the leds on using a PIC and supply enough current to light them fully?
    You don't.... what you need to look into is called multiplexing and is basicly how all LED-signs work. From your alarm clock radio to the huge displays at Times Square. Let's take the alarm clock as an example. Basicly the LED's are arranged in groups, you then set the pattern for that particular group and then turn them on. After a short amount of time you turn that group of LED's on and turn on the next group. If this is done quick enough the human eye/brain will not be able to see that they are actually flashing. In order to keep the brightness of LED's up the current thru them is usually many times higher than the maximum continious current for the very short period they are actually on.

    With that being said 1200-1500 LEDs are a LOT of LEDs....Not that it can't be done with a PIC but I'm not sure it's a very good beginners project. Instead I sugest you get 1 LED to turn on and off at your command, then move up to 8 leds connected to portB (for example). When you have that working you can rig a 8*8 matrix and see if you can that going. From there the you could possibly move on and rig a 4*4 matrix of 8*8 matrixes to get 1024 LEDs.

    Another tricky thing to keep in mind is how to store/retrieve/output the pattern that you want to display.

    Here's a link showing how it's done (not with a PIC but anyway):
    http://www.fpga4fun.com/Opto5.html

    Welcome to the forum!

    /Henrik Olsson.
    Last edited by HenrikOlsson; - 14th March 2007 at 18:27. Reason: Added link.

  3. #3
    Join Date
    Mar 2007
    Location
    perth
    Posts
    4


    Did you find this post helpful? Yes | No

    Smile

    Hi Henrik, Thanks heaps for the quick reply, didn't expect it so soon. I will be looking into multiplexing as per your suggestion. Have been able to run 8 LEds lighting from LSB to MSB and back with a pic ,but thats about it. I'll BE BACK !! Cheers.

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default

    Edwardo,
    Have been able to run 8 LEds lighting from LSB to MSB and back with a pic ,but thats about it.
    Well, then you're in pretty good shape! There are dedicated multiplexing chips you could look into to. The MAX7219 for example is such a chip. It can drive up to 64 LEDs and you can cascade them to increase the number of LED's or connect each of them to different PIC pins. There's another thread active at the moment discussing cascading multiple MAX7219. Still, 1200-1500 LED's are a lot of LED's....

    http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1339

    /Henrik Olsson.

  5. #5
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Cool

    What LEDs do you want to drive ?

    3mA, 10mA, 20mA, 350mA, 700mA, 1000mA ???

    You should divide your problem into smaller units an adress them from a central processor or so...
    PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2

  6. #6
    Join Date
    Mar 2007
    Posts
    16


    Did you find this post helpful? Yes | No

    Default led display

    i have also some projects like that and i used led more than you(23450 leds) i have used led 350ma rgb leds with 16000000 colors for animations.

    what is your project if you can explain it i can help

  7. #7
    Join Date
    Mar 2007
    Location
    perth
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    Thenks for the prompt replies so far guys. The specs on the LEds are 150mA Peak forward current and 30mA continous. Its for a movie prop and something like a mini Tunnel that would have over a thousand LEDs in the inside wall. Basically all I want it to do is be able to light up the whole tunnel in one colour, at other times the led would move in a pattern as though the people inside are moving forward at a tremendous speed or spinnning around..etc. You get the picture !! Green screen stuff. I don't understand yet, how to drive all the LEDs to full brightness and control them. Any help or suggestions is greatly appreciciated.

  8. #8
    Join Date
    Mar 2007
    Location
    perth
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    Hi Syscoder, your project sounds pretty complex, how did you drive your 20 odd thousand led display?

  9. #9
    Join Date
    Oct 2005
    Location
    Loveland CO USA
    Posts
    83


    Did you find this post helpful? Yes | No

    Smile 1500 LEDs with 1 PIC

    Edwardo,
    Where to start?
    30mA x 1500 LEDs = 45 amps!!!! That should light up a room like daylight.
    What color of LEDs? We buy 2,000,000 LEDs/year in white + colored LEDs. Most people think LEDs last 10 years. Don’t bet your job on it. Some last a very short time. If you are not clear as to life expectancy then you better do a test. Set up 3 LEDs at 20, 30 and 40mA. Measure light output for the next month. My big white LEDs have serious issues in a week at rated current.

    I think your real question is how do I get 1500 outputs from a PIC. You do not need 1500 outputs. Get more outputs:
    >Use two ports on your PIC to make a “data bus”. Eight bits for data and 8 bits for control and address. Connect (8 to 64) 74hc373 latches to the data bus and (1 to 8) 74hc138 to the address bus. The 74hc138 looks at A0,1,2 to decide which one of 8 latches to strobe and A3,4,5 to choose which one of 8-74hc138s should respond. You could have 8x8=64 (8 bit ports) or 512 outputs.
    >A second method is to use 8 bit shift registers. Your bus is simple. Clock, Data & Load. The shifting will take a while.

    Go back and look at the posting on multiplexing LEDs. Made a bank of LEDs that is 200x8. That uses 208 outputs. Each LED is on 1/8th the time at 6 to 8 times the average current. You must get through all 8 banks of LEDs 70 to 100 times per second. Do not drop to 60/second!
    Because your display is LARGE, I would break it up into 6 boards of 32x8 LEDs. Each board will have 5 (8 bit) latches or shift registers. (4x8=32 to drive the rows + 8bits to drive the columns) Next you will need some power drivers. The row drivers will have to handle the 150mA or more you send through each LED. The row drivers will control 5 amps.

    100%=30mA, 50%=60mA, 25%=120mA 12%=240mA You said the peak current is 150mA so to get full power maybe you can only have 4 columns operating at ¼ duty cycle.

    This is toooooo long. Do you need help with software? You should choose a PIC with a large amount of RAM. PIC18Fxxxx
    rons

Similar Threads

  1. SMS via pic
    By kenandere in forum GSM
    Replies: 15
    Last Post: - 10th March 2010, 10:00
  2. Replies: 67
    Last Post: - 8th December 2009, 02:27
  3. HSERIN & Interupts (aka controlling PIC programs from a remote PC)
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th June 2009, 14:46
  4. pic to pic ir link versus wired link : help please anyone
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th May 2008, 21:01
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14

Members who have read this thread : 1

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