Introduction

The Celtic Engineer is a weekly newsletter produced by Celtic Engineering Solutions.  We hope you enjoy it.  If you have any suggestions for topics, would like to give feedback or want your email added to the distribution list please send an email to TCE@celticengineeringsolutions.com.

It’s not connected?

The first time I designed a circuit with an LCD I remember thinking, “What do you mean the back light is not connected to the power?”  It seems like the light should be connected to the internal power supply of the LCD.  In fact, I would have expected that you would send the LCD a command to turn on the backlight, maybe even dim it, just a bit.  But no!  That is not, in fact, how it works. Most, if not all, have a separate connection for the backlight that you must provide.

Once you get over the initial surprise, you realize this is a much better way of doing things anyway.  In the circuit displayed above, I was providing power to a Newhaven Display.  The display itself took 3.3 volts to operate.  The backlight, on the other hand could take up to 3.5 volts.  Your initial thought should be, well, that’s inconvenient.  And it is, but it is also just the way it goes.

A host of voltages

It always seems that we must deal with a host of voltages.  In this case, I had a 5V input from the USB port the device would be connected to.  I had already chosen an appropriate 3.3V linear regulator for mains.  The backlight required 32mA at 3.5V.

I choose to use the LT1761 low dropout micropower regulator in a TSOT-23 package.  It is rated to handle up to 100mA, 3x what I needed.  It is also a low noise regulator.  Since this is only on the backlight of the LCD you might not think that is terribly important, and you would be sort of right.  Having a low noise regulator is nice because it does not add noise to the rest of the system and that is worth having.

This regulator is not fixed, but rather adjustable.  In a few minutes I had selected the feedback resistors to get the desired 3.5V.

Another nice feature of this regulator is the ability to turn it on and off remotely.  I fed the shutdown, active low, signal back to the MCU.  You might wonder about R5, 49.9K pull-down resistor.  When you turn on a microcontroller, there is a brief period of time before your code is in control.  During that time the output state of the pins are not in your control.  It is nice, in those instances to have hardware to fall back on.  The pull-down resistor keeps the backlight off until we get control of the output pin and tell it to turn on.

How low is off?

The regulator says that the output is off when the shutdown pin is low.  In the datasheet it will tell you the voltage at which it is likely to turn off.  The tricky part is that signal BL-SD is the output of a voltage divider between a week pull-up and 49.9K. Depending on the MCU you choose it could be a week pull-up or it could be high impedance.  The input of pin 3 might be high impedance or it might draw some current.  The 49.9K was a guess.  If the pin was high enough impedance then R5 would pull the voltage low enough to keep U2 off. If not… Well dude, this is a prototype so don’t sweat the small stuff.  If it did not quite work, we would have changed R5 to something smaller.

We want to have R5 as large as possible because we will be pushing current through it the entire time the backlight is on and we are not getting anything extra for wasting power. On the other hand, we want R5 small enough so that the voltage on pin 3, before the MCU code initializes, keeps the regulator off.  Yeah, this is all about a brief flash of light when you first turn on the power.  That is tacky and unprofessional.  So, we want to make sure that we don’t have output voltage at VBL until we really want it there.

On and off and dimmed

On and off is nice and all, but what if you want to have some control over the brightness. We could go all out and control it completely, but that is a high-end device and maybe we just want off/dim/on.  That is not a very hard thing to do, it just requires a little planning. 

The voltage at pin 4 of U2 was selected to provide 3.5V at VBL.  If we want a less bright output, we need some voltage below 3.5V.  That means first of all we need to figure out the actual voltages we want.  The best way to do this would be to hook the LCD up to a benchtop powers supply and test out the backlight.  Try all the permittable values and decide which voltages you need. 

Let’s say we select 3.5v and 2.0V.  That means that to get a 2-volt output we need to have R6 be a bit more than 27K, but when we want to have the output be 3.5V we want R6 to be 10K (actually 9.5K but work with me).  In that case we could break R6 into two parts. The top part, connected to pin 4 is a 10K resistor.  Below that we have a 17K resistor.  In parallel with the 17K resistor we put a small N-channel mosfet.  Now when the gate of the mosfet is high, the effective resistance of the fet is low which shorts out the 17K leaving about 10K which gives us 3.5V at VBL and a bright backlight.  When the gate is low the fet impedance is very high and so we see about 27K to ground at pin 4. VBL is 2 volts and the backlight is dim.  Of course, we still use pin 3 to turn the backlight off completely.

I hope your next LCD project is a spectacular success.

Final thoughts

This newsletter is sponsored by Celtic Engineering Solutions LLC, a design engineering firm based out of West Jordan and Murray, Utah, which can be found on the web at: www.celticengineeringsolutions.com.  We are also on Facebook, Instagram and Twitter.  If we can ever help you with your engineering needs please contact us.  You can find the newsletter on the company blog, LinkedIn or in your inbox by subscribing.  Send your emails to The Celtic Engineer at:  TCE@celticengineeringsolutions.com, with the subject line SUBSCRIBE. 

Do you know someone who would enjoy the newsletter?  Forward them a copy or let them know where to find it.