Charlieplexed PWM LED Driver at 3.3v

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
grpfrkt
 
Posts: 5
Joined: Tue Jul 27, 2021 8:28 am

Charlieplexed PWM LED Driver at 3.3v

Post by grpfrkt »

Hello,
I'm putting together a project using the IS31FL3731 16x9 Charlieplexed PWM LED Driver and only now noticed I need to match the logic levels with the power input.

I'm using a PowerBoost 500c to drive this, which puts me at 5V and a Teensy LC which is 3.3v. I don't think the Teensy can supply enough juice on it's 3.3v output to drive all those leds (max 100mA), so it's gonna have to be 5V supply.

The docs have this mysterious sentence which I'm having some trouble parsing:
(...) you can power from 5V and then use ~2.2K resistors from SDA and SCL to 3.3V to 'overpower' the built in 20K pullup resistors.
Do I simply put a 2.2K resistor each between the LED driver and Teensy SDA/SCL pins?
That doesn't sound quite right to me, but I don't fully understand this, so, some help would be appreciated!

grpfrkt
 
Posts: 5
Joined: Tue Jul 27, 2021 8:28 am

Re: Charlieplexed PWM LED Driver at 3.3v

Post by grpfrkt »

perhaps i should clarify that the teensy and the led driver are the only two things on the i2c bus.

User avatar
alan_meowwolf
 
Posts: 4
Joined: Mon Aug 02, 2021 8:12 pm

Re: Charlieplexed PWM LED Driver at 3.3v

Post by alan_meowwolf »

You'll want to add the 2.2k resistors from both the SCL and SDA lines directly to 3.3v. The driver board has 20k pull-up resistors built-in, which is fine for 5v logic, but you need to bring that value down by adding the parallel resistors for 3.3v logic.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Charlieplexed PWM LED Driver at 3.3v

Post by adafruit_support_mike »

grpfrkt wrote:Do I simply put a 2.2K resistor each between the LED driver and Teensy SDA/SCL pins?
Yep.

What you’re doing is making a voltage divider with the 20k pull-up connected to 5V, the 2.2k connected to GND (occasionally) through the Teensy’s SDA or SCL pins, and the IS31IFL3731’s input connected to the point where the two resistors meet.

With those resistor values, about 90% of the voltage difference between 5V and the Teensy’s SDA/SCL pins will fall across the 20k pull-ups. The remaining 10% will show up across the 2.2ks.

I2C pins work by opening/closing a low-resistance path to GND, so we can treat them as switches that are either open (infinite resistance) or closed (zero resistance).

When the resistance through the Teensy’s pins is infinite, the IS31IFL3731’s input pins don’t see any connection to GND at all. They only see a connection to 5V through the 20k pull-up.

When the resistance through the Teensy’s pins is zero, that end of the 2.2k resistor is connected to GND. The voltage difference between the ends of the voltage divider is 5V, and 10% of that voltage.. 500mV.. appears across the 2.2k. The IS31IFL3731’s input sees 0.5V, which it can accept as ‘low enough to count as LOW’.

Things are actually a little more complicated though..

The Teensy’s pins have built-in diodes that keep them from being damaged by voltages above 3.3v or below 0V (static electricity, mostly). Those start to conduct current about 0.4V beyond the supply rails, so the IS31IFL3731’s 20k pull-ups actually see about 3.7V when the Teensy’s SDA/SCL pins are in their high-resistance state.

That’s fine on both sides. The IS31IFL3731 considers ‘high enough to count as HIGH’ to start at 3.5V, and 3.7V is in that range. You do get some current flowing through the 20k pull-ups and protection diodes, but not much. The voltage difference between 3.7V and 5V is 1.3V, and at 1.3V the current through a 20k resistor is 65uA.. easily within the range the Teensy can handle.

grpfrkt
 
Posts: 5
Joined: Tue Jul 27, 2021 8:28 am

Re: Charlieplexed PWM LED Driver at 3.3v

Post by grpfrkt »

Thank you very much! I got impatient and dug out a Teensy 2.0 (which is 5v) and got things working with that. But this will come in handy next time.

Here's what it looks like currently:
PXL_20210804_1450411532_50.jpg
PXL_20210804_1450411532_50.jpg (960.1 KiB) Viewed 77 times

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”