Nice way to power an LCD backlight

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.

liudr:
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 Display Font | dafont.com

Krupski:
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.


Lefty

dhenry:
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!).

liudr:
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.

LCD_Font.zip (6.37 KB)

retrolefty:
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.gif

Lefty

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.

Krupski:

liudr:
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!

Krupski:

retrolefty:
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.gif

Lefty

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. :wink:

Lefty

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.

retrolefty:
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. :wink:

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.

dhenry:

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! :slight_smile:

This isn't a drawback.

What happens if you attempt to power this whole thing up with a 7v source?

dhenry:

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.

Why try to discredit a circuit design by asking "what happens if you don't provide sufficient input voltage"?

Trust me when I say that no one here is important enough for me to discredit, you included. I was simply pointing our your design's limitations so that more people can use it successfully.

The mistake I made

is to think that you can design a circuit without limitations.

The most successful designs are those that made the best compromises for their respective applications.

This post is for smusante in reply to his PM to me. I posted here rather than answering the PM so that others may make use of the info.

smusante:
I saw your post about the way you hooked up the Optrex DMC20261 display. I have one of these and cannot make it work like all of my other displays. Could you post on how you hooked it up, what library you use, and what voltage level it needs? I can only get a backlit screen. No characters show up no matter where I turn the 1K pot. I am using the standard LiquidCrystal arduino library. I don't have this problem with my 16x2 or my 20x4 displays. I'm stumped.

Thanks,

Steve

Steve, the newer Optrex displays require a NEGATIVE VEE supply. In the past, they worked properly with the VEE pin tied to ground. Now they require about -3.5 volts. Here is a circuit that I used to generate the negative VEE supply using an Arduino PWM output (it MUST be a PWM pin).

Use this circuit, then set the PWM pin to analogWrite(pin, 127) to generate a 50% duty cycle square wave to drive the inverter. If the LCD display ends up too dark (i.e. too much contrast), you can decrease the negative voltage by using a smaller value on the PWM pin (i.e. analogWrite(pin, 64)). Use any value between 0 and 127 to get the contrast you want. Going above 127 is pointless since 128 to 255 is equivalent to 127...0. :slight_smile:

(edit to add): Capacitor values are not critical. 1uF to 100uf will work equally well. The diodes are not critical either. They can be 1N4148, 1N914, even 1N4001. The resistor isn't critical either (maybe not even necessary). I used it to limit the current surge on the AVR pin when the circuit is first powered up and the caps are discharged. You can probably get away without it.

dhenry:

Why try to discredit a circuit design by asking "what happens if you don't provide sufficient input voltage"?

Trust me when I say that no one here is important enough for me to discredit, you included. I was simply pointing our your design's limitations so that more people can use it successfully.

The mistake I made

is to think that you can design a circuit without limitations.

The most successful designs are those that made the best compromises for their respective applications.

(1) I said you were trying to discredit the CIRCUIT DESIGN, not the DESIGNER. I do not claim to be anything special.

(2) I never said the circuit was without limitations. Of course it won't work on 7 volts. It won't work on 120 volts either. So yes I guess it has limitations.

(by the way, in case you don't know, posting text in purple is the way [on another board I frequent] of marking the text as sarcasm). :slight_smile:

retrolefty:
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.gif

Lefty

Current in a series circuit is equal at any point. Take the drawing you posted the link for and move the LED from the ground side to the plus side of the series circuit and tell me what the difference is.

Krupski,

Thanks for that info. I was able to quickly verify that the display is not dead by using a 9V battery in reverse through a 10K pot. Now I cannot get any activity so I am still not out of the woods. I am using the LuquidCrystal library. Is there a special Optrex library with different parameters?

Thanks for your help.

smusante:
Krupski,

Thanks for that info. I was able to quickly verify that the display is not dead by using a 9V battery in reverse through a 10K pot. Now I cannot get any activity so I am still not out of the woods. I am using the LuquidCrystal library. Is there a special Optrex library with different parameters?

Thanks for your help.

The DMC-20261 works fine with the stock "LiquidCrystal" library.

BTW, good idea testing the negative VEE with a pot and 9V battery... clever.

Hopefully you only have something mis-wired and not a blown display module.

Good luck!

-- Roger