0
\$\begingroup\$

I am trying to make a circuit that uses 3 pins to drive 6 LEDs using charlieplexing. The cicuit im using is this:

enter image description here

What I don't understand though, is that when I want to turn D1 on, PB0=1, PB1=0, and PB4=high impedance. That turns D1 on, but also D5 and D4, as shown in the other image. I don't understand how to avoid that. Could it be because im using different color LEDs with different forward voltages?

enter image description here

Thanks in advance

\$\endgroup\$
  • 2
    \$\begingroup\$ It appears that your LEDs can run off of half the supply voltage. I think we need more details about the LEDs and your VCC supply rails. \$\endgroup\$ – jonk Mar 18 at 2:17
  • 1
    \$\begingroup\$ Try inserting series resistors from each of your I/O pins to their nodes. The single-LED path will hog current, sufficient to drop enough voltage across the series resistors to effectively shut down your dual-LED paths. At least it's cheap to test. \$\endgroup\$ – jonk Mar 18 at 2:24
  • 1
    \$\begingroup\$ I am using LEDs with 2.1V forward voltage and supply of 5V. I hadn't thought of that, but it makes sense now that the supply should be lower, use higher forward voltage LEDs, or add resistors. I will try adding resistors soon and test it out, many thanks \$\endgroup\$ – Eric Navarrete Mar 18 at 2:38
  • \$\begingroup\$ I should ask: If the LEDs have Vfwd=2.1 V, then why do you use two different resistor values? (I had imagined before that this meant slightly different Vfwd voltages and therefore different colors.) \$\endgroup\$ – jonk Mar 18 at 2:57
  • \$\begingroup\$ Whoops sorry, originally I was using Green, yellow, and red LEDs, but I swapped to using all yellow after making the post to see if that made a difference \$\endgroup\$ – Eric Navarrete Mar 18 at 9:58
1
\$\begingroup\$

The section on Forward Voltage in Wikipedia's Charlieplexing article explains it like this:

[Unwanted LEDs lighting] is also a problem where the LEDs are using individual resistors instead of shared resistors, if there is a path through two LEDs that has less LED drop than the supply voltage these LEDs may also illuminate at unintended times.

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

With Charliplexing, you have to have an array of pure LEDs, with the current limiting resistors in series with the driving pins. This allows the 'on' LEDs to pull the voltage down to a point where two series 'off' LEDs cannot light. If there are resistors within the matrix, then enough voltage can still be developed to leave the off LEDs on. It uses fewer resistors this way as well.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.