charlieplexing bi-directional LED strings at 24V with 5V microcontroller

Thread Starter

JunkieNL

Joined Mar 19, 2020
32
Initial situation
I am using an Arduino to charlieplex some LEDs. Both LEDs are actually in a single package, that is either green or red depending on the polarity. This gives me control over colour and brightness, while only using two I/O pins and two wires to the LED.
image1.png

Goal and problem
I want to expand this to several strings of several LEDs. The total current and voltage exceeds what the Arduino can provide. A circuit is needed to expand every Arduino output pin with the following requirements:
• 5V logic input @ max. 5 mA
• 24V logic output @ ~10 mA
• switching @ ~1 kHz

Possible solution 1
I thought about using BJTs and/or MOSFETs and found this circuit:
image2.png
Vout should be both a source and a sink for charlieplexing. Is this a proper (10 mA) sink when M1 is turned on? (I don’t think so, but I am not sure) Is there another way of doing this? Preferably with even fewer components.


Possible solution 2
I thought about using an H-bridge like you would connect a motor, but I guess it only switches polarity so it will not be able to turn both LEDs off at the same time. Then I looked at the datasheet of the L293. https://www.ti.com/lit/ds/symlink/l293.pdf
image3.png

Does this look like a proper source and sink output that I could use at 24V? Could I connect it like the figure below and connect 2 LED strings to 4 Arduino pins using 1 one these?
image4.png

Am I overlooking something or is there an easier solution altogether? Any help is appreciated.
 

Thread Starter

JunkieNL

Joined Mar 19, 2020
32
hi JNL.
A couple of simple options, using 7406/7
I do not have models for the the 7406/7 so have modelled them using 4049/50 + a NPN for o/c operation.
E
Hello Eric,

Thank you for your input. Did you just make this model? That is awesome. I have LTspice installed, but not yet found the time to play with it.

In your simulation the voltage across the LEDs is still less than 5 volts, but I guess that that will increase if you add more LEDs. This is very interesting.
 

ericgibbs

Joined Jan 29, 2010
12,884
hi JNL,
I have the LTS CD4000.lib installed.

If that method looks interesting, you could reduce it even further by using a couple of N MOSFET's with a low Vgs voltage.
Drive them directly from the Arduino output pins.

Select the series resistors to suit the number of LED's in a string current.
If the Reverse voltage on a string, exceeds the LED limits, add a high value resistor across each LED.

There are a number of LTS user on AAC, so if you get the bug, you will get help.
E

Update:
Using N MOSFET
Added asc file
 

Attachments

Last edited:

Thread Starter

JunkieNL

Joined Mar 19, 2020
32
So I got started with LTspice, which must be the worlds most unintuitive program ever. The circuit seems to be working as intended. Thank you, Eric, your help made my first steps in LTspice a lot easier.

Next step is to improve on this and actually build it. Too bad my Christmas holiday is ending today. It was fun while it lasted. :/


LTspice.png
 

ericgibbs

Joined Jan 29, 2010
12,884
hi JNL.
Looks good to me.
On my drawing I should have drawn a link wire for the LED's, it does not affect the circuit, check this image.
As the LED's are just two wires ie: direction of applied voltage determines the colour, the comment I made earlier about the LED reverse voltage limit does not apply.
E
AAA 968 08.34.gif
 
hi JNL,
I have the LTS CD4000.lib installed.

If that method looks interesting, you could reduce it even further by using a couple of N MOSFET's with a low Vgs voltage.
Drive them directly from the Arduino output pins.

Select the series resistors to suit the number of LED's in a string current.
If the Reverse voltage on a string, exceeds the LED limits, add a high value resistor across each LED.

There are a number of LTS user on AAC, so if you get the bug, you will get help.
E

Update:
Using N MOSFET
Added asc file

Your information is very interesting. Thank you for sharing
 
Last edited by a moderator:
Top