esklar81 wrote:tetsujin wrote:There's some voltage drop (usually around 0.5V - 0.7V) associated with the transistor inside the microcontroller which drives the port. So if you hook an I/O pin to an LED to ground, your voltage drop across the LED is probably no more than 2.5V. If you hook an I/O pin to an LED to another I/O pin, your voltage drop across the LED is probably less than 2V.
tetsujin,
What, if any, is the dependence of that voltage drop on the current?
You mean the voltage
drop across the LED, or the voltage
drop associated with the microcontroller's output driver?
voltage
drop across the LED increases as current through the LED increases, of course - according to a non-linear relationship shown in the LED datasheet.
Voltage
drop associated with the microcontroller's output driver is a similar curve, I believe (it's a diode thing - or in this case a transistor thing, really) - but the variance in voltage is pretty small. My usual working assumption is that if a transistor's operating, it drops about 0.7V.
tetsujin wrote:So, yeah, you need more voltage. If your power source really is 3.3V, you could use a DC-DC booster to get this. If you're using a higher voltage and regulating it down to 3.3V for the microcontroller, you could take the unregulated source voltage for the LED's common anode, and use current sink source devices (attached to microcontroller pins) to drive and control the individual LEDs...
I'd be careful about using an "unregulated" source, but one could use an externally regulated one (USB comes to mind) or regulate it to a more useful value, such as 4 to 5 V.
Well, what I described above
was using a regulated source - or rather a regulated
sink. A current sink driver regulates the amount of current flowing through it. It does this by increasing its output voltage any time the current through the device is too high. So if the unregulated source suddenly spiked, the voltage on the sink driver (on the LED cathode) would quickly increase to match, keeping the voltage
drop across the LED itself consistent.
I've thought of a kluge to avoid having to provide drivers. How about connecting the diodes between (a constant source slightly above the desired forward voltages) and (appropriate resistors to output pins of the uCTLR)?
Yes, that would work as well. Kind of like what I suggested, except with regulated voltage instead of regulated current. If the output high voltage of the microcontroller connected to LED cathode wasn't enough to turn the LED off, you could also set the pin as an input - inputs are high-impedance, so not enough current will sink to light the LED. Though you still have to make sure the voltage that reaches this input pin is within the absolute maximum specified in the microcontroller's datasheet, whether the pin is set as an input or not...)
tetsujin wrote:Incidentally - esklar - personally I find all this green text to be rather annoying. Perhaps you would consider not using the color tag?
For you, I've posted this in "basic black". What bothers you about green?
Thanks, you're too kind.
I just find it a bit jarring when people color their posts. Black text on a light background is nice and high-contrast, good for reading. Colored text means reduced contrast. Better to stick to clarity IMO.