question

Edouard Lafargue avatar image
Edouard Lafargue asked

Found a Raspberry Pi LCD touchscreen that needs no drivers or configuration

I haven't seen this on this forum before, so I thought I'd share: it is surprisingly easy to install a LCD on a raspberry Pi that needs absolutely zero configuration or calibration, either for the screen or touch.

Just search for "DSI" screens on Amazon or others, those are the screens that use the flat ribbon connection on the Pi instead of GPIOs, otherwise they look pretty much identical.

Those DSI screens are similarly priced as the small GPIO-based screens, but usually have a higher resolution (800x400 or higher), capacitive touch that requires no calibration, and of course they use no GPIO.

The nicest part is that once you connect the screen, that's it, no further action needed, it works. Just power up your Pi, remove `/etc/venus/headless`, reboot and you're in business!

I bought a "Waveshare" brand 4" screen on Amazon (perfect size for a Pi), but many other sizes/brands exist, I suspect they all behave the same. "Raspberry Pi DSI Screen" is a good search query.

Hope this is useful to others!

Raspberry Pi
40 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.

Hi @Edouard Lafargue,

do you have adaptive brightness and display off time working (just like on a GX 50 touch)?
I think that's the only thing which is not working, at least not without modifications.

0 Likes 0 ·
Edouard Lafargue avatar image Edouard Lafargue Stefanie (Victron Energy Staff) ♦♦ commented ·

Good question: the 4.3in screen does not have brightness adjust without a small hardware modification, but the 5in version has standard software backlight control and should work with Venus OS - I have not tried it yet.

0 Likes 0 ·
Stefanie (Victron Energy Staff) avatar image Stefanie (Victron Energy Staff) ♦♦ Edouard Lafargue commented ·

Ah ok, didn't know that.

Well, the control buttons for brightness adjust and display off time in Venus OS remain empty, in contrast to the GX 50 touch/Cerbo GX combo, which automatically detects the screen and have the buttons shown.

bildschirmfoto-2021-02-18-um-164302.png

bildschirmfoto-2021-02-18-um-164237.png

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem Stefanie (Victron Energy Staff) ♦♦ commented ·

You need to configure the RPI for brightness and blanking. Easiest way is to use my setup script:

https://github.com/kwindrem/RpiDisplaySetup

It requires adding an overlay for backlight and also hooking in the brightness and screen blanking to the /sys file system stuff. I have only used this on the official RPI 7" touchscreen so your milage may vary.

1 Like 1 ·
Stefanie (Victron Energy Staff) avatar image Stefanie (Victron Energy Staff) ♦♦ Kevin Windrem commented ·

Thanks Kevin,

I had your script in mind but then I thought it will work only for the HDMI port. Will give it a try and report back.

0 Likes 0 ·
Stefanie (Victron Energy Staff) avatar image Stefanie (Victron Energy Staff) ♦♦ Kevin Windrem commented ·

Blanking is working just fine after running your script though no brightness. But I can live with that. Great and thanks!

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem Stefanie (Victron Energy Staff) ♦♦ commented ·

my script does some tests in the /sys/class file system.

If the brightness control doesn't appear in the GUI, the script isn't finding the right bits. You might have a look in that file system and see if there is an alternate brightness file you can hook into.

0 Likes 0 ·
Stefanie (Victron Energy Staff) avatar image Stefanie (Victron Energy Staff) ♦♦ Kevin Windrem commented ·

I see it in the script and it obviously cannot find

 device=/etc/venus/backlight_device

hence not installing rpi_backlight. There is no backlight_device in /etc/venus and a system wide search doesn't reveal anything like that.

Running 2.70~4, which maybe is missing something. I'll try another firmware.


0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem Stefanie (Victron Energy Staff) ♦♦ commented ·

I'm not exactly sure how things work but my guess is the rpi-backlight-overlay does some magic and the /sys/class/backlight/rpi_backlight appears after a reboot. Since you aren't using the RPI display that won't happen.

I was suggesting you poke around in /sys/class and see if there is another device that might offer backlight control. You are partway there because you have the screen saver (blanking) working so it is possible you might find something for dimming.

For example, I discovered the blanking switch for HDMI displays in /sys/class/graphics/fb0.

If you think you found something that might be dimming for your display you can write to the file. Here's what you'd do to set the RPI display to 50% brightness

echo 50 > /sys/class/backlight/rpi_backlight

If you are happy with the way it's working then you probably want to spend your time on other projects.

This won't be related to software version.

1 Like 1 ·
Show more comments
ve7mmg avatar image ve7mmg Stefanie (Victron Energy Staff) ♦♦ commented ·

This comment is directed to who is still having issues getting their Waveshare 4.3 screen to go dark "blank" .

This is my first post and I hope it's posted in the correct area?

I am a super beginner when it comes to Rpi and spent 3 days solving this issue after upgrading to Kevin's

I have been reading and trying many of the suggestions with no luck until today where I changed the fb0 to fb1 and all is working as I liked it prior to the upgrade.

p.s. Thanks Kevin for the superb job on upgrating the display and ease to get updates.

  
                         
  • echo "/sys/class/graphics/fb0/blank" > /etc/venus/blank_display_device
0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem commented ·

I have updated my script based on discussions here.

It now asks the installer whether display brightness control should be installed rather than trying to guess.

I also switched to /sys/class/graphics/fb0/blank to control blanking (aka screen saver). The worst case is the display will switch to a black screen with backlight on. This happens if the display doesn't support backlight control (many HDMI displays).

These changes should support a wider range of displays.

A reboot may be required if installing the overlay or modifying config.txt but other changes only require a GUI restart.

To apply these changes, download the repo run setup again.

0 Likes 0 ·
Stefanie (Victron Energy Staff) avatar image Stefanie (Victron Energy Staff) ♦♦ Kevin Windrem commented ·

Thanks Kevin, that was really quick. I'm not seeing brightness control in the GUI.

From the log:

2021-02-19 19:04:23.260879500 RpiDisplaySetup/setup: setting up brightness control

edit: and I think it does the same as yesterday when I installed the script again. Slightly dimmed after a couple of seconds and then does not go blank.

And looking further into your new script, I was not prompted for "Do you wish to install the dimming brightness control (y/n): "


0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem Stefanie (Victron Energy Staff) ♦♦ commented ·

Oops. Forgot to move the current tag in the repo. You were running the old script.

Grab a new copy from the repo and try again.

0 Likes 0 ·
Stefanie (Victron Energy Staff) avatar image Stefanie (Victron Energy Staff) ♦♦ Kevin Windrem commented ·

Yes, just figured out that it was still using the old script. I was thinking that uninstall will completely remove it or at least install again will overwrite. But that caused an error.

Now I got the prompt and display comes slightly dimmed and goes blanking after display off time though still not seeing the brightness control.

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem Stefanie (Victron Energy Staff) ♦♦ commented ·

If you answer yes at the prompt for brightness control you should see the brightness slider in the Settings/Display... menu. If you answer no at the prompt, the slider won't be present. It doesn't even matter what's in the file to show the slider.

0 Likes 0 ·
Stefanie (Victron Energy Staff) avatar image Stefanie (Victron Energy Staff) ♦♦ Kevin Windrem commented ·

Of course, I answered yes.

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem Stefanie (Victron Energy Staff) ♦♦ commented ·

Do you get the message: "setting up brightness control"?

Also, heck to see if /etc/venus/backlight_device exists after running the install script

Here is how the script works:

Because the script is called to reinstall the package after a VenusOs update, options like brightness yes/no are kept in a file in the script's directory. So the prompt sets/clears that file and the install portion of the script checks for it's existence. When reinstalling, the U/I portion of the script is skipped and the option is read from the file.

0 Likes 0 ·
Stefanie (Victron Energy Staff) avatar image Stefanie (Victron Energy Staff) ♦♦ Kevin Windrem commented ·

Yes.

Do you wish to install the dimming brightness control (y/n): y ++ Installing RPI display enhancements

setting up display blanking

setting up brightness control

restarting GUI

adding RpiDisplaySetup/setup to reinstallScriptsList

completed

/etc/venus/backlight_device exists.

I really don't want to bother you with this. Still happy with how it works now and I can manually adjust brightness by writing into /sys/class/backlight/rpi_backlight/brightness. On the other hand a working slider would be cool.

0 Likes 0 ·
Show more comments
rmaddy avatar image rmaddy commented ·

Thanks for the screen suggestion and the details on getting the brightness and screen blank to work.

But how are people mounting these Waveshare DSI screens to a wall with the RPi?

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

The Waveshare display I have has no mounting holes so I'd suggest Velcro for surface mounting.

You could cut a hole in the wall and build a support behind the display then cover it with a bezel.

There are other display options that may provide better mounting options.

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

I already have the 5" screen so I'm going to try to make it work. I just found a possible solution using https://www.amazon.com/gp/product/B07Z68R78S

I think that frame combined with a hole in the wall may work. I can glue hex nuts inside the hole that line up with the frame's screws to hold it in place. Velcro on the frame may work too.

BTW Kevin - thanks for your various scripts. Very helpful. I just wish there was reference documentation from Victron on some of the APIs available (besides dbus).

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

Here's what I did with my RPI Display:


Looks like this when all buttoned up.

img-0811.jpeg


With bezel removed

img-0810.jpeg


What's behind the curtain

img-0809.jpeg

The ugly hole is from previous work, initially from the RV factory and a PWM solar controller.

The metal frame is is a bar across the top and bottom. Two vertical bars are spaced back from the bar so the display mounts flush to the wall. The screws you see in the picture hold the frame in place while assembling everything. The screws that hold the bezel in place also hold the frame.

The bezel is 1/16" plastic.

0 Likes 0 ·
img-0811.jpeg (4.4 MiB)
img-0810.jpeg (4.9 MiB)
img-0809.jpeg (3.2 MiB)
rmaddy avatar image rmaddy Kevin Windrem commented ·

Looks good. Thanks for the pics.

0 Likes 0 ·
kurtinge avatar image kurtinge commented ·
Hi and thanks for the tip!


I have the RPi installed in a quite hidden place, near the batteries, and it is really working well. But I would like to have a screen installed near the chart table. As the distance is about 10m from the RPi I guess it will be quite problematic to extende the cable that far.

Anyone with a tip in this matter? Maybe installing a secondary RPi and open the console from there is the only choice? I was also thinkin of putting a old Iphone or tablet, but that will not be as nice

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem kurtinge commented ·
You could run a long HDMI and USB cable and use an HDMI touch display.

Running a tablet with a web browser and using the remote console via a LAN connection would also work. It doesn't need to be another Raspberry PI but that would probably work too. There are notes on this forum about setting up kiosk mode on various platforms that might make a web browser implementation more appropriate.

0 Likes 0 ·
2 Answers
alan avatar image
alan answered ·

Thanks, I grabbed a 5" one.

2 |3000

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

christophlaib avatar image
christophlaib answered ·

Waveshare 4.3 display off:
has anyone succeed to get backlit turned off after defined time " display-off time "
thx for sharing in advance !

2 |3000

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