Skip to content
GalvanicGlaze edited this page Aug 24, 2021 · 7 revisions

Some genius figured out how to use the ender 3 v2 display with Klipper using Octoprint or Moonraker.

Thanks to odwdinc for your work check out his github page: https://github.com/odwdinc/DWIN_T5UIC1_LCD

If you are using moonraker i would recommend you try out this fork: https://github.com/bustedlogic/DWIN_T5UIC1_LCD

This had been around for two months already but I missed it somehow, I’ve been waiting for someone to do this.

You can follow his github page to get it done but ill run through how I did it to my Klipper running octoprint (save people some time having to google simple stuff like editing a file with putty like I had to do).

Please note it is still buggy and not everything works yet but its much better than having a blank screen. It has everything I want which is temp display and printing progress.

Things you will need:

You’ll probably want to start with making a new cable or extension first that will run from the ender 3 v2 screen to the GPIO pins on the raspberry Pi. This is what odwdinc has for the cable routing:

Wire the display

  • Rx = GPIO14 (Tx)
  • Tx = GPIO15 (Rx)
  • Ent = GPIO13
  • A = GPIO19
  • B = GPIO26
  • Vcc = 2 (5v)
  • Gnd = 6 (GND)

What I did to make it easier for me to keep track of the wires was to draw it up in MS paint. I made text boxes for the pin locations and then drew in the wire colours that I had. Here is what I did: https://imgur.com/cKBuQgg . I googled Rpi pinout and ender 3 v2 screen pinout the show me where the pins are.

I did it again with the stock wire cables for this post, don’t know if it will be more useful: https://imgur.com/m1Dxqtu

TIP: I used 2 5pin dupont connectors for the screen so I could line up the empty slots and know they are in the right orientation and I used 4 and 5 pin dupont for the pi side so it’s easier to line up with the edge on the board and to help again with orientation but this is not needed if you don’t want to.

Ok now that the cable is out of the way turn on the pi and fire up Putty and log into the pi by entering the Pi’s ip address, port 22 and make sure SSH is selected, try and save the setting as you might have to log in a few times. Enter pi as the user name and enter your password and hit enter (default password is raspberry). It should now show pi@octopi:~ $ in green and blue.

[Disable Linux serial console]

Not sure if this was needed but I did it anyways

  • In putty paste: sudo raspi-config (copy and then right click in putty to paste) and enter your password again
  • Select option 3 - Interface Options.
  • Select option P6 - Serial Port.
  • At the prompt Would you like a login shell to be accessible over serial? answer 'No'
  • At the prompt Would you like the serial port hardware to be enabled? answer 'Yes'
  • Exit raspi-config and reboot the Pi for changes to take effect. (Reboot the pi with sudo reboot)

Log into the pi again with putty after the reboot. sudo nano /boot/config.txt use down arrow to get to the very bottom and add a line. dtoverlay=disable-bt Ctrl+O to write out and hit ender and then Ctrl+X to exit

[Enabling Klipper's API socket]

  • sudo nano /etc/default/klipper and change a line from:

KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/printer.cfg -l /tmp/klippy.log"
To this
KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/printer.cfg -a /tmp/klippy_uds -l /tmp/klippy.log"

[Library requirements]

  • sudo apt-get install python3-pip python3-gpiozero python3-serial git
  • sudo pip3 install multitimer
  • git clone https://github.com/odwdinc/DWIN_T5UIC1_LCD.git

After all that has installed turn off the pi and plug in the cable that you made. Log into the pi again with putty.

  • sudo nano /home/pi/DWIN_T5UIC1_LCD/run.py

Paste in the following text:

#!/usr/bin/env python3
from dwinlcd import DWIN_LCD

encoder_Pins = (26, 19)
button_Pin = 13
LCD_COM_Port = '/dev/ttyAMA0'
API_Key = 'XXXXXX'

DWINLCD = DWIN_LCD(
	LCD_COM_Port,
	encoder_Pins,
	button_Pin,
	API_Key
)

Before closing you need to login your octoprint and get your API key from the settings and paste it in replacing the XXXXXX (keep the ‘ ’ and put your API in between them). You can now write out and exit.

python3 ./run.py this should say something like connected and boot ok

Your ender 3 v2 screen should now be showing the menu.

Reconnect to your pi with putty if its stuck on something and not waiting for you to enter another command.

Run at boot:

  • cd /home/pi/DWIN_T5UIC1_LCD
  • sudo chmod +x run.py
  • sudo chmod +x simpleLCD.service
  • sudo mv simpleLCD.service /lib/systemd/system/simpleLCD.service
  • sudo chmod 644 /lib/systemd/system/simpleLCD.service
  • sudo systemctl daemon-reload
  • sudo systemctl enable simpleLCD.service
  • sudo reboot

And that’s it, the programming seems like a lot but it isn’t really as I tried to go into as much depth as possible.