Hi all,
I'm working on a small project that uses a graphic LCD. I'd like to be able to control the backlight (possibly PWM for brightness). On this module the backlight ground is tied to the module ground, so I can't switch the low side. The backlight runs at 3.3V and maxes out at about 50mA. A bit of extra capacity might be nice just in case I ever size up a bit on the screen. What would be a good way to handle this? Space will be a bit limited so fewer parts would be better, and this is a low volume thing so I'm happy to spend a bit more on a transistor if it means fewer external parts. 3.3V is definitely not my area of expertise when it comes to switching, so any help would be appreciated. Thank you! Josh -- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams -- http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
What is your supply voltage, 5V or more?
You could use a high level linear constant current driver and switch it via PWM, or use a buck regulator with current feedback from the baclkight, then pwm control the regulator. John On 29/08/2020 21:27, Josh Koffman wrote: > Hi all, > > I'm working on a small project that uses a graphic LCD. I'd like to be > able to control the backlight (possibly PWM for brightness). On this > module the backlight ground is tied to the module ground, so I can't > switch the low side. > > The backlight runs at 3.3V and maxes out at about 50mA. A bit of extra > capacity might be nice just in case I ever size up a bit on the > screen. > > What would be a good way to handle this? Space will be a bit limited > so fewer parts would be better, and this is a low volume thing so I'm > happy to spend a bit more on a transistor if it means fewer external > parts. 3.3V is definitely not my area of expertise when it comes to > switching, so any help would be appreciated. > > Thank you! > > Josh -- http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
In reply to this post by Josh Koffman
For fun I ended up doing a lot of the work for you.
PNP BJT transistor, MMBT2907* SOT-23 Collector current 100mA, Base current 10mA. Estimated temperature rise approx 5C at room temperature. (Vce-sat=0.1V @ Ic=100mA and Ib=10mA - > 10mW power dissipation - > 5C temperature rise ) A 220 ohm resistor to base driven by a micro would likely do the trick. See in the datasheet ON Semiconductor "MMBT2907AL,SMMBT2907AL" the graph "Figure 4. Collector Saturation Region" base current vs Vce. *not necessarily the best transistor, just the first one I remembered. Regards, Jason White On Saturday, August 29, 2020, Josh Koffman <[hidden email]> wrote: > Hi all, > > I'm working on a small project that uses a graphic LCD. I'd like to be > able to control the backlight (possibly PWM for brightness). On this > module the backlight ground is tied to the module ground, so I can't > switch the low side. > > The backlight runs at 3.3V and maxes out at about 50mA. A bit of extra > capacity might be nice just in case I ever size up a bit on the > screen. > > What would be a good way to handle this? Space will be a bit limited > so fewer parts would be better, and this is a low volume thing so I'm > happy to spend a bit more on a transistor if it means fewer external > parts. 3.3V is definitely not my area of expertise when it comes to > switching, so any help would be appreciated. > > Thank you! > > Josh > -- > A common mistake that people make when trying to design something > completely foolproof is to underestimate the ingenuity of complete > fools. > -Douglas Adams > -- > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- Jason White -- http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
Addendum to my email. I am assuming that the backlight has a current
limiting resistor installed and that the PNP transistor is tied to the 3.3 volt rail and that the micro can drive to required 10mA. -- Jason White -- http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
In reply to this post by John Lawton
> What is your supply voltage, 5V or more? > > You could use a high level linear constant current driver and switch it > via PWM, or use a buck regulator with current feedback from the > baclkight, then pwm control the regulator. > > John Most PIC pins are often good for 25 mA. You COULD maybe parallel two pins and do a timer interrupt to switch the pins together for the PWM, then have a resistor from those two pins to the backlight. Another approach would be to use a PNP transistor with the emitter at Vcc, a resistor from the base to the PWM pin, then a resistor from the collector to the high side of the backlight. The PWM would be "upside down" since a high output would turn off the transistor. I'm assuming above that the PIC supply is high enough to light the LED. If not, another approach would be to have the PIC drive an NPN transistor or N channel FET. The drain would go to Vcc through an inductor. The backlight high side would connect to the collector/drain. When the transistor turns off, the collector voltage will increase as the inductor magnetic field collapses. It will then force current through the backlight. The current through the backlight at the start would be the final inductor current, then linearly ramp down. You might do a constant pulse duration so the inductor ramps up to a fixed current, then vary the frequency go get varying duty cycle. There are likely to be some oscillations, so an RC snubber might be required to clean up the waveforms. Good luck! Harold -- FCC Rules Updated Daily at http://www.hallikainen.com Not sent from an iPhone. -- http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
In reply to this post by Jason White-20
On Sat, Aug 29, 2020 at 4:51 PM Jason White
<[hidden email]> wrote: > > For fun I ended up doing a lot of the work for you. > > PNP BJT transistor, MMBT2907* SOT-23 > Collector current 100mA, Base current 10mA. Estimated temperature rise > approx 5C at room temperature. (Vce-sat=0.1V @ Ic=100mA and Ib=10mA - > > 10mW power dissipation - > 5C temperature rise ) > > A 220 ohm resistor to base driven by a micro would likely do the trick. > > See in the datasheet ON Semiconductor "MMBT2907AL,SMMBT2907AL" the graph > "Figure 4. Collector Saturation Region" base current vs Vce. > > *not necessarily the best transistor, just the first one I remembered. Hi Jason, I appreciate the help! I feel like I recently saw some MMBT2907s in my stash of parts....somewhere. I will have to figure out where...and why I had them! Thank you! Josh -- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams -- http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
In reply to this post by Harold Hallikainen-3
Hi Harold!
On Sat, Aug 29, 2020 at 8:00 PM Harold Hallikainen <[hidden email]> wrote: > Most PIC pins are often good for 25 mA. You COULD maybe parallel two pins > and do a timer interrupt to switch the pins together for the PWM, then > have a resistor from those two pins to the backlight. This particular design isn't using a PIC. I realize now I've been spoiled for years by high powered I/O. I can't even parallel anything as I'm already about 3-4 pins short of where I want to be! > Another approach would be to use a PNP transistor with the emitter at Vcc, > a resistor from the base to the PWM pin, then a resistor from the > collector to the high side of the backlight. The PWM would be "upside > down" since a high output would turn off the transistor. The resistor from the collector to the backlight is the regular current limiting LED resistor, correct? Thank you! Josh -- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams -- http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
Hi Josh!
Yes, the resistor from the collector to the backlight is the regular LED current limit resistor. Ideally the transistor is driven into saturation, so there's only a few hundred millivolts across the transistor. Harold > Hi Harold! > > On Sat, Aug 29, 2020 at 8:00 PM Harold Hallikainen > <[hidden email]> wrote: >> Most PIC pins are often good for 25 mA. You COULD maybe parallel two >> pins >> and do a timer interrupt to switch the pins together for the PWM, then >> have a resistor from those two pins to the backlight. > > This particular design isn't using a PIC. I realize now I've been > spoiled for years by high powered I/O. I can't even parallel anything > as I'm already about 3-4 pins short of where I want to be! > >> Another approach would be to use a PNP transistor with the emitter at >> Vcc, >> a resistor from the base to the PWM pin, then a resistor from the >> collector to the high side of the backlight. The PWM would be "upside >> down" since a high output would turn off the transistor. > > The resistor from the collector to the backlight is the regular > current limiting LED resistor, correct? > > Thank you! > > Josh > -- > A common mistake that people make when trying to design something > completely foolproof is to underestimate the ingenuity of complete > fools. > -Douglas Adams > -- > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- FCC Rules Updated Daily at http://www.hallikainen.com Not sent from an iPhone. -- http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
Free forum by Nabble | Edit this page |