How to manage backlight on 2004 I2C LCD

Hello,

a question about LCD 2004 (or 1602) with I2C interface:

how to turn on / off backlight (not with jumper) and trim by software (not with hardware trim)?
Also how to turn on / off LCD display by software?

My LCD 2004 I2C is:

Thank you,
Marcello

dependent on used lib

  lcd.noBacklight();
  lcd.backlight();

You can only switch on and off the backlight. You can not dimm with that I2C backpack.

Ok, thank you.

And shut down the LCD (like PC standby) when It's not used (all is powered by a 12V car battery)?

If your i2c backpack has a jumper for the backlight, it may not be possible to control it with lcd.noBacklight()/lcd.backlight(). But you can control, and also dim, the backlight with a transistor and an Arduino PWM pin.

If you are referring to the contrast adjustment, I think this would be quite difficult, and unnecessary, in my opinion.

With the backlight off, the display will draw only a small current. Measure it and you will see. Then consider if it is worthwhile adding extra components to cut power to it completely.

Thank you

The hd44780 library includes
display(), noDisplay() to turn all the pixels on/off
on(), off(), which turns on/off the pixels and the backlight.

You can do off() to reduce power the most and then on() to turn everything back on again and everything on the display is right where you left it.

It is not as easy at it sounds to cut off all the power to the LCD device.
This because the I2c bus will still be powered and if you simply cut off the power to the LCD device, various parts and pins on some of the chips on the LCD/backpack will still be receiving voltage from the i2c signals which violates their electrical specs.
To do it properly you would also have to fully isolate the device from the i2c bus.

And then if you did all that with external hardware, the LCD device would have to be reinitialized when power was re-applied, and then any contents on the display that you wanted would have to be remembered and restored, to get the LCD back in the sate it was in proper to yanking its power.

--- bill

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.