1602 LCD Display Power

With the above display I want to power it with a motion sensor. Could be weeks between viewing the lcd screen so tring to extend the life. Is it best to switch the 5 volts or the contrast for the lcd
Thanks

If you turn off the 5V, you need to init() the LCD when it is woken up.

Generally I use PWM to dim the backlight, but if you want to shutdown the whole LCD - remember to reinitialise and repopulate the content when you bring it back on.

With 5V removed the LCD is a brick, and doesn't remember anything.

There is something called parasitic power; if you don't power a device (IC, LCD) but the controller sets pins high (e.g. 328 continuously writing to display) on that device, your device might still be powered (through protection diodes) drawing current from the controller.

Be aware of that. It's not my area of expertise but setting all pins connected to the LCD to input might prevent that from happening; other's might climb in correcting me if necessary or advising further.

An I2C version is also susceptible to parasitic powering over the I2C lines - maybe even through the pull-up resistors. The powered-down device may also pull low your I2C bus at all times, breaking communications to other devices.

1602 LCD displays may use a few mA even with the backlight off, sucking dry small batteries in weeks.

Before we can answer, we need more information as:

tring to extend the life

is vague.
What are you trying to preserve?
i.e. what is the main purpose?
Is it to reduce power if using batteries, or is it to simply try to extend the life of the LCD and backlight?

Once we know that, we can propose solutions.

--- bill

I'm using the display in a rental home to display the outside temp and pool temp. There are times when no one is in the home so yes I'm trying to extend the life of the LCD. I thought by using a motion sensor cutting pwr would work I didn't realize that the LCD would have to initialized every time it was powered up

I expect an LCD to have a lifetime in the order of many years, possibly decades. A quick Google search gives me numbers of 50-100k hours on full contrast, so up to 11 years.

The LED for the back light will typically last for about 50k hours (almost 6 years) on full brightness (20 mA). Lower that current (4-5 mA is usually enough) and lifetime should go up a lot, and you should easily get 10 years out of your back light.

So that shouldn't be a real issue.

Trickyrick:
I'm using the display in a rental home to display the outside temp and pool temp. There are times when no one is in the home so yes I'm trying to extend the life of the LCD. I thought by using a motion sensor cutting pwr would work I didn't realize that the LCD would have to initialized every time it was powered up

With that goal, then just turn off the display and backlight.

Depending on which library you are using, some come with functions to do that.
display(), noDisplay() - turns on/off lcd pixels
backlight(), noBacklight() - turns on/off backlight
on(), off() - turn on/off the both display and the backlight.

These do not require the LCD to be re-initaized and when the LCD and backlight are turned back on, the previous contents will show back up on the display.

what type of interface are you using to control the LCD?
What library are you using?

--- bill

The LCD is a 1602 16 by 2
Im using Arduino Mega
and
I have downloaded a Liquid Crystal Library
Im not sure how to tell you what one im using its LiquidCrystal 1.0.7
I ordered it from China its being 40 days got everything else should be any day

Thanks I will look into using noDisplay() and noBacklight()

The question was how are you controlling the LCD.

  • directly using Arduino pins
  • using an i2c LCD backpack
    or something else.

And then which LCD library.
You said LiquidCrystal 1.0.7, which comes bundled with the Arduino IDE but then you said you downloaded a LiquidCrystal library.
I'm not sure what you meant by that but the IDE bundled LiquidCrystal library controls the LCD with Arduino pins and doesn't not provide support for backlight circuit control.

If you are using Arduino pins and the IDE bundled LiquidCrystal library then you will not be able to control the backlight as that library does not have support for controlling a backlight circuit.
That library does have display() and noDisplay() but does not have backlight(), noBacklight(), on(), off() functions.

You could switch to my hd44780 library which would provide support for the other functions.
But you would also need to create a backlight circuit and would need to use an additional Arduino pin to be able to control it.
If you used a PWM pin you could even dim the backlight.

--- bill

Ok sorry
Yes Arduino Pins
I will use your library on Github
If I look up a wiring diagram for the LCD I see

GND - VCC - Display contrast - register select - read/write - enable - 8 data pins - anode - cathode

is the back light the same as the contrast you say to connect this to a different pin
If I connected the contrast to a PWM then could I in the sketch dim the display until motion is sensed then turn in up for say 5 min

Trickyrick:
Ok sorry
Yes Arduino Pins
I will use your library on Github
If I look up a wiring diagram for the LCD I see

GND - VCC - Display contrast - register select - read/write - enable - 8 data pins - anode - cathode

is the back light the same as the contrast you say to connect this to a different pin
If I connected the contrast to a PWM then could I in the sketch dim the display until motion is sensed then turn in up for say 5 min

You will need a transistor to control the backlight power.
The Arduino pin controls the transistor and transistor controls the power for the backlight.

It might be easier to use a i2c LCD backpack. The backpack has a potentiometer for contrast control and a backlight circuit to control the backlight.
You can control the LCD and the backlight over i2c using only the 2 i2c pins.

--- bill

Trickyrick:
Ok sorry
Yes Arduino Pins
I will use your library on Github
If I look up a wiring diagram for the LCD I see

GND - VCC - Display contrast - register select - read/write - enable - 8 data pins - anode - cathode

is the back light the same as the contrast you say to connect this to a different pin
If I connected the contrast to a PWM then could I in the sketch dim the display until motion is sensed then turn in up for say 5 min

is the back light the same as the contrast you say to connect this to a different pin? - No, the backlight is connected between the 2 pins labeled anode and cathode (it may, or may not include a series resistor to run it off 5V).

If I connected the contrast to a PWM then could I in the sketch dim the display until motion is sensed then turn in up for say 5 min? - The contrast pin normally connects to the wiper of a variable resistor connected between GND and +5V.
You can use PWM to dim the backlight, but you would most likely need to use a transistor to switch it.
I don't think that connecting PWM to the contrast pin would be beneficial - you need a steady voltage on that pin.
Normally you set the contrast once, and leave it at that setting.

Thanks guys for all the info
bperrybap
To me it sounds easier to use your library and then in the sketch use the nodisplay() display() and same with backlight
I could have a motion sensor on say pin 1 then when the sensor puts out 3v to the pin I could have the backlight and the display come on
Does that sound reasonable
I should ask
I was planning on having the LCD fed using about 25 feet of Cat5 from the Arduino

Cat5 has 4 pairs or 8 wires. Normally they are used in pairs with differential signals.
Is 8 wires even enough for what you are trying to do?

Ignoring that, using 25ft of cable for power and 5v logic level signals will likely have issues.

--- bill

OK i was going to use a cat4 2pr wire just for power. Would i be better to use the i2C packpack

I2C will not work over 25 feet, it was meant for comms between chips on the same board.
You may want to consider a serial LCD interface like this one at
https://moderndevice.com/product/surface-mount-lcd117/
It needs only 3 wires to run, +5, Gnd, and Rx. It also self initializes the display, does not need a LCD library, and controls backlight intensity by commands.
The board attaches to the back of your LCD and accommodates single in-line or dual in line connectors.

Why is the Arduino so far away from the display?

And reading back in this thread... How are you going to get the signals from the motion sensor, pool temperature and outdoor temperature to the Arduino? What is the motion sensor even got to do with it?

It seems there may be many more issues with your project idea.

Ok
I want to print out a 3d box to put the display in by the thermostat in the house. The box would have to be to big for the LCD and the arduino. I was going to put the arduino in the attic right by the access there is an outlet there and its about 25 ft from there to the thermostat. The motion sensor was to turn on the LCD screen when I walked up to it. In regards to the temp sensors I have one working now on about 30 feet of cat5 works good. So its about 35 feet from where the arduino is to the pool where the sensor will be the other sensor is only about 10 feet away.
If anyone has a better solution
Thanks

A Pro Mini is much smaller than a 1602 display.