Main Site Documentation

Multiplexing on extender module


#1

So, I’m starting to play with some parts I got with the Sparkfun Beginner Parts Kit (http://www.sparkfun.com/products/10003), including a 7-segment LED.

I have the 7-seg breadboarded and working fine, but I noticed that if you include the decimal point LED, it’s actually 8 LEDs. I was planning to drive this using the Extender module connected to the breadboard, but the Extender only has 7 I/O pins, so if I want to control all 8 segments, I’d obviously need to come up with some way of switching 2 LEDs on one pin. I’ve read some of the threads on LED cubes, and I confess that I’m basically lost when it comes to the idea of multiplexing.

Can anyone point me to a good resource or tutorial for figuring out multiplexing (assuming that’s the right solution for this particular issue)? I’m confident that I can easily drive the 7 segments with the Extender, but ideally I’d love to be able to fully drive this with my Spider (or Hydra) board, including the DP LED.


#2

Well, I know you are trying to use the extender module by itself, but what about using it with a Shift Register? That should give you the 8 pins you need, there are a couple of examples in the code section. Just a thought


#3

Don’t have a shift register handy, but I’ll check the code section for example, and perhaps I can pick one up at Radio Shack. Given the holiday weekend, would take too long to order from SparkFun (I want it NOW!!!). :slight_smile:

Thanks for the suggestion.


#4

You can multiplex 8 LEDs (actually 9) using only 6 pins. The easiest way to visualize it is to imagine a 4x4x2 array of LEDs (diodes) where all the anodes in each column are connected and connected to a pin (4 pins) with appropriate resistors and all the cathodes in each level are connected and then connected to a transistor that switches the ground connection by a pin (2 pins = 1 for each level) and another resistor. There are many ways to then drive the LEDs but the easiest is to visualize is to activate one row and one level at a time in order to activate one LED. Now cycle through the LEDs that make your number them very fast and it will appear that they are all lit at once. There are any number of tutorials on the web for building 3x3x3 LED cubes and that’s a great place to start for actual schematics. You can light more than one LED at a time but just make sure that you don’t source more than about 30mA through a pin.

Ultimately, what you want to find is a 7-segment decoder. It’s a chip made specifically for driving these types of LED arrays. I think someone gave you a big chip for Christmas that is perfect for this :wink:


#5

@ ian

Heh…little did I know that I had the solution right in my parts box. :slight_smile:

I’ll have to take a look at that tomorrow. Might it also be useful for driving RGB LEDs? I picked up a 10-pack of Piranhas (http://www.sparkfun.com/products/10390) that came in today. Got a couple tested successfully, but obviously more fun to mix and match the colors.

Unfortunately, my other project, a breadboard power supply, isn’t faring as well…Sparkfun sent me 2 240ohm resistors instead of 1 240ohm and 1 390ohm, so I can’t finish putting it together. Frustrating.


#6

That chip will power up to 64 LEDs :slight_smile: So, think of each RGB as three separate LEDs… Sounds like you’re having all kinds of fun. Let me know how it goes with the MAX chip. I bought a bunch of them a while back but haven’t spent any time with them yet. BTW, if you end up needing more of those chips go to eBay. You can get them for about $0.50 each as opposed to $10 at SF or adafruit.

Do yourself a favor and go on eBay and spend about $10 on an assortment pack of 1/4W resistors. You can normally get about 1000 of about 30 or 40 different common values in one pack. SF is about the most expensive route you can go for that sort of part.

Happy new year!


#7

Happy new year to you as well, and thanks again for all the advice and the extra parts.

I am indeed having loads of fun with this…just have to find enough time to fit it in with all my other priorities. :slight_smile: