Octoprint, Raspberry Pi 3B+ & Touch Screen Main Panel Integration
I thought I would make a quick write up on my experience with integrating a raspberry pi with touch screen into a new panel for my Prusa MK3S. I had no experience with 3D printing before Xmas just passed. I have read a lot of stuff and watched load of videos about anything I get stuck on. So far, I have managed to do most things on my own without asking any questions but I did struggle for a few hours to get TouchUI to load on the pi but I got there in the end.
Parts Required
- I used this main panel file. The others I looked at were missing information and had issues with fitting things in: https://www.thingiverse.com/thing:3372513
- Raspberry Pi 3B+. I used a 3B+ as it was recommended on most websites I visited and more than enough for what I will be using it for: https://thepihut.com/collections/raspberry-pi/products/raspberry-pi-3-model-b-plus
- Touch screen. I used this purely because it was cheap so I didn't mind if I broke it: https://amzn.to/2MWyP8G
- Required if you don't use the buck connector. Raspberry Pi power adapter: https://amzn.to/2ZRrhcp
- M3 x 10mm bolts. You only need about 6 maximum but it's cheaper to buy 20: https://amzn.to/35sv5lv
- OctoPrint: https://octoprint.org/
- Putty or similar terminal to SSH into the Pi.
- OPTIONAL. Buck connector to power the Pi using the printer's power supply: https://amzn.to/35qNsHw
- OPTIONAL. 90 degree cable to make it look a bit tidier: https://amzn.to/2FhtC7d
I read loads of guides on how to set up the touchscreen, install drivers etc and none worked until I found a few websites and used parts of each tutorial to get mine working. NOTE: this may or may not work on ALL touch screens but it should work if you use the same touch screen as I posted about.
Assemble the parts
Follow the guide on thingyverse on how to assemble the pi and the printed parts. You can either assemble everything including the pi, touch screen etc now or you can put the touch screen onto the pi and make sure it all works before installing everything. I chose to program the pi before putting everything together.
Make sure the touch screen in placed onto the GPIO pins and you have connected the power supply and switched it on. I also connected my pi to my tv using an HDMI cable to watch what was happening while I got the touch screen working.
Setting up OctoPi
Please follow these steps after downloading:
- Unzip the image and install the contained .img file to an SD card using Etcher. Do not at any point format the SD from your Operating System, even if prompted to do so - that will break it and you’ll have to start over. Just use Etcher to flash the .img file, that is enough!
- Configure your WiFi connection by editing octopi-wpa-supplicant.txt on the root of the flashed card when using it like a thumb drive. Important: Do not use WordPad (Windows) or TextEdit (MacOS X) for this, those editors are known to mangle the file, making configuration fail. Use something like Notepad++, Atom or VSCode instead or at the very least heed the warnings in the file.
- Note: This changed with OctoPi 0.15.0, earlier versions had you edit octopi-network.txt which has a different format. This old method is no longer supported and the contents of this file will be ignored. Just use octopi-wpa-supplicant.txt.
- Please also refer take a look at the full WiFi setup guide in the FAQ that also includes Troubleshooting tips.
- Boot the Pi from the card.
- Log into your Pi via SSH (it is located at octopi.local if your computer supports bonjour or the IP address assigned by your router), default username is “pi”, default password is “raspberry”. Run sudo raspi-config. Once that is open:
- Change the password via “Change User Password”
- Optionally: Change the configured timezone via “Localization Options” > “Timezone”.
- Optionally: Change the hostname via “Network Options” > “Hostname”. Your OctoPi instance will then no longer be reachable under octopi.local but rather the hostname you chose postfixed with .local, so keep that in mind.
- You can navigate in the menus using the arrow keys and Enter. To switch to selecting the buttons at the bottom use Tab.
- You do not need to expand the filesystem, current versions of OctoPi do this automatically.
- You also do not need to manually enable the RaspiCam if you have one, that is already taken care of on the image as well.
- Access OctoPrint through http://octopi.local/ or http://<your pi's ip address> . https is available too, with a self-signed certificate (which means your browser will warn you about it being invalid).
- You can setup OctoPrint at this point using your computers browser as per the instructions in step 5 above. Install the TouchUI plugin and restart the pi.
Please also refer to OctoPi’s README, especially the “How to use it” section.
Installing "Boot to Browser"
Get the TouchUI boot files + install scripts by running the following command:
git clone https://github.com/BillyBlaze/OctoPrint-TouchUI-autostart.git ~/TouchUI-autostart/
Run the install helper:
sudo ~/TouchUI-autostart/helpers/install
Be sure you enter the username for the profile you created during the OctoPrint install/setup. This will allow the "boot to browser" script to login to TouchUI.
Installing the drivers
As you are already connected to the pi with your terminal/putty program, run the following command to download the driver:
git clone https://github.com/Elecrow-keen/Elecrow-LCD35.git
Now install the driver with the following commands:
cd Elecrow-LCD35
sudo ./Elecrow-LCD35
Wait A Few Minutes. It can take a while to load & install. After the install is done, it will reboot. If it doesn’t enter sudo reboot.
Log back into your Pi via Putty. Run sudo apt-get update for good measure. After the restart, if required, your touch screen should now load up with the "TouchUI" loading screen and should now be working.
How to Disable the TouchUI Screensaver
The TouchUI program has a timeout/sleep mode. To disable this, run the following commands:
cd ~/TouchUI-autostart/
git pull
sudo service touchui restart
RE: Octoprint, Raspberry Pi 3B+ & Touch Screen Main Panel Integration
Hey John,
can you tell me what you did to raise the printer?
The thingeverse cover description say that you need a clearance of 25mm between frame and ground.
If you can post pictures or link the new feet you printed it would be great.
Thanks
RE: Octoprint, Raspberry Pi 3B+ & Touch Screen Main Panel Integration
Hey John,
can you tell me what you did to raise the printer?
The thingeverse cover description say that you need a clearance of 25mm between frame and ground.
If you can post pictures or link the new feet you printed it would be great.
Thanks
Hi,
I have a lack enclosure so I put a 400x400mm slab under the printer to stop the vibrations. This gave me plenty of clearance for the cover/panel. I just moved the printer closer to the front of the slab so the panel was clear.
RE: Octoprint, Raspberry Pi 3B+ & Touch Screen Main Panel Integration
I thought I would make a quick write up on my experience with integrating a raspberry pi with touch screen into a new panel for my Prusa MK3S. I had no experience with 3D printing before Xmas just passed. I have read a lot of stuff and watched load of videos about anything I get stuck on. So far, I have managed to do most things on my own without asking any questions but I did struggle for a few hours to get TouchUI to load on the pi but I got there in the end.
Parts Required
- I used this main panel file. The others I looked at were missing information and had issues with fitting things in: https://www.thingiverse.com/thing:3372513
- Raspberry Pi 3B+. I used a 3B+ as it was recommended on most websites I visited and more than enough for what I will be using it for: https://thepihut.com/collections/raspberry-pi/products/raspberry-pi-3-model-b-plus
- Touch screen. I used this purely because it was cheap so I didn't mind if I broke it: https://amzn.to/2MWyP8G
- Required if you don't use the buck connector. Raspberry Pi power adapter: https://amzn.to/2ZRrhcp
- M3 x 10mm bolts. You only need about 6 maximum but it's cheaper to buy 20: https://amzn.to/35sv5lv
- OctoPrint: https://octoprint.org/
- Putty or similar terminal to SSH into the Pi.
- OPTIONAL. Buck connector to power the Pi using the printer's power supply: https://amzn.to/35qNsHw
- OPTIONAL. 90 degree cable to make it look a bit tidier: https://amzn.to/2FhtC7d
I read loads of guides on how to set up the touchscreen, install drivers etc and none worked until I found a few websites and used parts of each tutorial to get mine working. NOTE: this may or may not work on ALL touch screens but it should work if you use the same touch screen as I posted about.
Assemble the parts
Follow the guide on thingyverse on how to assemble the pi and the printed parts. You can either assemble everything including the pi, touch screen etc now or you can put the touch screen onto the pi and make sure it all works before installing everything. I chose to program the pi before putting everything together.
Make sure the touch screen in placed onto the GPIO pins and you have connected the power supply and switched it on. I also connected my pi to my tv using an HDMI cable to watch what was happening while I got the touch screen working.
Setting up OctoPi
Please follow these steps after downloading:
- Unzip the image and install the contained .img file to an SD card using Etcher. Do not at any point format the SD from your Operating System, even if prompted to do so - that will break it and you’ll have to start over. Just use Etcher to flash the .img file, that is enough!
- Configure your WiFi connection by editing octopi-wpa-supplicant.txt on the root of the flashed card when using it like a thumb drive. Important: Do not use WordPad (Windows) or TextEdit (MacOS X) for this, those editors are known to mangle the file, making configuration fail. Use something like Notepad++, Atom or VSCode instead or at the very least heed the warnings in the file.
- Note: This changed with OctoPi 0.15.0, earlier versions had you edit octopi-network.txt which has a different format. This old method is no longer supported and the contents of this file will be ignored. Just use octopi-wpa-supplicant.txt.
- Please also refer take a look at the full WiFi setup guide in the FAQ that also includes Troubleshooting tips.
- Boot the Pi from the card.
- Log into your Pi via SSH (it is located at octopi.local if your computer supports bonjour or the IP address assigned by your router), default username is “pi”, default password is “raspberry”. Run sudo raspi-config. Once that is open:
- Change the password via “Change User Password”
- Optionally: Change the configured timezone via “Localization Options” > “Timezone”.
- Optionally: Change the hostname via “Network Options” > “Hostname”. Your OctoPi instance will then no longer be reachable under octopi.local but rather the hostname you chose postfixed with .local, so keep that in mind.
- You can navigate in the menus using the arrow keys and Enter. To switch to selecting the buttons at the bottom use Tab.
- You do not need to expand the filesystem, current versions of OctoPi do this automatically.
- You also do not need to manually enable the RaspiCam if you have one, that is already taken care of on the image as well.
- Access OctoPrint through http://octopi.local/ or http://<your pi's ip address> . https is available too, with a self-signed certificate (which means your browser will warn you about it being invalid).
- You can setup OctoPrint at this point using your computers browser as per the instructions in step 5 above. Install the TouchUI plugin and restart the pi.
Please also refer to OctoPi’s README, especially the “How to use it” section.
Installing "Boot to Browser"
Get the TouchUI boot files + install scripts by running the following command:
git clone https://github.com/BillyBlaze/OctoPrint-TouchUI-autostart.git ~/TouchUI-autostart/
Run the install helper:
sudo ~/TouchUI-autostart/helpers/install
Be sure you enter the username for the profile you created during the OctoPrint install/setup. This will allow the "boot to browser" script to login to TouchUI.
Installing the drivers
As you are already connected to the pi with your terminal/putty program, run the following command to download the driver:
git clone https://github.com/Elecrow-keen/Elecrow-LCD35.gitNow install the driver with the following commands:
cd Elecrow-LCD35
sudo ./Elecrow-LCD35Wait A Few Minutes. It can take a while to load & install. After the install is done, it will reboot. If it doesn’t enter sudo reboot.
Log back into your Pi via Putty. Run sudo apt-get update for good measure. After the restart, if required, your touch screen should now load up with the "TouchUI" loading screen and should now be working.
How to Disable the TouchUI Screensaver
The TouchUI program has a timeout/sleep mode. To disable this, run the following commands:
cd ~/TouchUI-autostart/ git pull sudo service touchui restart
Hi. Can you start print from the printer's sd card with the TouchU touchscreen? Or it can only start print from the raspberry's sd?
RE: Octoprint, Raspberry Pi 3B+ & Touch Screen Main Panel Integration
Hi,
have the the pi3b+ and the ELEGOO 3.5 Inch TFT LCD 480x320 Screen For Raspberry Pi.
i've run through the whole process twice now and each time, right at the end, after the
cd Elecrow-LCD35
sudo ./Elecrow-LCD35
it says everything was succesfully done and it asks
Reboot to apply changes? (y/n): and i say "y"
and then i get the error messge "remote side unexpectedly closed network connection"
and the screen is still solid white and i am no further along!
can you help at all?
RE: Octoprint, Raspberry Pi 3B+ & Touch Screen Main Panel Integration
None of the original links seem to be working for me. Can someone link me to an example of the buck connectors? I'd like to power the pi off the powersupply if doable.
Thanks
RE: Octoprint, Raspberry Pi 3B+ & Touch Screen Main Panel Integration
None of the original links seem to be working for me. Can someone link me to an example of the buck connectors? I'd like to power the pi off the powersupply if doable.
Thanks
jhv
well it looks like youre installing the drivers for ellecrow and you have elegoo. you need to install the drivers for your particular screen.
Hi,
have the the pi3b+ and the ELEGOO 3.5 Inch TFT LCD 480x320 Screen For Raspberry Pi.
i've run through the whole process twice now and each time, right at the end, after the
cd Elecrow-LCD35
sudo ./Elecrow-LCD35
it says everything was succesfully done and it asks
Reboot to apply changes? (y/n): and i say "y"
and then i get the error messge "remote side unexpectedly closed network connection"
and the screen is still solid white and i am no further along!
can you help at all?
RE: Octoprint, Raspberry Pi 3B+ & Touch Screen Main Panel Integration
I have an Elecrow screen that has been working fine until I fresh installed the latest version of Octopi.
Everything is working, but the screensaver now remains active, despite following the previous steps to setup.
I've also edited the /TouchUI-autostart/touchui.default file and changed DISABLE_SCREENSAVER=false to DISABLE_SCREENSAVER=true
Restarted the service, and the screensaver is still active.