whitling2k
Posts: 16
Joined: Tue Jul 13, 2021 7:01 pm
Location: UK - North!

Switch screen off

Fri Sep 17, 2021 10:36 am

I would like to run a Pi in the following setup, and I can't seem to find a definitive answer on Google, or on here. Could anyone advise me if it is possible on a Pi4 or Pi-0?

I'm going to be running a small monitoring device in a room, and I want the device to display the monitored parameters on a small screen
(fwiw, a number of temperature, humidity and air quality probes). I want the screen to give out no light unless tapped (or a button pressed); after which it will illuminate for short time, say ~60 seconds, before reverting back to no light. I don't want any LCD glow or anything - literally pitch black unless woken up.

I have the probes running and logging with no problem, and the display is via a html page - so all good from that point of view. I'm currently running it headless and remote desktopping in - to view the real-time parameters. Which is great for me, but no one else.

All my research seems to suggest the neither the Pi, nor Pi zero are capable of switching an LCD display off - only setting them to black. Which will give an off-putting low light in a room that I want to be totally dark.

I don't want to go down the physical screen cover route either.

Thanks in advance!

User avatar
thagrol
Posts: 6119
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Switch screen off

Fri Sep 17, 2021 11:47 am

It likely depends on what the screen supports.

As you want the screen tyo ve live but the backlight off, you may have to hardware mod the screen to allow backlight control from a spare GPIO on the Pi.
I'm a volunteer. Take me for granted or abuse my support and I will walk away

All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides

whitling2k
Posts: 16
Joined: Tue Jul 13, 2021 7:01 pm
Location: UK - North!

Re: Switch screen off

Fri Sep 17, 2021 12:55 pm

That sounds interesting. What sort of screen/controller would that work with? Presumably not all - would it be a manufacturer enquiry to verify?

User avatar
thagrol
Posts: 6119
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Switch screen off

Fri Sep 17, 2021 3:06 pm

whitling2k wrote:
Fri Sep 17, 2021 12:55 pm
That sounds interesting. What sort of screen/controller would that work with? Presumably not all - would it be a manufacturer enquiry to verify?
Probably but I can't say. When researching screens look for backlight control as a required feature and look at the circuit diagrams and PCBs to see if modification is possible.
I'm a volunteer. Take me for granted or abuse my support and I will walk away

All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides

aBUGSworstnightmare
Posts: 3887
Joined: Tue Jun 30, 2015 1:35 pm

Re: Switch screen off

Fri Sep 17, 2021 3:31 pm

First of all: which 'screen' are we talking off?

If you think off connecting an LCD module to your Raspberry Pi you can think of two possible approaches:
1) Your module has a backlight enable signal which can be used for switching the backlight off.
2) Your backlight has PWM control. In case the hardware supports a duty cycles of ZERO = 0 you will be able to switch it off as well.

Note: power consumption for both scenarios will be different though.

Here is an example:
visible light leakage on the back of the module indicates your backlight is on
IMG_20210917_171459.jpg
IMG_20210917_171459.jpg (126.89 KiB) Viewed 738 times
Dimmed to step '8' (of 256 possible setting (0 to 255) gives you below image on the screen. Observe the black printed border around the display active area.
IMG_20210917_171309.jpg
IMG_20210917_171309.jpg (67.29 KiB) Viewed 738 times

aBUGSworstnightmare
Posts: 3887
Joined: Tue Jun 30, 2015 1:35 pm

Re: Switch screen off

Fri Sep 17, 2021 3:37 pm

Now PWM is dimmed to step 0 = OFF
IMG_20210917_171517.jpg
IMG_20210917_171517.jpg (125.26 KiB) Viewed 718 times
no light leakage from backlight --> off
IMG_20210917_171330.jpg
IMG_20210917_171330.jpg (60.09 KiB) Viewed 718 times
display content is still active, but not visible.

Problem with only PWM approach: as the display matrix is active there is possibility to see the content under certain light conditions.

User avatar
thagrol
Posts: 6119
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Switch screen off

Fri Sep 17, 2021 3:50 pm

aBUGSworstnightmare wrote:
Fri Sep 17, 2021 3:31 pm
First of all: which 'screen' are we talking off?
I suspect the OP has yet to decide on a screen model and is hoping for a direct recommendation.
I'm a volunteer. Take me for granted or abuse my support and I will walk away

All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides

whitling2k
Posts: 16
Joined: Tue Jul 13, 2021 7:01 pm
Location: UK - North!

Re: Switch screen off

Fri Sep 17, 2021 4:01 pm

I don't mind being able to see the content of the screen, as long as no light is given off at all. This is key.

In a perfect world, I'd like to be able to tap the screen, the screen would respond by turning the backlight on (or up) for a set duration of seconds, then turn the brightness back off.

whitling2k
Posts: 16
Joined: Tue Jul 13, 2021 7:01 pm
Location: UK - North!

Re: Switch screen off

Fri Sep 17, 2021 4:02 pm

thagrol wrote:
Fri Sep 17, 2021 3:50 pm

I suspect the OP has yet to decide on a screen model and is hoping for a direct recommendation.
That would be great..... More realistically which feature sets to look out for for a relative beginner!

aBUGSworstnightmare
Posts: 3887
Joined: Tue Jun 30, 2015 1:35 pm

Re: Switch screen off

Fri Sep 17, 2021 4:57 pm

Don't know if the official 7in DSI can be switched off ('dimmed to zero), but I rhink it will wake-up on touch.

cleverca22
Posts: 4920
Joined: Sat Aug 18, 2012 2:33 pm

Re: Switch screen off

Fri Sep 17, 2021 5:06 pm

aBUGSworstnightmare wrote:
Fri Sep 17, 2021 4:57 pm
Don't know if the official 7in DSI can be switched off ('dimmed to zero), but I rhink it will wake-up on touch.
i have seen some reports that depending on which driver you use (linux or firmware stack), turning the backlight off also cuts power to the touch screen chip, so you cant wake it back up again

that implies that you can turn the backlight off, but need to use the right driver, to be able to wake on touch again

whitling2k
Posts: 16
Joined: Tue Jul 13, 2021 7:01 pm
Location: UK - North!

Re: Switch screen off

Fri Sep 17, 2021 7:30 pm

aBUGSworstnightmare wrote:
Fri Sep 17, 2021 4:57 pm
Don't know if the official 7in DSI can be switched off ('dimmed to zero), but I rhink it will wake-up on touch.
Our of interest, what model is that you have taken the photographs of?

aBUGSworstnightmare
Posts: 3887
Joined: Tue Jun 30, 2015 1:35 pm

Re: Switch screen off

Sat Sep 18, 2021 5:58 am

whitling2k wrote: Our of interest, what model is that you have taken the photographs of?
the pictures were intended as an example only, used for explaining the different options and for showing what will happen!

The display is a 7in Chungwa TFT (model no can be seen on the pics). It was used by Google in their Nexus 7 Gen1 tablet.
I'm using it quite frequent as they are simple to source at affordable prices. That particular display has a backlight circuit (driver) which is PWM controlled. So, in case your PWM hardware is able to deliver 0%-duty (GND level) it will switch off the backlight.

Note: You will not be able to connect it to your Raspberry Pi that easy though, neither will the touch part ever work (your 'tap to wake up' requirement).
This is what my setup looks like. As you can see some 'interface hardware' (black PCB) is needed. Linux driver is also under development, so in summary this is all but not a beginners task.
Image

ame
Posts: 3902
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Switch screen off

Sat Sep 18, 2021 6:15 am

whitling2k wrote:
Fri Sep 17, 2021 10:36 am
I would like to run a Pi in the following setup, and I can't seem to find a definitive answer on Google, or on here. Could anyone advise me if it is possible on a Pi4 or Pi-0?

I'm going to be running a small monitoring device in a room, and I want the device to display the monitored parameters on a small screen
(fwiw, a number of temperature, humidity and air quality probes). I want the screen to give out no light unless tapped (or a button pressed); after which it will illuminate for short time, say ~60 seconds, before reverting back to no light. I don't want any LCD glow or anything - literally pitch black unless woken up.

I have the probes running and logging with no problem, and the display is via a html page - so all good from that point of view. I'm currently running it headless and remote desktopping in - to view the real-time parameters. Which is great for me, but no one else.

All my research seems to suggest the neither the Pi, nor Pi zero are capable of switching an LCD display off - only setting them to black. Which will give an off-putting low light in a room that I want to be totally dark.

I don't want to go down the physical screen cover route either.

Thanks in advance!
Can you be more specific about what screen you have in mind, or even just what size screen you want? Is touch capability an absolute requirement, or is a button (as mentioned) sufficient?

There are many screens to choose from, which makes this hard. If you have a screen already someone could maybe suggest how to make it do what you want. If you have clear requirements someone could suggest specific hardware.

There are power-saving modes for various monitors, which you could use if they are supported on your specific monitor. If not, you'll have to get creative with isolating the backlight power and switching it with a GPIO under program control (basically as the second reply suggested).
Hmm. What can I put here?

MarkDH102
Posts: 519
Joined: Fri Feb 13, 2015 3:18 pm

Re: Switch screen off

Sat Sep 18, 2021 6:23 am

I do exactly the same as the OP and use the following screen attached to a pi0W. Very low power requirements.

Touchscreen display is uLCD-32WPTU from 4D systems
It is 320*240 colour 3.2".
I drive it via the serial port.

It is now obsolete but I bet you can pick them up on ebay - or get a newer equivalent.

https://www.mouser.co.uk/ProductDetail/ ... 5if1%2Fg==

aBUGSworstnightmare
Posts: 3887
Joined: Tue Jun 30, 2015 1:35 pm

Re: Switch screen off

Sat Sep 18, 2021 7:05 am

MarkDH102 wrote:
Sat Sep 18, 2021 6:23 am
I do exactly the same as the OP and use the following screen attached to a pi0W. Very low power requirements.

Touchscreen display is uLCD-32WPTU from 4D systems
It is 320*240 colour 3.2".
I drive it via the serial port.

It is now obsolete but I bet you can pick them up on ebay - or get a newer equivalent.

https://www.mouser.co.uk/ProductDetail/ ... 5if1%2Fg==
Look at the data sheet https://www.mouser.co.uk/datasheet/2/45 ... 525481.pdf, schematics page. There is a signal 'Backlight' which controls Q2. That signal is under control of the Processor, so it should be possible to dimm/switch of the backlight.
You will have to check the related software and/or ask your display module manufacturer how to achieve this.

MarkDH102
Posts: 519
Joined: Fri Feb 13, 2015 3:18 pm

Re: Switch screen off

Sat Sep 18, 2021 10:38 am

Look at the data sheet https://www.mouser.co.uk/datasheet/2/45 ... 525481.pdf, schematics page. There is a signal 'Backlight' which controls Q2. That signal is under control of the Processor, so it should be possible to dimm/switch of the backlight
I turn the backlight off via a serial command. I put the display to sleep via serial too. It wakes up on touch.
I have a python3 class that handles this display serially if you ever decide to use it...

whitling2k
Posts: 16
Joined: Tue Jul 13, 2021 7:01 pm
Location: UK - North!

Re: Switch screen off

Mon Sep 20, 2021 5:06 pm

Thanks for the continued discussion.. To answer some of the questions that arose over the weekend:

Type of display? I'm not overly bothered about the size of the display. But nothing too big. let's say 4-7" . Big enough, and high enough DPI to clearly display 5-6 text parameters with maybe some icons representing trends.

LCD/TFT/ Even those digital paper displays if I could work out how to send the data to them.

I had assumed colour - but only because I assumed it could just operate as a display (AKA standard PC monitor) - and I'm familiar with that. No other reason.

I plan to mount it in a DIY Perspex case.

Re touch screen - I would probably prefer to have a button. I thought touch screen seems to be the way everything has gone, and my research to date seems to show touch screens as cheaper. So I thought it might broaden my list of potentials.

Having said that, being button-only would also have the benefit of minimising the risk of unwanted input interfering with PiOS.

It would be great if I could tap said button, see the screen backlight come on for a set number of seconds, then go off., waiting for the next button press.

Any management etc, I would do remotely anyway.

The device needs to be available 24*7, but will probably only be activated 2-3 times a day max.

I am planning of just displaying a web page on said screen it that my monitoring software generate.

I am a bit nervous of just buying one and hoping it will do what I want because the budget is a bit tight - so a recommendation would be amazing.

As a starter for 10 - what about one of these: **disclaimer - I just played with the search filters - I don't really know what I'm looking for**

https://www.mouser.co.uk/ProductDetail/ ... BRww%3D%3D

W. H. Heydt
Posts: 15411
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Switch screen off

Mon Sep 20, 2021 6:15 pm

I use the 7"RPF touchscreen. It permits PWM backlight control. I've never run it all the way to zero, but since it's my "alarm clock" I take it down to 15 (of 255) at night.

You'd need some separate control (a button to a GPIO pin) and a program to handle changing the backlight, but that shouldn't be at all difficult.

ame
Posts: 3902
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Switch screen off

Tue Sep 21, 2021 12:03 am

whitling2k wrote:
Mon Sep 20, 2021 5:06 pm
Thanks for the continued discussion.. To answer some of the questions that arose over the weekend:

Type of display? I'm not overly bothered about the size of the display. But nothing too big. let's say 4-7" . Big enough, and high enough DPI to clearly display 5-6 text parameters with maybe some icons representing trends.

LCD/TFT/ Even those digital paper displays if I could work out how to send the data to them.

I had assumed colour - but only because I assumed it could just operate as a display (AKA standard PC monitor) - and I'm familiar with that. No other reason.

I plan to mount it in a DIY Perspex case.

Re touch screen - I would probably prefer to have a button. I thought touch screen seems to be the way everything has gone, and my research to date seems to show touch screens as cheaper. So I thought it might broaden my list of potentials.

Having said that, being button-only would also have the benefit of minimising the risk of unwanted input interfering with PiOS.

It would be great if I could tap said button, see the screen backlight come on for a set number of seconds, then go off., waiting for the next button press.

Any management etc, I would do remotely anyway.

The device needs to be available 24*7, but will probably only be activated 2-3 times a day max.

I am planning of just displaying a web page on said screen it that my monitoring software generate.

I am a bit nervous of just buying one and hoping it will do what I want because the budget is a bit tight - so a recommendation would be amazing.

As a starter for 10 - what about one of these: **disclaimer - I just played with the search filters - I don't really know what I'm looking for**

https://www.mouser.co.uk/ProductDetail/ ... BRww%3D%3D
Ok, that's a good starting point. It gives us a size, a price, and a feature set. It's £57, which is about US$78.

This is the same size, but might not be as good (for whatever metric you might choose), but costs US$10:

https://m.aliexpress.com/item/32974000475.html

This is what I meant by buying something to try out. Probably won't break the bank.

However, since you know exactly what you want to do you might find some people here who can answer specific questions, either because they have the specific hardware, or because they like to read datasheets.

I've read the information I can find about the cheap screen. There is no mention of backlight control, but... it's hardware, so it can be bent to your will. You can read more here:
https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)

However, Waveshare have a similar model:
https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(C)

Model C has a jumper which, when fitted, allows control of the backlight.

Unfortunately, unless someone has done precisely what you want to do then you're on your own to a certain extent. However, once you start getting into specifics, then it becomes easier to say what is likely to work, and what is not.

I haven't researched the expensive screen, because I wouldn't buy one.
Hmm. What can I put here?

Return to “Beginners”