Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
LinkBack Thread Tools Display Modes
Old 21st May 2007, 06:18 PM   (permalink)
Exclamation How is this possible?

I have found this circuit for charlieplexing 20 LEDs with 5 microcontroller pins. If you put 5V on the upper connection and GND to the next, what would the other ones then have to be in order to not lit up the other LEDs? I can't figure that out...

http://ece.nsit.ac.in/website/dvgadre/dev1.pdf
Electronics4you is offline  
Old 21st May 2007, 06:42 PM   (permalink)
Default

Looks to me like only one LED lit at a time is what you're aiming for with this, though you could light up more than one if desired, but wouldn't be able to pick exactly two LEDs and always only get just those 2 to light. But you can always light exactly one specific LED that you desire. examples, LEDs numbered from left to right, control lines numbered from top to bottom:
LED1 : line 1 high, line 2 ground
LED2 : line 1 high, line 3 ground
...
LED5 : line 2 high, line 1 ground
...
LED11 : line 3 high, line 4 ground
etc.
Norlin is offline  
Old 21st May 2007, 06:43 PM   (permalink)
Default

Oh, dur...I think I get the original question now...if the other lines are high or grounded, then you'd get a lot of other LED's lighting up undesired...hrm...
Norlin is offline  
Old 21st May 2007, 06:44 PM   (permalink)
Default

since microcontrollers can source and sink current on their pins you can connect two leds in anti-parallel and light them both by connecting them to two microcontroller pins and then alternating which pins are sourcing or sinking the the current. only one led will be on at a time but if you switch them fast enough it will appear that both leds are on.

Timing can also be used to light up diferent banks of leds. say you have three leds that are connected to one common anode and three different cathodes. then you have another bank of three leds connected to another common anode but the same three cathodes as the first bank. if you power up the first anode you can light up a led in the first bank, if you shut down that anode and power up the second anode you can light any led in the second bank using the same cathode signals. if you do it fast enough it will appear you are controlling six leds using only five pins.

combining both techniques you can make the circuit you have posted control 20 leds with five pins. the same pin's status relative to the other four pins controls one led for every other pin. five pins total with each pin being relative to four other pins gives you four times five leds to control. 20 Leds
Glyph is offline  
Old 21st May 2007, 06:46 PM   (permalink)
Default

According to http://ece.nsit.ac.in/website/dvgadre/charli.html you're supposed to set the other pins to be inputs...will this work?
Norlin is offline  
Old 21st May 2007, 06:51 PM   (permalink)
Default

I don't think so, they'll be floating and will either be HIGH or LOW
But it don't seems like I can control the just ONE LED i want?
The technique should do it
Electronics4you is offline  
Old 21st May 2007, 06:52 PM   (permalink)
Default

You can read all about it in the original article here:
Don Lancaster's Tech Musings

And you can also find detailed information about it here:
Maxim's AN1880 Datasheet

Essentially you are alternative the pins usage, sometimes to drive the anode, other times to drive the cathode.

(Wow... 6 responses in 10 minutes
oeginc is offline  
Old 21st May 2007, 06:57 PM   (permalink)
Default

Quote:
Originally Posted by Electronics4you
I don't think so, they'll be floating and will either be HIGH or LOW
But it don't seems like I can control the just ONE LED i want?
The technique should do it

You most certainly can control one led with that circuit.

If you also include the technique of setting a pin to input mode, it will no longer sink or source significant current. It will be essentially inert and allow you to drive the leds without interference.

Last edited by Glyph; 21st May 2007 at 07:07 PM.
Glyph is offline  
Old 21st May 2007, 07:16 PM   (permalink)
Default

Quote:
It will be essentially inert and allow you to drive the leds without interference.
Can you explain that a little bit closer?
The pin must have a value either above or under 0.7V
Electronics4you is offline  
Old 21st May 2007, 07:28 PM   (permalink)
Default

I think when the pin is set to be an input, it goes into high impedence thus blocking current from flowing from/to it? If I'm reading the page correctly.
Norlin is offline  
Old 21st May 2007, 07:31 PM   (permalink)
Default

That might be just right, and then the circuit might work
Electronics4you is offline  
Old 21st May 2007, 07:34 PM   (permalink)
Default

Lets go back to our simplified example. This time we'll have three pins, each pin now has four leds, two in anti parallel connected to one pin, and another two in antiparellel connected to another pin. In total we have six leds. (draw yourself a diagram if you have trouble visualizing this).

we now wish to light up one led. pin 1 is set to high, and pin 2 is set to low while pin 3 is set to input. only the led that is forward biased from pin 1 to pin 2 will be lit. the reverse bias led obviously can't light because it is reversed bias. the leds connected to pin 3 can't light because pin 3 acts like a high resistance (usually connected to ground). A meager current might flow but it is far too low to light a led.

the two leds that connect pin 1 to pin 3 and then pin 3 to pin 2 are both forward biased and should light if the voltage is high enough. but if you select the appropriate voltage it will be low enough not to significantly light them both, but high enough to light one led. one forward drop is usually selected.

the current flowing into or out of the "input" pin is too small to affect the circuit.

It can be seen that with the right control firmware you can control all six leds with 3 pins.
Glyph is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 03:25 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker