Go Down

Topic: Charlieplexing Common Anode 7-Segment Display (Read 1 time) previous topic - next topic

bjornert

I'm hoping someone can help me with a bit of charlieplexing...

I want to setup a circuit that has 6 LED's and 2 x 7-segment displays. I am running a Leonardo, with a POT, 4 switches and stepper motor already, and with the LED's and display all connected I'm afraid I just don't have enough pins. I definitely understand the theory behind charlieplexing, and don't have any problem with the layout given all separate LED's...however I'm getting confused when trying to think of this problem with common anode 7-seg displays.

How would one go about charlieplexing with 6 LED's and 2 7 seg displays using only 5 pins (20 diodes total)? I will not need the decimal point.

I used this site to learn a bit...

http://www.instructables.com/id/Controlling-20-Leds-from-5-Arduino-pins-using-Cha/step2/Charlieplexing-The-theory/

and these are the 7-segment displays I'm considering ordering...

https://www.sparkfun.com/products/8546

Any help, direction or guidance would be greatly appreciated!

Thanks!

dc42

Can you explain why you only have 5 pins left? A stepper normally needs no more than 4 pins, so as you have described it you have used only 9 pins and have about 11 pins left - unless your switches are multi-way?

I would look at using standard multiplexing for the displays and LEDs (treating the LEDs like another digit of the display) and look at multiplexing the switches too.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Hippynerd

Because the 7 segment displays have a common lead, they wont charlieplex as well as you would like. In an idea setup, you could control 20 LEDs with 5 pins (5x5 -5=20). You could get ideal charlieplexing if you used seven 7-segment displays (8 if you wanted the .).

That said, you can charlieplex your 6 individual LEDs with one of your 7 segment displays to save a few pins.

If you need to get the number of pins below 5, then you will need to consider some sort of serial transfer (shift register, LED driver, ...)
https://sites.google.com/site/rgbledcubes

bjornert

Thanks for the replies!

I decided not to go with the charlieplexing method and instead opted for an Easydriver stepper motor driver which only required 2 pins. Additionally I removed a number of the LED's I had in my project and now have more space than I know what to do with!

Thanks again!

Go Up