Go Down

Topic: 1602 LCD Display Power (Read 1 time) previous topic - next topic

Trickyrick

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

lastchancename

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.
Experienced responders have a nose for laziness, (they were beginners once)... Sure, there are trolls, chest-beaters, and pretenders - but the help you'll get here is about as good as it gets - if you try to help youself!.

sterretje

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.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

wvmarle

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.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

bperrybap

Before we can answer, we need more information as:
Quote
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

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

wvmarle

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.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

bperrybap

#7
Jun 25, 2018, 05:33 pm Last Edit: Jun 25, 2018, 05:34 pm by bperrybap
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




Trickyrick

 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()

bperrybap

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



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

bperrybap

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

JohnLincoln

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.

Trickyrick

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

bperrybap

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


Go Up