Digital Dude needs Analog Advice

Thread Starter

Jack B. Nimble

Joined Mar 18, 2012
3
Hey Folks:

I need to control a single LED via an I2C bus. I thought I had it in the bag until realizing my digital pot chip can only sink 2.5 mA (see Circuit A).

Board space is minimal, so I'm wondering about using a single Bipolar Junction Transistor in a SOT-23 package to control LED brightness. (See Circuit B). Seems pretty elementary, but I rarely do anything that's not either 0 or 5 volts and I'm full of questions, e.g. what type/brand of transistor would be appropriate? Any way I could I get along without current limiting resistor(s)?

All thoughts appreciated.

-Jack



 

MrChips

Joined Oct 2, 2009
30,824
Seems a bit overkill to me. If you want to control the intensity of an LED from a microcontroller, use PWM output from a single pin. No transistor or resistor needed but I would include the resistor for safety.
 

Thread Starter

Jack B. Nimble

Joined Mar 18, 2012
3
So, use one of the I2C lines and send PWM pulses out. No need for a digital pot.
Hmmmm, I like the way you're thinking here - such an approach might work. It's just that my motherboard has 3 other active devices the I2C bus, and I wonder if "borrowing" one of the I2C lines for PWM pulses might gum up normal I2C operations.

Thanks, Mr. Chips. I'll noodle on this and report back.

-Jack
 

Audioguru

Joined Dec 20, 2007
11,248
Your digital pot feeding the common-emitter transistor amplifier will do nothing for the first 31 steps then the LED will begin to turn on. Temperature changes will affect the brightness very much. When the pot reaches the 36th step then the LED will be about as bright as it will ever be but again temperature changes will affect its brightness.
 
Top