Offline
Sr. Member
Karma: 15
Posts: 463
|
 |
« on: November 29, 2012, 08:46:43 pm » |
Hi all,
I recently did a small project that needed an LCD display with an LED backlight. I wanted to use a regulated current source so that the display wouldn't flicker with power supply voltage changes.
Here's what I came up with, and it worked nicely.....
The microcontroller circuit itself only used about 20 mA, so I just used a 22 ohm resistor for R and supplied the LCD backlight with a constant 230 millamps.
Nice thing is, the LCD backlight current stays constant whether the input power is 9 volts, 12 volts or whatever. Of course, suitable heat sinking for the 7805 may be necessary, and Vin has to be at least 7 to 8 volts.
Hope this helps someone......
|
|
|
|
« Last Edit: November 29, 2012, 08:54:00 pm by Krupski »
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #1 on: November 30, 2012, 06:14:33 am » |
How's that different from powering the led as a load to the regulator?
|
|
|
|
|
Logged
|
|
|
|
|
Central MN, USA
Offline
Faraday Member
Karma: 38
Posts: 6056
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
|
 |
« Reply #2 on: November 30, 2012, 12:34:11 pm » |
Thanks for the circuit. BTW, how did you make that display image saying "setup mode is active ..."? I'm documenting my LCD menu library and can use some decent display images like that.
|
|
|
|
|
Logged
|
|
|
|
|
Norfolk UK
Offline
Edison Member
Karma: 25
Posts: 1424
|
 |
« Reply #3 on: November 30, 2012, 12:42:04 pm » |
Thanks for the circuit. BTW, how did you make that display image saying "setup mode is active ..."? I'm documenting my LCD menu library and can use some decent display images like that.
Most likely a font like this http://www.dafont.com/display-otf.font
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 283
Posts: 15443
Measurement changes behavior
|
 |
« Reply #4 on: November 30, 2012, 12:57:01 pm » |
Hi all,
I recently did a small project that needed an LCD display with an LED backlight. I wanted to use a regulated current source so that the display wouldn't flicker with power supply voltage changes.
Here's what I came up with, and it worked nicely.....
The microcontroller circuit itself only used about 20 mA, so I just used a 22 ohm resistor for R and supplied the LCD backlight with a constant 230 millamps.
Nice thing is, the LCD backlight current stays constant whether the input power is 9 volts, 12 volts or whatever. Of course, suitable heat sinking for the 7805 may be necessary, and Vin has to be at least 7 to 8 volts.
Hope this helps someone......
Your drawing show you grounding the center pin of the 7805. I don't think that is the proper way to wire up a 7805 as a constant current source. http://talkingelectronics.com/projects/30%20LED%20Projects/images/ConstantCurrent-2.gifLefty
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Sr. Member
Karma: 15
Posts: 463
|
 |
« Reply #5 on: November 30, 2012, 01:54:47 pm » |
How's that different from powering the led as a load to the regulator?
The regulator is setup as a constant current source. With 22 ohms across 5 volts, you have a constant 230 milliamps regardless of V-in. With that circuit, if V-in was 9 volts or 12 or 15 or 35 the LED backlight current would stay the same (of course the regulator would get very hot - LOL!).
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Sr. Member
Karma: 15
Posts: 463
|
 |
« Reply #6 on: November 30, 2012, 02:00:00 pm » |
Thanks for the circuit. BTW, how did you make that display image saying "setup mode is active ..."? I'm documenting my LCD menu library and can use some decent display images like that.
It's a Truetype font. I just went into my photo editor, made an "led green" background and then used the font to make the characters. I also made another image of all active pixels, then averaged them together to get the "faint shadow of a pixel" effect. The font is attached as a ZIP file. Hope you can make use of it.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Sr. Member
Karma: 15
Posts: 463
|
 |
« Reply #7 on: November 30, 2012, 02:02:20 pm » |
Yes it is correct. It's a standard wiring for a voltage regulator. The 22 ohm resistor across the output causes a constant 230 milliamp draw from the input side... and since the 5 volts is regulated, the input current remains the same. Look at the circuit again. The point of my design is to BOTH provide a regulated current for the LED AND provide +5 regulated for the processor all from one device.
|
|
|
|
« Last Edit: November 30, 2012, 02:03:52 pm by Krupski »
|
Logged
|
|
|
|
|
Central MN, USA
Offline
Faraday Member
Karma: 38
Posts: 6056
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
|
 |
« Reply #8 on: November 30, 2012, 02:33:59 pm » |
Thanks for the circuit. BTW, how did you make that display image saying "setup mode is active ..."? I'm documenting my LCD menu library and can use some decent display images like that.
It's a Truetype font. I just went into my photo editor, made an "led green" background and then used the font to make the characters. I also made another image of all active pixels, then averaged them together to get the "faint shadow of a pixel" effect. The font is attached as a ZIP file. Hope you can make use of it. Great! Thanks!
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 283
Posts: 15443
Measurement changes behavior
|
 |
« Reply #9 on: November 30, 2012, 02:35:05 pm » |
Yes it is correct. It's a standard wiring for a voltage regulator. The 22 ohm resistor across the output causes a constant 230 milliamp draw from the input side... and since the 5 volts is regulated, the input current remains the same. Look at the circuit again. The point of my design is to BOTH provide a regulated current for the LED AND provide +5 regulated for the processor all from one device. Ok, perhaps it's because I don't see the actual pinout connections to and from the LCD module for both Vcc and the backlight led connections. If it works it works, that's for sure.  Lefty
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #10 on: November 30, 2012, 02:48:11 pm » |
The regulator is setup as a constant current source. With 22 ohms across 5 volts, you have a constant 230 milliamps regardless of V-in. The regulator is NOT setup as a constant current source: it is setup as a constant VOLTAGE source. The only reason it is providing (fairly) constant current to the LED is due to its constant VOLTAGE output on a constant load (that resistor). The advantage I see is that by wiring the led pre-regulator, you have lessened the voltage drop thus power dissipation over the regulator. The drawback obviously is that the voltage drop over the led + regulator is now much higher.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Sr. Member
Karma: 15
Posts: 463
|
 |
« Reply #11 on: December 01, 2012, 12:59:10 am » |
Ok, perhaps it's because I don't see the actual pinout connections to and from the LCD module for both Vcc and the backlight led connections. If it works it works, that's for sure.  Lefty The "pinout" is simply an LED array (the LCD backlight). The V+ coming in goes into the LCD backlight LED array, comes out and is returned to the negative side via the 7805 acting as a constant current sink. (edit to add): The LCD backlight LED array is completely isolated from the LCD. The LCD is an Optrex 20261 (plain old HD44780 style parallel interface LCD). The LCD has 14 pins (not 16). The 22 ohm resistor across the 7805 output causes a 5/22= 0.230 ampere current that remains constant because the 5 volts stays constant and the 22 ohm R stays constant. Therefore, the current flowing through the LCD backlight LED array is constant at approximately 230 milliamps. The regulated 5 volt output pin of the 7805 ALSO acts as a power source for the UNO board. But the UNO board only draws a few milliamps (which is ADDED to the current going through the LCD backlight LED array), but it's so small it makes no difference... I guess my initial mistake was calling it a constant current SOURCE. It's actually a constant current SINK.
|
|
|
|
« Last Edit: December 01, 2012, 01:12:10 am by Krupski »
|
Logged
|
|
|
|
|
Offline
Sr. Member
Karma: 15
Posts: 463
|
 |
« Reply #12 on: December 01, 2012, 01:07:01 am » |
The regulator is setup as a constant current source. With 22 ohms across 5 volts, you have a constant 230 milliamps regardless of V-in. The regulator is NOT setup as a constant current source: it is setup as a constant VOLTAGE source. The only reason it is providing (fairly) constant current to the LED is due to its constant VOLTAGE output on a constant load (that resistor). The advantage I see is that by wiring the led pre-regulator, you have lessened the voltage drop thus power dissipation over the regulator. The drawback obviously is that the voltage drop over the led + regulator is now much higher. I guess technically you are right. It's wired as a constant current SINK (and also happens to be a constant voltage SOURCE).Absolutely correct... and in fact one of the primary reasons for doing it. This isn't a drawback. The drop across the LCD backlight LED array plus the mandatory 3 volt differential required by the 7805 (plus the 5 volts itself!) makes a perfect match for a 12 volt DC wall wart. Very little excess power is dissipated by the 7805, so minimal heat sinking is required. I get clean, regulated 5 volts for my processor board and a nice constant current for my LCD backlight LED array. The processor draws so little that it doesn't matter. It seems like a win-win setup to me! 
|
|
|
|
« Last Edit: December 01, 2012, 01:15:51 am by Krupski »
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #13 on: December 01, 2012, 05:32:02 am » |
This isn't a drawback. What happens if you attempt to power this whole thing up with a 7v source?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Sr. Member
Karma: 15
Posts: 463
|
 |
« Reply #14 on: December 01, 2012, 12:47:20 pm » |
This isn't a drawback. What happens if you attempt to power this whole thing up with a 7v source? Of course it won't work at 7 volts! You need about 3.4 volts for the backlight, plus about 3 volts for the mandatory 7805 differential plus 5 = about 11.4 = 12 volts. Why try to discredit a circuit design by asking "what happens if you don't provide sufficient input voltage"? That circuit was part of a project that I built for a research project at school (I'm an engineer there, not a student). The design goals for the regulator were: (1) Simplicity (2) Minimal power waste (3) Constant current for the backlight (4) Constant voltage for the Arduino (5) Works with a standard voltage wall wart The circuit meets all those needs. The mistake I made was putting too low a voltage number in the drawing.... but anyone who intends to use the circuit and understands how it works will surely know what to do.
|
|
|
|
|
Logged
|
|
|
|
|
|