Turning off/on gpio screen

September 25, 2023, 19:59

kihadas

Hello, i have question how to control and schedule when gpio screen to go off and to go on. I am using Raspberry pi 2b and 3.5 inch gpio screen from aliexpress. I want to do this because to expand screens lifetime.

_krazy.

Can you provide us with the display's model?

_krazy.

Some nice displays usually have a controller thing that could control the display's settings via few 2 pins at best

_krazy.

In the worst case you might've to cut the power or video data from it

kihadas


kihadas

nothing special <@266512529746952192>

kihadas


oops.se

You need a datasheet, none of the info you have provided can answer the question

_krazy.

Basically a display driver to better support display's features

_krazy.

xpt2046 touch controller

_krazy.

kihadas

btw i am using non touch screen

oops.se

The only way to turn it of (electrically) is to break the power to pin 1,2,4 and 17. The other way is to use a "screen saver" that can blank the screen.

oops.se

AFAIK there is no ready solution, but if your up to it you could create two "high side" MOSFET on/off circuits and put them between the Rpi and screen. See attached example

kihadas

it would be great if tell me to make it work

oops.se

Perhaps

oops.se

kihadas

i used it before but it didnt worked at that time :Dd

kihadas

But thanks

kihadas

i tried a lot of things and i didnt find anything about scheduling gpio screen to go off with xscreensaver and turning on on a day

kihadas

help i dont know what to do

oops.se

There is no need to include GPIO in the search, the OS is treating it as a display and don't care what the underlying hardware is.

oops.se

So a screen blank command for a HDMI display is the same as for a GPIO connected display.

kihadas

i am using this guide

kihadas

and still no luck

oops.se

Then there could be that the display driver doesn't support that. And I'm out of ideas then....

_krazy.

No need for those fancy "sleep mode", just disable the port and when you want it to work again enable it

_krazy.

It's this simple but you need some basic knowledge about commands

kihadas

I am using screen for monitoring piholes data

kihadas

And i am using pihole as my dhcp server

kihadas

So i cant

_krazy.

You want to power off the monitor at night and power on the monitor at day?

kihadas

Yeah

_krazy.

The monitor is connected via GPIO?

kihadas

Yeah

_krazy.

If the monitor is not powered externally, just disable the GPIO that corresponds to the power input for the monitor

_krazy.

Disabling the power pins are enough

kihadas

So i need to disable 2and4 pins to power it off?

kihadas

If i understand right 😄

oops.se

Then you remove the power and just to be clear <@266512529746952192> they are NOT GPIO (General-Purpose Input/Output), just 5 volt power supply pins

_krazy.

Oh my bad, I forgot the difference, I'm not really that into the pins, I just use RPi generally for being a portable

oops.se

There is another point at where you could break the incoming power, at the AM1117 regulator. I have made a orange circle around it and a arrow pointing to the pin for Vin, so if you can solder, you could de solder that pin and bend it a bit and place a switch between them or make a high side MOSFET switch that you could control by another free GPIO pin.

oops.se

Another idea, why just turn of the LCD, why not shut down the whole Pi?

oops.se

Hehe, that I understand 😉