question

Kevin Windrem avatar image
Kevin Windrem asked

Generic touchscreen on Cerbo

I just acquired a Cerbo GX and the companion Touch 50. I've been using a Waveshare HDMI touch screen on my Raspberry Pi running Venus. It communicated touch information via USB unlike the Touch 50.

As a test, I connected the Waveshare display to Cerbo. Works out of the box including touch. No overlays or any other software needed. No calibration necessary.

This might provide an alternative for those trying to locate the display a long way from Cerbo when the Touch 50 cable isn't long enough and an extender doesn't function.

The display I tried is this:

https://amazon.com/gp/product/B077PLVZCX

Others may also work

Note: you can NOT use the USB port closest to the HDMI connector as this is a power only port.

cerbo gxtouchscreen
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

14 Answers
jean-joubert avatar image
jean-joubert answered ·

@M_Adriaans I have done this with a Waveshare 7inch screen (1024 x 600).

https://www.waveshare.com/7inch-hdmi-lcd-h-with-case.htm

Connect to your Cerbo via SSH.
Run the following commands...

opkg update
opkg install tslib-calibrate

Enable headless mode...

touch /etc/venus/headless

Reboot your Cerbo.
Set screen resolution and run calibration utility...

fbset -xres 1024 -yres 600
ts_calibrate

Now go to the screen and do the actual calibration on the screen.
Once calibration is done disable headless mode...

rm /etc/venus/headless

Reboot your Cerbo again and touch should be working.

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Munteanu George Ciprian avatar image Munteanu George Ciprian commented ·

i can't enable headless mode

0 Likes 0 ·
Jesse avatar image
Jesse answered ·

I can also confirm that the cheap ($50) 5" capacitive touch screens on AliExpress work perfectly with no configuration.

The 800x480 resolution and 5" size is more than enough. Less would be fine. I run touch data and power over the same USB 2.0 extension cable.

This is an example - EQV 5 inch Portable Monitor HDMI 800 x 480 Capacitive Touch Screen LCD Display for Raspberry Pi 4 3B+/ PC/Banana Pi|LCD Modules| - AliExpress

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

david-66 avatar image david-66 commented ·

Hi Jesse, I bought the same as you. The screen works well but not the touch screen. Did you change anything or use another cable?

0 Likes 0 ·
liam-tuvey avatar image
liam-tuvey answered ·

Has anyone had any luck in turning off a third party (waveshare 7" HDMI in my case) screen automatically when connected to a Cerbo? Screen displays perfectly but auto time out and dimming functions within Venus dont take effect.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Kevin Windrem avatar image
Kevin Windrem answered ·

I have one of the Waveshare 7" HDMI displays and screen saver works, but no dimming.

My RpiDisplaySetup will handle the necessary steps,

https://github.com/kwindrem/RpiDisplaySetup

or you can manually do it from the command line:

echo "/sys/class/graphics/fb0/blank" > /etc/venus/blank_display_device

Add the following line to /u-boot/config.txt:

hdmi_blanking=1


then reboot.

If you are plugged into the second HDMI port use fb1 in place of fb0.

If you do it manually, you'll need to repeat the steps after a firmware update.

If the display does not support backlight control, you will get a blank screen with the backlight still on.

5 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Kevin King avatar image Kevin King commented ·
@Kevin Windrem Any advice on getting this working on a cerbo with a generic display? Thanks!
0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem Kevin King commented ·

Do some poking around in /sys/class file system to see if you can figure out which display device is being used. See if there is anything in /sys/class/backlight/.

/etc/venus/blank_display_device contains a pointer to the device the system will attempt to turn backlight on and off. For the Raspberry PI, the file will contain:

/sys/class/backlight/rpi_backlight/bl_power

for the "Official 7" Raspberry Pi Display" or

/sys/class/graphics/fb0/blank

If you find something in /sys/class/backlight/ that resembles "bl_power" or "blank" then try writhing values to that file (you can use the echo command) and see if you can find something to make the display go black.

I can plug an HDMI display into my Cerbo tomorrow and will let you know if I find anything.

0 Likes 0 ·
Kevin King avatar image Kevin King Kevin Windrem commented ·

Hi, i did some testing and i manage to blank the display by calling "echo 1 > blank " In the "/sys/class/graphics/fb0/" Directory. Calling "echo 0 > blank " turns it back on! I dont know how to make this work with the display timeout in the venus os settings

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem Kevin King commented ·

Enter the following commands

echo "/sys/class/graphics/fb0/blank" > etc/venus/blank_display_device
reboot

The display should then blank

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem Kevin King commented ·
I did some poking around on my Cerbo today and struck out.

With the Gx Touch 70 attached /sys/class/backlight is populated with a pointer to gxdisp-2... which contains a bl_power file.

Without the GX Touch connected, /sys/class/backlight is empty.

/sys/class/graphics contains fb0 and fbcon but neither have anything that looks like a backlight control file.

My generic HDMI display works including touch via USB but no screen saver.

Sorry, this is beyond my ability to troubleshoot. Maybe someone else ????

Maybe Victron would be interested in making a generic HDMI display work. It's so close already.

0 Likes 0 ·
liam-tuvey avatar image
liam-tuvey answered ·

Thanks @Kevin Windrem, I'm actually trying to do this on a Cerbo GX not a Pi.
I attempted to use your script but it checks to see if it's running on a Pi and if not aborts.

I tried the first manual command as you suggested but didnt have any luck as I assume this is Pi specific. (also there is no /u-boot on the Cerbo)

I've looked at other solutions like /usr/bin/tvservice etc for turning off the screen but I'm wary of installing new services on Venus, seems to me to be preferable to use the existing functionality in Venus (if possible!)

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

John macrae avatar image
John macrae answered ·

Thanks @Kevin Windrem , I'm also using a generic Aliexpress screen - works great! I bought one with a separate backlight button on the back. Fairly trivial to move it round the front - adjusts in 20% increments.

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

adahmen avatar image adahmen commented ·
Do you have a link to the product (from Aliexpress)?
0 Likes 0 ·
itsme avatar image
itsme answered ·

Just for information, if other user have the same problems like i had...

To use the Waveshare 7inch Screen (1024x600) you have to add the following to /u-boot/config.txt:

Section [all]

max_usb_current=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0
hdmi_drive=1

works perfect for me on a RPi 3+


2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Greg Melton avatar image
Greg Melton answered ·

Kevin,

I know this is an old post but I have received two defective Touch 70 displays so I am looking for an alternative while Victron works out the issues with the Touch 70. I purchased the display that you linked from Amazon.

Disclaimer: I am electrical challenged but I am an engineer.

I connected the Waveshare display to the Cerbo and I am unsuccessful and making it functional. I connected the HDMI cable, of course. And I connected the included adapter from the USB connector on the Cerbo to the “DC” labeled port on the Waveshare. What am I missing?

TIA,

Greg

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Kevin Windrem avatar image
Kevin Windrem answered ·

To get touch to work you need to connect the TOUCH port to a USB port on Cerbo. The USB port closest to the HDMI connector is power only, so you need to pick another port. You should not need to connect the DC port as power is also supplied via the TOUCH port.

If you don't have enough USB ports on Cerbo, use a powered hub to connect everything.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

m-adriaans avatar image
m-adriaans answered ·

Hello,

I have connected a 7" UCtronics touchs screen to my Cerbo GX. All data is displayed correctly but the touch function needs calibration and I have no clue if that is possible and if so, how to do that. Any help is much appreciated.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Kevin King avatar image
Kevin King answered ·

Hi! I know this is an old post, but did anyone find a solution to the screen off time on a cerbo gx with a generic display? I have the touch and resolution working, but i cannot figure out the screensaver. Any advice is much appreciated.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

marcve avatar image
marcve answered ·

Read through this topic, to find a solution to be able to dim or "screensafe" the waveshare 7" hdmi display, and got an easy solution. Because the display has the on/off button on the side, it is not easy to get to if you mount the display in a panel. However, when you power/touch function the display by the usb port on the Cerbo, which is also used for the touch-function, you can disable the display with a switch in the + and - lead of the usb cable, and bring this to the front of the panel. Tested this a bunch of times, and display comes back in correct window and touch-function when back online again.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Alistair Warburton avatar image
Alistair Warburton answered ·

I always use a cheap android tablet over ethernrt/wifi. You can pic up an Amazon Fire 7 for less than £40 usually. Strip out th Bloat and add Google Play services with Fire Toolbox... It just works.

And of course you can access Node Red Config and Dasboards too!

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Kevin King avatar image
Kevin King answered ·

Update! I did some testing and i managed to get the display timeout working!

Simply run

nano /etc/venus/blank_display_device

And replace with

/sys/class/graphics/fb0/blank

Save.

then

nano /etc/venus/blank_display_device.in

And replace with

/sys/class/graphics/fb0/blank % victronenergy,cerbo-gx

Save.

Reboot and the screensaver should be working!

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.