Best way to get 2.5 volts from somewhere? (Vcc = 5 volts)

I thought that I replied to this yesterday but I can't see it here so I'll post again...

There's a potential problem here. Consider what voltage you will be getting from the MCU pin. It will _not_ be 0V, 5V, or Hi-Z. Most 5V devices aim for TTL compatibility. From memory that allows a low to be up to 0.8V and a high to be as low as 2.0V. Therefore it is possible for your 'high' voltage to be below the 2.5V centre voltage.

This is of course the worst case scenario, but the LED barrier voltage is also conspiring against you. This varies from device to device but is typically around 1.7V. 2.5 + 1.7 = 4.2V needed from the pin in its high state, which is asking a lot from a 5V device, particularly when you are drawing current from it.

Do yourself a favour. Put an H-bridge in there.

--
Andrew Smallshaw
andrews@sdf.lonestar.org
Reply to
Andrew Smallshaw
Loading thread data ...

I thought that I replied to this yesterday but I can't see it here so I'll post again. Having news server issues at the moment.

There's a potential problem here. Consider what voltage you will be getting from the MCU pin. It will _not_ be 0V, 5V, or Hi-Z. Most 5V devices aim for TTL compatibility. From memory that allows a low to be up to 0.8V and a high to be as low as 2.0V. Therefore it is possible for your 'high' voltage to be below the 2.5V centre voltage.

This is of course the worst case scenario, but the LED barrier voltage is also conspiring against you. This varies from device to device but is typically around 1.7V. 2.5 + 1.7 = 4.2V needed from the pin in its high state, which is asking a lot from a 5V device, particularly when you are drawing current from it.

Do yourself a favour. Put an H-bridge in there.

--
Andrew Smallshaw
andrews@sdf.lonestar.org
Reply to
Andrew Smallshaw

And for the rest of us dumb old timer (in the OP's mind), we just drive LEDs low with separate pins. Sometimes, we need to KISS up.

Reply to
linnix

From p.135 of the PIC16F684 datasheet: Voh min = Vdd - 0.7V at 3.0 mA and Vdd=4.5V Vol max = 0.6V at 8.5 mA and Vdd=4.5V So no problem getting 4.3V with a 5V supply. Actual values at room temperature are even better than this.

A bigger concern is how he plans to multiplex the LEDs. The maximum current into/out of Vdd or Vss is 95mA. So if he's using 25mA per LED and has more than three LEDs connected in this manner, all it takes is one small glitch somewhere to turn them all on at once and there goes the CPU. This might be an acceptable risk for his hobby project but not something I would ever do in a commercial product.

Reply to
Tom

At 3.0mA. I would expect the voltage to drop further as the LED draws, say, 25mA. You may end up with LEDS that are lit but unusably dim.

--
Andrew Smallshaw
andrews@sdf.lonestar.org
Reply to
Andrew Smallshaw

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.