Ender 3 Full Setup - Krontx/Ender-3 GitHub Wiki

Complete Guide

Hardware

  • Ender 3
  • SKR Mini E3 V2
  • ANTCLABS BLTouch
  • Raspberry Pi 4 Model B
  • Adafruit 3.5" Resistive Screen
  • Generic XPT2046 3.5" Resistive Screen

1. Installing Octoprint

a. Download Raspberry Pi Imager from here

image

b. Install and Open the Pi imager

image

c. Choose OS > Other Specific-Purpose OS> 3D Printing > OctoPi

image

c. Clic gear icon > Checkmark and fill options > Choose Wireless country > Clic on Save

Checkmark options to enable:

  • Enable SSH
  • Set username and password
  • Configure Wireless LAN

image

d. Once the wizard is over with the process of Downloading > Verifying > Writing > Verifying

  • Insert Memory Card in Raspberry Pi
  • Wait until ACT green LED stops blinking on your device
  • Open http://octopi.local/ or use a Network Scannner app to find the IP the router has given to you Raspberry PI
  • Make sure both the PC and the Raspberry PI are connected to the same router in a Multi-Router WLAN

e. Complete the setup Wizard for OctoPI, your installation is up and running

2. Connect to your Raspberry PI using SSH

a. Download and install PUTTY from: Official or Direct link

b. Connect to the raspberry Pi using its IP

c. SSH Default credendials are:

  • username: pi
  • password: raspberry

d. Set the DNS name resolution so that it always work

  1. Set static IP for the Pi in the router

  2. Modify the hosts file c:\Windows\System32\Drivers\etc\hosts and map the proper ip to the local address xx.xx.xx.xx octopi.local

  3. Have the Raspberry Pi properly broadcast its network name

     sudo apt-get update
     sudo apt-get install samba samba-common-bin
     sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.save
     sudo nano /etc/samba/smb.conf
    
  4. On the [global] section add any missing lines

    [global]
      workgroup = WORKGROUP
      wins support = yes
      netbios name=octopi/phoenix/pegasus
      server string=OctoPrint on Raspbian
    

e. If still need additional help go to : here

3. Installing Octodash

a. Make sure your Raspberry Pi is up to date, run the following commands on the SSH Terminal

sudo apt update
sudo apt full-upgrade

b. Make sure your Octoprint is up to date, navigate to your settings window visiting: http://octopi.local/

c. Go to the official website: Here

d. Run the installation script: bash <(wget -qO- https://github.com/UnchartedBull/OctoDash/raw/main/scripts/install.sh)

e. If for some reason the installation script does not start perform a manual installation: https://github.com/UnchartedBull/OctoDash/wiki/Installation#manual-installation

f. During the setup you may get and prompt indicating that ? Please specify OctoPrints full virtualenv path manually (no trailing slash) it should be either:

/home
/home/octoprint/OctoPrint/venv

g. If there are any issues visit the official troubleshooting page: https://github.com/UnchartedBull/OctoDash/wiki/Troubleshooting

4. Installing GPIO Screen on your raspberry PI: Adafruit PiTFT 3.5" Resistive touchscreen

a. Navigate to the official resources:

a1. https://learn.adafruit.com/adafruit-pitft-3-dot-5-touch-screen-for-raspberry-pi/touchscreen-install-and-calibrate

a2. https://learn.adafruit.com/adafruit-pitft-3-dot-5-touch-screen-for-raspberry-pi/easy-install-2

b. If installing Raspberry Pi upside down and using 270 instead of 90 for landscape rotation, the screen input will have the axis reversed. Therefore install lightdm > Install Adafruit screen > Remove lightdm:

Installing LigthDM

sudo apt update
sudo apt install lightdm 

Installing Screen: Interactive installation

sudo python3 adafruit-pitft.py
  • On the prompt: Would you like the console to appear on the PiTFT display? Indicate No(n)

image

  • On the prompt: Would you like the HDMI display to mirror to the PiTFT display? Indicate Yes(y)

image

sudo apt remove lightdm 
  • Finally reboot your Pi, it all should be working otherwise check Issues

    sudo reboot
    

c. If the screen is laggy you might need to overclock your raspberry pi and update its screen refresh rate

sudo nano /boot/config.txt

Scroll down to the section "#uncomment to overclock the arm. 700MHZ is the default" and uncomment the second line

arm_freq=800

Scroll down to the section # --- added by adafruit-pitft-helper - and switch the speed to 60000000 and fps to 60:

dtoverlay=pitft35-resistive,rotate=90,speed=60000000,fps=60 

d. Octodash should be up and running, complete the setup wizard to connect it to OctoPrint, you can simplify the process by requesting the API key and approving it on http://octopi.local/

image

e. By default Octodash will enter sleep mode if Octoprint is not setup properly, therefore perform the following fixes:

  • On Octoprint enable Save connection settings and Auto-connect on server startup.

image

  • On Octoprint settings enable Allow Cross Origin Resource Sharing (CORS)

image

4. Installing GPIO Screen on your raspberry PI: TFT Touch Screen Controller: XPT2046

a. Navigate to the official resources:

https://github.com/CytronTechnologies/xpt2046-LCD-Driver-for-Raspberry-Pi

Or run the following commands:

sudo apt-get install xserver-xorg-video-fbturbo    
sudo rm -rf LCD-show    
git clone https://github.com/goodtft/LCD-show.git
chmod -R 755 LCD-show
cd LCD-show/
sudo ./LCD35-show
cd ../LCD-show/
sudo ./rotate.sh 180

b. If installing Raspberry Pi upside down and using 270 instead of 90 for landscape rotation, the screen input will have the axis reversed. Therefore install xinput_calibrator , follow the guide on

https://www.thingsconnected.io/raspberry-pi-7-inch-touch-screen-calibration/

Or run the following commands

sudo apt-get install libx11-dev libxext-dev libxi-dev x11proto-input-dev
.wget http://github.com/downloads/tias/xinput_calibrator/xinput_calibrator-0.7.5.tar.gz
tar -zxvf xinput_calibrator-0.7.5.tar.gz
./configure
make
sudo make install
xinput_calibrator

Once the calibration is done copy the results shown on Putty to 99-calibration.conf

sudo nano /etc/X11/xorg.conf.d/99-calibration.conf

Section "InputClass"
        Identifier      "calibration"
        MatchProduct    "ADS7846 Touchscreen"
        Option  "Calibration"   "3969 223 239 3912"
        Option  "SwapAxes"      "0"
        Option "InvertY" "true"
        Option "InvertX" "true"
EndSection

If you get the error: Unable to connect to X server

run

export DISPLAY=:0.0
xinput_calibrator

c. If the screen is laggy you might need to overclock your raspberry pi and update its screen refresh rate

sudo nano /boot/config.txt

Scroll down to the section "#uncomment to overclock the arm. 700MHZ is the default" and uncomment the second line

arm_freq=800

Then scroll down to the section

dtoverlay=tft35a:rotate=270 

And swap it to

dtoverlay=tft35a:rotate=270,fps=60

This will switch the screen speed to 60000000 and the screen fps to 60

d. Octodash should be up and running, complete the setup wizard to connect it to OctoPrint, you can simplify the process by requesting the API key and approving it on http://octopi.local/

image

e. By default Octodash will enter sleep mode if Octoprint is not setup properly, therefore perform the following fixes:

  • On Octoprint enable Save connection settings and Auto-connect on server startup.

image

  • On Octoprint settings enable Allow Cross Origin Resource Sharing (CORS)

image

5. Setting up Octoprint

a. Install popular plugins

  • Bed visualizer
  • Octolapse
  • BLTouch Plugin
  • Cura Thumbnails
  • Filament Manager
  • TabOrder
  • Cura Thumbnails
  • DisplayLayerProgress Plugin
  • FileManager
  • Obico for OctoPrint
  • SpoolManager Plugin
  • Tab Order
  • Simple emergency stop
  • Octoprint Dashboard
  • Octoprint Telegram
  • Exclude region
  • Firmware updater
  • Heater timeout
  • Printer statistics
  • Themeify

b. Some plugins require extra configuration:

Bed visualizer

  • Enable webcam while processing

  • Collection > Gcode script

    M140 S60 ; starting by heating the bed for nominal mesh accuracy
    G28      ; home all axes
    M420 S0  ; Turning off bed leveling while probing, if firmware is set to restore after G28
    M190 S60 ; waiting until the bed is fully warmed up
    M155 S30 ; reduce temperature reporting rate to reduce output pollution
    @BEDLEVELVISUALIZER	; tell the plugin to watch for reported mesh
    G29 T	   ; run bilinear probing
    M155 S3  ; reset temperature reporting
    M106 S0 ;Turn-off fan
    M104 S0 ;Turn-off hotend
    M140 S0 ;Turn-off bed
    M84 X Y E ;Disable all steppers but Z
    

Continous Print:

  • Bed Clearing script

    M190 R35; Wait until bed is 35 degrees
    G1 X90 Y225 Z20 F3000; Move up and back
    M300 S3520 P200;A7
    M300 S4698.63 P200;D8
    M300 S5274.04 P200;E8
    M300 S6271.93 P200;G8
    G1 X90 Y225 Z1 F3000; lower
    G1 X90 Y1 Z1 2000; Remove print
    G1 X90 Y30 Z1 8000; shake it
    G1 X90 Y1 Z1 8000; shake it
    G1 X90 Y30 Z1 8000; shake it
    G92 E0 ;Reset Extruder
    G1 Z10 F3000 ;Move Z Axis up
    G28 ;Home
    G1 Z5 F3000 ;Move Z Axis up
    
  • Finished script

    M18 ; disable steppers
    M104 T0 S0 ; extruder heater off
    M140 S0 ; heated bed heater off
    M300 S880 P300 ; beep to show its finished
    

Cura Thumbnails

Use inline thumbnails. Enable
Scale image. Enable and 50%
Position inline image to the left. Enable
Align image. Left
Set file list height. 306px

File manager

Enable Checkboxes

Firmware Check

Disable warnings of severity "info"
Check this to disable warnings from firmware checks that are only of informational "heads-up" nature, 
like running a firmware development build.

Spool Manager

General > Currency symbol > RD$

Tab order

Gcodeviewer >  fas fa-file-alt    > Magenta > No tab name
Control     >  fas fa-arrows-alt  >   Red   > No tab name
Bed level   >  fas fa-bed         >   Blue  > No tab name
Temp        >  fas fa-thermometer >   Cyan  > No tab name
Terminal    >  fas fa-terminal    >  Green  > No tab name
Timelapse   >  fas fa-camera-retr > Orange  > No tab name
Cont Print  >  fas fa-retweet     > Purple  > No tab name
Spool Man   >  fas fa-database    > Green   > No tab name
File Man    >  far fa-folder-open > Black   > No tab name

Display Layer progress

Show missing Layer-Indicator Warning after file selection > Disable

6. Preparing Slicer

a. Download and install Cura: Here

b. Login to your account

c. Add printer

d. Connect printer to Octoprint Settings > Printer > Manage Printers > Connect to OctoPrint > Request API

image

e. Add start and end G-code Settings > Printer > Manage Printers > Machine Settings

image

f. Add Cura Thumbnails to the post-processing tab, define 300px for width and height

image

Start G-code

; Ender 3 Custom Start G-code
G92 E0 ; Reset Extruder
G28 ; Home all axes
@BEDLEVELVISUALIZER
G29 ; Auto bed-level (BL-Touch)
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
G92 E0 ; Reset Extruder
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish

End G-code

G91 ;Relative positioning
G1 E-2 F2700 ;Retract a bit
G1 E-2 Z0.2 F2400 ;Retract and raise Z
G1 X5 Y5 F3000 ;Wipe out
G1 Z10 ;Raise Z more
G90 ;Absolute positioning

7. Setting up the firmware (Custom Board SKR Mini E3 V2)

a. Go to the full video guide: Here , Start the video on min 5:10

b. Download Visual Studio Code Here

c. On Visual Studio Code, go to Extension and download PlatformIO IDE and Auto Build Marlin

d. Download the latest Marlin Firmware and the sample configuration files: Here

e. On configuration browse to config > examples > Creality > Ender-3 > BigTreeTech SKR Mini E3 2.0 copy the files in there and replace the one in Marlin-2.x.x\Marlin

f. Using Platform IO open the firmware files and start modifying the firmware to match your needs

g. On Configuration.h the following must be tweaked/ uncommented

#define CUSTOM_MACHINE_NAME "Phoenix"

#define PIDTEMP
    #define DEFAULT_Kp  21.73
    #define DEFAULT_Ki   1.54
    #define DEFAULT_Kd  76.55

#define PIDTEMPBED
    #define DEFAULT_bedKp 131.14
    #define DEFAULT_bedKi 22.15
    #define DEFAULT_bedKd 517.56

#define PREVENT_COLD_EXTRUSION

#define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 400, 141.5 }

#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
#define USE_PROBE_FOR_Z_HOMING
#define BLTOUCH
#define GRID_MAX_POINTS_X 3
#define Z_MIN_PROBE_REPEATABILITY_TEST
#define Z_SAFE_HOMING
#define NOZZLE_TO_PROBE_OFFSET { -40, -10, -0.85 }
#if PROBE_SELECTED && !IS_KINEMATIC
    #define PROBING_MARGIN_LEFT 30
    #define PROBING_MARGIN_RIGHT 30
    #define PROBING_MARGIN_FRONT 25 
    #define PROBING_MARGIN_BACK 25

#define AUTO_BED_LEVELING_BILINEAR
#define LCD_BED_LEVELING
#define LCD_BED_TRAMMING

#define X_BED_SIZE 235
#define Y_BED_SIZE 235
#define Z_MAX_POS 230

h. On Configuration_adv.h the following must be tweaked/ uncommented

#define BABYSTEPPING
#define BABYSTEP_ZPROBE_OFFSET

#define PROBE_OFFSET_WIZARD 

#define LIN_ADVANCE
#define LIN_ADVANCE_K 0.5

#define ADVANCED_PAUSE_FEATURE

#define BLTOUCH_HS_MODE true
#define BLTOUCH_DELAY 300
#define Z_PROBE_FEEDRATE_FAST (20*60)
#define DEFAULT_MAX_FEEDRATE          { 500, 500, 20, 25 }
#define XY_PROBE_FEEDRATE (150*60)
#define Z_CLEARANCE_BETWEEN_PROBES  3
#define HOMING_FEEDRATE_MM_M { (150*60), (150*60), (10*60) }

#define MARLIN_BRICKOUT
#define MARLIN_INVADERS
#define MARLIN_SNAKE

i. Verify environment before compiling (Compiling not using Marlin Autobuild)

  • Check board name on Configuration.h #define MOTHERBOARD BOARDNAME
  • Marlin 2.x.x > Marlin > src > pins > pins.h and search for BOARDNAME (BTT_SKR_MINI_E3_V2)
  • Copy the environment name and paste in the platformio.ini default_envs = STM32F103RE_btt

j. Install the firmware

  • Find the built firmware on Visual Code file explorer: Marlin 2.x.x > .pio clic on Reveal on File Explorer
  • Copy your built firmware into the microSD.
  • Insert MicroSD in 3D Printer.
  • Turn OFF and ON, it will flash the firmware and remove the flashable version from the MicroSD upon completion.

8. Calibrating your 3D printer

a. Go to Teaching tech and follow the calibration guides in the following order:

  • Frame Check
  • PID Autotune
  • First Layer
  • Baseline Print
  • Extruder E-Steps Calibration
  • XYZ steps Calibration
  • Stepper Motor Current Tuning
  • Linear Advance Tuning
  • Slicer Flow Calibration
  • Temperature Tuning
  • Retraction Tuning
  • Acceleration Tuning

b. In the future, when performing some actions calibration will be required

Moving the 3D Printer location

  • Frame Check

Changing any printer part or component: Hot end/ Silicone sockets/ Extruder/ etc

  • PID Autotune
  • First Layer
  • Baseline print
  • Extruder E-Steps Calibration
  • Stepper Motor Current Tuning
  • Baseline Print
  • Linear Advance Tuning
  • Temperature Tuning
  • Retraction Tuning
  • Acceleration Tuning

Filament change

  • First Layer
  • Baseline print
  • Linear Advance Turning
  • Slicer Flow Calibration
  • Temperature Tuning
  • Retraction Tuning

Trying to print Flexible filament

  • Speed & Max Flow Tuning