Happy with your Prusa printer? Earn $30 when you recommend us to your friend, family or shop with the updated Prusa Rewards Program. PS: They will get an extra Prusament spool!

Voron V0.2 and V0.2 R1 Screen Front Skirt with Built-in OLED Display

Integrate the 1.3" Waveshare OLED display into your Voron V0.2 (or V0.2 R1) front skirt. Tutorial included.
25
73
1
2781
updated July 28, 2023

Description

PDF

UPDATE 2023.07.28.: I redesigned and included this front skirt for the Voron V0.2 R1 (Revision 1) version. The difference is that the V02 R1 version skirt is 2mm taller than the original V02 version. I also included the source file for customisation purposes, see below.

----------

Introduction

I wanted to have a front screen on my Voron V0.2 3D printer but I didn't like the original, bulky, protruding display in front of the skirt. So I started looking for slimmer solutions but apparently didn't find one that was good for me. I also didn't like the encoder wheel and wanted to swap it for a small joystick. One day my friend gave me his Waveshare 1.3" OLED HAT display to play and try to adapt it to the printer. It is slim, it has a joystick and extra 3 buttons which are plenty for most of my needs. So I started to experiment with it, first without any enclosure design just to try if it fits my needs then when I figured it would work I designed a slim and elegant front skirt for it.

Making the screen work – Connecting the OLED Hat to the Raspberry Pi

You can do this the easy was by looking at the Waveshare 1.3" OLED HAT documentation and finding each pin on the hat and connecting it to the Pi. This would cause a bit of a mess because the buttons and the screen needs 15 wires to operate.

PIN FunctionBCMDescription
KEY1P21Button 1/GPIO
KEY2P20Button 2/GPIO
KEY3P16Button 3/GPIO
Joystick UpP6Go Up
Joystick DownP19Go Down
Joystick LeftP5Go Left
Joystick RightP26Go Right
Joystick PressP13Press Down
SCLKP11/SCLKSPI Clock input
MOSIP10/MOSISPI Data input
SCLP3/SCL1I2C Clock Input
SDAP2/SDA1I2C Data Input
DCP24Data/Command
CSP8/CE0Chip Selection
RSTP25Reset

So I went with the following, ribbon cable method.

Well, this was not an easy task at first but once I familiarised myself with IDC ribbon cables and connectors, it went well. Basically you will need a 40-pin IDC Ribbon cable (approx. 40cm), a 40-pin (2x20) IDC Receptacle (female) and a 40-pin (2x20) IDC Plug (male). If you cannot get the IDC plug, you can use 2pcs receptacle and a 2x20 pin header to connect the cable to the OLED hat (see my photos below).

Important: using the standard IDC connectors will not change the left/right (or front/back) pins of the RPi hat, so I spliced the ribbon cable by pairs and while assembling I twisted each pair so when connecting the Pi header connector with the Hat header connector each pin will match its pair. A bit cumbersome but it works. (If anyone knows a better solution for mirroring the connector please write me in the comment section.)

(See my DIN Rail Board Mounting System for mounting a DIN rail in the back of a Voron V0 for clean and rigid mounting of electronics.)

Installation and configuration of the screen

First I connected my screen directly to my Raspberry Pi MCU just for testing (without the ribbon cable to rule out any cabling problems). My unit was configured for 4-wire SPI interface so I didn't have to solder anything on the board. However making it work on the Pi with Klipper was not a straightforward task.

(I also did some of the installation of the factory drivers/extensions for the display mentioned on the wiki but I am not sure if it was needed. You can see the steps on the previously linked wiki page of the display.)

I configured the Pi as a secondary MCU using this tutorial:

https://www.klipper3d.org/RPi_microcontroller.html

Then I adjusted my printer.cfg file to connect to the Pi using the beginning of this sample file:

https://github.com/Klipper3d/klipper/blob/master/config/sample-raspberry-pi.cfg

Like this:

[mcu rpi]
serial: /tmp/klipper_host_mcu

You can get some hints from this tutorial to set up the Pi: 

After the initial steps I checked the GPIO pins (via command line through SSH) if they were configured for pullup or pulldown.

raspi-gpio get

For some reason my button and joystick pins were pulldown so I had to set mine up like this to make them pullup:

raspi-gpio set 6,16,19,20,21 pu

Hint: after each restart the Pi reverts to its default Pullup/Pulldown state so I added the above command to /etc/rc.local file which is some kind of startup script that executes when the Pi starts. The command should be placed before the exit 0 line. (You can edit this file through an SSH client or from terminal with SSH, using the sudo nano /etc/rc.local command.)

Display configuration

I made an entry in my printer.cfg for the display:

[display]
lcd_type: sh1106  
contrast: 236  
vcomh: 20
x_offset: 3  
invert: FALSE  
cs_pin: rpi:None  
dc_pin: rpi:gpio24  
reset_pin: rpi:gpio25
click_pin: !rpi:gpio13
back_pin: !rpi:gpio26 
up_pin: !rpi:gpio19  
down_pin: !rpi:gpio6  
kill_pin: !rpi:gpio21

(I negated some button pins with the use of the exclamation mark, some experimentation might be needed for your system.)

Menu customization

After some failed attempts the display finally showed the Voron menu and allowed browsing it with the configured joystick and/or button pins. There are more buttons than needed for the menu operation so you can configure any macro on the remaining buttons, for example cooldown or preheat command.

You can also customize your default menu if needed. For example I added a TPU option for preheating. Look here for a sample file with the unneeded menu options trimmed: https://github.com/techyg/Voron0Stuff/blob/main/DisplayMenu.cfg

Screen orientation

I had another issue with this setup, but I was able to solve it after a day of research: the orientation of the menu was the opposite I was needed but there was no configuration option in Klipper to flip the screen. So I dug deeper and found that on the Pi the klipper/klippy/extras/display/uc1701.py file has the communication protocol defined to “talk” with the attached SH1106 type OLED screen. In this file around the lines of 222 and 223 there are two commands that define the pixel drawing direction and they both needed to be changed. The original was:

0xA1,       # Set Segment re-map
0xC8,       # Set COM output scan direction

but I modified this to 

0xA0,       # Set Segment re-map
0xC0,       # Set COM output scan direction

after finding the correct values in some online documentation.

That is all for the programming and configuration.

Screen position

I noticed that the screen area is not perfectly centered so I heated up the display a little bit so the double sided sticker holding it in place loosened and I moved it about 1.5mm. Resoldering the flex cable was not needed.

Left / Right handed use

Originally I glued my printer's PSU directly into the front section of the printer so my screen's connector could only fit under it meaning I could only orient the screen with its joystick on the left side. However I am right handed and having the joystick on the right would be better for me so I reinstall the PSU a little bit backwards and moved the cable guide to another place in the bottom.

Printing the skirt

The parts should be printed from PETG or ABS. As the screen area needs some support, it is advisable to test print that area to see if your support settings are good enough. I tested the organic support option in Prusaslicer 2.6 and it worked acceptably.

Assembly

You will need 4pcs M3x4 screws to attach the display to the skirt. The holes are suitable for the screws to easily self tap. I tried to measure everything correctly but a little filing or playing with the screw tightness would be needed to tune the joystick movements.

Final thoughts

I am really satisfied with the overall design of this skirt and I am glad I finished this small project successfully. (I recommend Lab3DP's original unified skirt designs if you want to have your side and front skirts printed in one piece.)

Source files

I include the source files for education and personal purposes but please don't do evil things with it and don't steal this design. If you want to use it for commercial purposes, please contact me and we will find a solution.

Feedback is important!

I spend countless hours perfecting and testing my designs and I would love to hear your feedback too. If you like my designs I appreaciate a like or a comment. Please post a photo if you print this.

Commercial inquiries and applications

Please contact me if you like my designs and would like to cooperate or develop a similar solution.

Donations

I am open to any kind of donation if you want to support me :)

https://paypal.me/andrasbognar

Tags



Model origin

The author remixed this model.

License