Sjefke
Posts: 24
Joined: Sun Jun 24, 2012 8:13 am
Location: The Netherlands

Switch off HdmiPi display with software?

Sun Jan 11, 2015 4:23 pm

The HdmiPi display is pretty good. I use it for signage. http://hdmipi.com/
Is it possible to switch the display off with a python script?

Of course, this command will work:
/opt/vc/bin/tvservice -o
But then the screen turns blue. That is not what I want.

HdmiPi has a little on/off switch at the back. After switching the display off, the Raspberry is still on. That is good.
I want to switch the display off on a specific time, and also with a PIR sensor.

If there is no software interface available, maybe it is possible that the display when searching for input is black instead of blue?

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2807
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: Switch off HdmiPi display with software?

Sun Jan 11, 2015 7:04 pm

Hi,

You are now I think the third or fourth person to ask about this feature. The way things are now, this cannot be done programmatically.

I am going to have a go at hacking the power switch to use a GPIO pin to toggle the screen instead of/as well as the power switch. I'm not sure yet how easy this will be to implement (don't know if it's a 3V3, 5V or 12V circuit) because I haven't looked yet. Pressing the power button shorts to GND (I think - still to check), so even if it was higher voltage than the Pi's 3V3, something like a Darlington array chip or transistor could be used here.

So in summary, with HDMIPi as it is, I'm pretty sure it can be made to work, but will require a little hardware hack as well as some (very simple) GPIO programming on the Pi.
Alex Eames RasPi.TV, RasP.iO

Sjefke
Posts: 24
Joined: Sun Jun 24, 2012 8:13 am
Location: The Netherlands

Re: Switch off HdmiPi display with software?

Sun Jan 11, 2015 7:36 pm

Thank you for these pointers, Alex.
I will examine this.

KenT
Posts: 759
Joined: Tue Jan 24, 2012 9:30 am
Location: Hertfordshire, UK
Contact: Website

Re: Switch off HdmiPi display with software?

Sun Jan 11, 2015 8:22 pm

Pi Presents - A toolkit to produce multi-media interactive display applications for museums, visitor centres, and more
Download from http://pipresents.wordpress.com

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2807
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: Switch off HdmiPi display with software?

Sun Jan 11, 2015 11:12 pm

This is worth a look, thanks Ken, but I doubt it will switch off the HDMIPi backlight.

Will try it though.
Alex Eames RasPi.TV, RasP.iO

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2807
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: Switch off HdmiPi display with software?

Mon Jan 12, 2015 1:10 pm

Just done some multimeter probing and it appears that this button is on a 3V3 circuit, which means that it should be possible to control it directly with a Pi GPIO port without the need for a transistor. I will stick a resistor in series though to protect the port.

A momentary shorting of the button to GND toggles the screen on/off.

Next step is to hack the board and try it out for real. :D
Alex Eames RasPi.TV, RasP.iO

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2807
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: Switch off HdmiPi display with software?

Tue Jan 13, 2015 8:58 am

OK. I've got this working now. Will be blogging about it in a day or two.

The good news is that it's quite easy. :D
Alex Eames RasPi.TV, RasP.iO

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2807
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: Switch off HdmiPi display with software?

Wed Jan 14, 2015 2:24 pm

OK full instructions how to programmatically control the on/off functions of your HDMIPi (wiring, photos, video and Python code) are now published at...

http://raspi.tv/2015/hacking-hdmipi-power-switch

Also a little YouTube demo video
http://youtu.be/qECVrxWmbm0

There will be a part 2 as well :)
Alex Eames RasPi.TV, RasP.iO

Sjefke
Posts: 24
Joined: Sun Jun 24, 2012 8:13 am
Location: The Netherlands

Re: Switch off HdmiPi display with software?

Sat Jan 17, 2015 9:28 am

This is terrific, Alex. A perfect answer. Thanks!

My "solution" was a very lazy one. The web page was only black during the day and was active in the evening.
However, there is too much backlight bleeding.

Code: Select all

<body style="background-color:black">
<?php
date_default_timezone_set('Europe/Amsterdam');
//  Switch on the display between 17.00 and 22.00 (5 and 10 pm).
$show = date('H', time());
if ($show > 21 || $show < 17)
   die;
bleed backlight.jpg
bleed backlight.jpg (6.76 KiB) Viewed 1675 times
leftside.jpg
leftside.jpg (22.58 KiB) Viewed 1675 times
front.jpg
front.jpg (31.95 KiB) Viewed 1675 times

Sjefke
Posts: 24
Joined: Sun Jun 24, 2012 8:13 am
Location: The Netherlands

Re: Switch off HdmiPi display with software?

Sun Jan 18, 2015 6:57 pm

Soldering a jumper wire to the power button of the HdmiPi display is very simple.
Now I can really switch off the screen, while the Raspberry Pi continues to work.

The system normally needs 13 Watt (display + Raspberry Pi B version 1 + some sensors). When the display is off, the power is just 7 Watt.
Obviously, with a Raspberry Pi A+ the power demand will be a little bit lower.

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2807
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: Switch off HdmiPi display with software?

Wed Jan 21, 2015 9:47 pm

How are you measuring the power usage? At the wall socket?

HDMIPi uses only 5 Watts when the backlight is on and the model B uses 2-3.

Have you got some greedy sensors?
Alex Eames RasPi.TV, RasP.iO

Sjefke
Posts: 24
Joined: Sun Jun 24, 2012 8:13 am
Location: The Netherlands

Re: Switch off HdmiPi display with software?

Tue Jan 27, 2015 10:21 pm

That is a big difference.
I measure with a Brennenstuhl wall socket power meter. Even without the sensors it uses 13 Watt.
Maybe the 12 Volt adapter consumes some Watts?

Return to “Recommended peripherals”

Who is online

Users browsing this forum: No registered users and 4 guests