Skip to content

Repository files navigation

Ender 3 s1 pro screen sw/fw

This is a project to create a functional touch screen specifically for the Creality Ender 3 S1 pro for klipper use. It uses websockets to communicate with the Moonraker API, to send and receive commands and information. Additionally, using serial connection to the screen, it can control what the user sees.

Installation

Klipper usually runs on a raspberry pi. Therefore, you can install this script on the same raspberry pi that klipper runs on. Then, make it a systemd service to persist on boot. Also, you have to copy the DWIN_SET files to an SD card and into the screen.

1. Screen firmware

Move firmware files to the screen.

  1. Copy the folder resources/DWIN_SET into a FAT32 formatted SD card. The sd card should only contain the folder DWIN_SET on it's root directory.
  2. Remove the housing of the screen to access the board
  3. Insert the SD card
  4. Power the screen up and wait for the files to be moved from the SD.
  5. On the top it will END. Then you can power off the screen and remove the SD card. The screen now contains the necessary files.
  6. Put the housing back on, reinstall next to the printer

2. Connect the screen to the raspberry pi

You will need some cable to connect the screen to the raspberry pi. I use the following one. The connector of the screen is a 6pin JST XH.

screen_cable.jpg

WARNING: You might need to reorganize the wiring if the colors don't match. It is always a good idea to have matching colors to avoid mistakes when connecting them to the RPI.

To connect, you have two options:

  1. Connect to the RPI pins directly
  2. Use a USB to ttl adaptor.

Up to you.

Example connection to Raspberry pi Zero 2W

demo_1.jpg

2A. [For raspberry pi only] Prepare UART

If you want to use the Raspberry PI serial pins to connect to the screen, you have to follow these additional steps:

  1. Run the configuration tool: sudo raspi-config
  2. Navigate to Interface Options → Serial Port.
  3. When asked: "Would you like a login shell to be accessible over serial?" Select No.
  4. When asked: "Would you like the serial port hardware to be enabled?" Select Yes.
  5. Finish and Reboot when prompted.

Note: If you want the screen to turn off together with the printer, then use an M-F jumper cable to get power from the printer's screen original ribbon and a GND M-F jumper cable to connect the printers GND to your RPI GND.

3. Install the python software

  cd ~
  git clone https://github.com/gpatsiaouras/ender3-s1-pro-screen-sw.git
  cd ender3-s1-pro-screen-sw
  python -m venv venv
  source venv/bin/activate
  pip install .

  # Try it out
  ender3-s1-pro-screen-server

4. Enable the systemd service

Copy the file to the system folder

  cd ~/ender3-s1-pro-screen-sw
  sudo cp resources/systemd/ender3-s1-pro-screen-sw.service /etc/systemd/system/

Edit the systemd service file now under /etc/systemd/system/ender3-s1-pro-screen-sw.service, and change

[Service]
ExecStart=/usr/local/bin/ender3-s1-pro-screen-sw-server

to

[Service]
ExecStart=<path-to-your-home-folder>/ender3-s1-pro-screen-sw/venv/bin/ender3-s1-pro-screen-server

The code assumes that your moonraker api (printer) is located on 127.0.0.1 and the screen is connected via usb in /dev/ttyUSB. To change the default behavior, you can use environment variables. Add accordingly in the [Service] group of the service:

For raspberry pi connected using its UART pins and the example printer ip of 192.168.2.2:

  Environment=SCREEN_PORT=/dev/serial0
  Environment=PRINTER_IP=192.168.2.2

Then enable the service:

  sudo systemctl daemon-reload
  sudo systemctl enable --now ender3-s1-pro-screen-sw.service

About

Support software and DWIN files for the screen of the Creality Ender 3 S1 Pro working with Klipper.

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages