Page 1 of 1

How to toggle power to an LCD Screen?

Posted: Wed Sep 04, 2013 3:48 pm
by Ondra
Good day all.
I have an LCD screen connected to my system. To conserve battery power I want to power down the LCD.
I tried using a N-channel Mosfet connected to the Ground of the LCD. When the Mosfet is triggered(Power is disconnected),
the LCD screen still works. Seeing this; I disconnected the Ground to the LCD, and still the LCD works. With this I have
conclude that the Ground is being sourced via the control or data pins connected to the LCD. I noticed that there is a start command
but no stop command. Is there a safe way to Power off the screen that won't damage the chip or LCD?

Ondra

Re: How to toggle power to an LCD Screen?

Posted: Wed Sep 04, 2013 3:57 pm
by Benj
Hi Ondra,

What about a P channel mosfet to switch off the VDD rather then switching the ground, this would likely be my approach.

Re: How to toggle power to an LCD Screen?

Posted: Wed Sep 04, 2013 4:15 pm
by Ondra
Thanks Ben.
I was thinking that that would have the same effect sourcing VDD through the control or data pins?

Ondra

Re: How to toggle power to an LCD Screen?

Posted: Wed Sep 04, 2013 4:17 pm
by Benj
Hi Ondra,

It's possible but if you make sure all your data pins are low while the display is disabled then it should be fine. Any pins that are connected directly to VDD or via pull-up's should instead be connected to the switched VDD. Once you have done this you should be ok.

Otherwise do the opposite for your N channel fet. Make all data pins high when disabling the display and ensure that all the display pins connected to ground directly or indirectly go via the switched ground.

Re: How to toggle power to an LCD Screen?

Posted: Wed Sep 04, 2013 4:51 pm
by Ondra
Thanks.
So than to make this simple, I can, ignoring the LCD macros create a macro that
when called does the following in that case:

Data 1(D1) = 1
Data 2 (E1) = 1
Data 3 (D0)= 1
Data 4 (E0)= 1
RS (D5) = 1 ????? What about this
Enable (E2) =1 ????? and this
Mosfet Switch (A3) = 0

Does the order of switching matter?

Ondra

Re: How to toggle power to an LCD Screen?

Posted: Wed Sep 04, 2013 4:58 pm
by Benj
Hi Ondra,

Shouldn't matter too much as the amount of time between commands will be in the micro second range so you won't notice either way. I would maybe switch everything before the mosfet apart from the enable pin just to make sure it's not going into a funny mode on powerup, probably won't make any odds as there will likely be a few milliseconds delay on power up before the display would respond to the enable pin being high.

Power Down
Data 1(D1) = 1
Data 2 (E1) = 1
Data 3 (D0)= 1
Data 4 (E0)= 1
RS (D5) = 1
Mosfet Switch (A3) = 0
Enable (E2) =1

Power Up
Enable (E2) =0
Mosfet Switch (A3) = 1
Data 1(D1) = 0
Data 2 (E1) = 0
Data 3 (D0)= 0
Data 4 (E0)= 0
RS (D5) = 0

Re: How to toggle power to an LCD Screen?

Posted: Wed Sep 04, 2013 5:08 pm
by Ondra
Thanks a whole lot Sir. I'll give it a go.

Ondra

Re: How to toggle power to an LCD Screen?

Posted: Wed Sep 04, 2013 9:08 pm
by Kenrix2
You might want to consider using just the glass for battery systems. From a typical LCD Display Module data sheet the current draw is around 1500ua while using just the glass I average just 2.1ua (with the display on and the micro in sleep). With a CR2032 your looking at a 10 year battery life using Microchip XLP Battery Life Estimator, so you don't really have to turn the display off. Static displays are easy to use but I prefer quarter duty since they use fewer pins on the micro. The glass I use is only $1.33 from Mouser Electronics # S401M16KR . These also operate down to 2.55 volts Vdd with high contrast. As the voltage gets lower the contrast starts to fade and the viewing angle gets lower.

Re: How to toggle power to an LCD Screen?

Posted: Thu Sep 05, 2013 12:06 pm
by Ondra
Thanks Kenrix2.
I'll look in to this. A few questions.
How do you communicate to the class?
Can you use a flowcode object, or do
I have to create the function to print
data to the screen?


Ondra

Re: How to toggle power to an LCD Screen?

Posted: Thu Sep 05, 2013 9:52 pm
by Kenrix2
The Pic16LF1936 has a built in Module for direct connection to LCD glass displays. To use it in Flowcode I insert a C Code icon in the Main program to "set up" the built in Module. This is similar to the Start/Connections that Flowcode uses when you add the 16x2 LCD Component. The "set up" selects the pins used and powers up the LCD Module plus a few other things like refresh rate and how much power is used and contrast. Internal contrast adjustment is nice since many assembled 16x2 LCD Display Units need an external potentiometer to adjust that. Next I add a variable in Flowcode called "number". A Call Macro icon is added to the Main program. A New Macro called "Display_Number" is then created which converts "number" into the individual segments and displays them. This Macro is similar to the Flowcode LCD Component PrintNumber. For instance, to display a 7 requires three segments to be turned on, the top one and the two right segments. If you purchase a PIC16LF1936 and that specific display, I can help you with the "set up" C Code icon and the "Display_Number" macro. If you need a different LCD glass or PIC I can still help but won't be able to do a hardware test. One nice thing about that display and PIC micro is it can be made into a single sided PCB without jumpers even when using a SOIC PIC and no traces between the pins.

Re: How to toggle power to an LCD Screen?

Posted: Fri Sep 06, 2013 6:40 pm
by Ondra
Thanks again Kenrix2.
My project uses a 18LF46K80 fully maxed. I checked the
data sheet and it does not support connecting to LCD Glass.
I'll put this as and upgrade to consider in a future build of the
device. Thanks for the in-site.

Ondra

Re: How to toggle power to an LCD Screen?

Posted: Fri Mar 30, 2018 5:24 pm
by Ondra
18lf46K80 Vref+/ RA3/ set as I/O not going does not go to 0v outputing a 0 in flowcode goes to .16v. Anyone got any Ideas whats not happening here.
Thanks in advance

Re: How to toggle power to an LCD Screen?

Posted: Fri Mar 30, 2018 11:58 pm
by medelec35
Hi Ondra,
Within the datasheet it does state that maximum output low voltage is 0.6V
So when designing circuitry to drive a transistor, you must take that into account.
When you change the o/p to high, is the output voltage between Vdd and Vdd - 0.7V?
It's still worth checking for shorts.

Martin

Re: How to toggle power to an LCD Screen?

Posted: Sat Mar 31, 2018 5:41 pm
by Ondra
Thanks medelec35.
yes to the question on output voltage VDD 3.36 o/p high 3.36v. In the data sheet you stated that it states a maximum output low voltage is 0.6v.
I don't know how to account for that in my circuit, short of using a pin that can output 0v. Any Ideas on this.

Re: How to toggle power to an LCD Screen?

Posted: Sat Mar 31, 2018 8:51 pm
by medelec35
first we need to establish if the hardware is ok?
what I would do it put that one out put pin as low & two adjacent pins either side high.
Make sure you set the outputs at the start of main with a endless loop to follow, so no other components like PWM will be initialised.
Then measure that output pin and then the two adjacent pins either side.
Make sure the one low pin has a different voltage to the two adjacent pins.
Also measure at the VSS of the microcontroller to make sure that is reading 0V WRT ground.

What transistor are you using for controlling LCD back light?

Re: How to toggle power to an LCD Screen?

Posted: Mon Apr 02, 2018 3:10 am
by Ondra
Thanks looking into it.
Transistor DDTB142JC-7-F
Data sheet at https://www.diodes.com/assets/Datasheets/ds30403.pdf

Re: How to toggle power to an LCD Screen?

Posted: Mon Apr 02, 2018 5:47 pm
by medelec35
Hi Ondra
The 0.6 will not be relevent in your case as you're using PNP Transistor.
Will only be relevant if using npn as transistor could be conducting with 0.6V, especially if load current is small.
With PNP the transistor will be fully on if the voltage is <.6 of VDD.
So any voltage from 2.7 to 0 with respect to ground.

So if you have no shorts, then you will no issues controlling the transistor, even if the low voltage is 0.6V instead of 0.16V.

Martin

Re: How to toggle power to an LCD Screen?

Posted: Mon Apr 02, 2018 6:54 pm
by Ondra
Thanks Medelec35.
I took some time to go over the wiring and discovered a trace from LCD power to Vdd.
Its not in the PCB design, so I did not suspect it as an issue. I will need to take this up
with the board fabricator.
Thanks for the assistance.