preloader

BLTouch on Anet ET Series ET5x, ET5 Pro, ET4, ET4 Pro

  • Monday, Jan 1, 0001
blog-image

A BLTouch sensor will automate your 3D printer bed leveling. Read on to learn all you need to know about this sensor and it’s setup on your Anet ET4 ET4 pro ET5x and ET5 pro.

Requierements

  • Software: Marlin FW
  • Hardware:
    • BLTouch mount
    • BLtouch Smart
    • Step Down Converter 24V DC to 5V DC (at least 500mA). There are a lot of possibilities here. Bltouch specs states a peak current consumption of 300mA, so I choosed a Switch Converter module based on the MP1584 IC. It is cheap, small, and will supply the 5V DC voltage needed to power the bltouch.
    • Soldering iron or hot air gun and SMD soldering/desoldering skills.
    • STlink Flashing probe

Mechanical

Firstly, you will need a suitable mount to attach the BLTouch sensor to your printer.

Mechanical2

There is a lot of example on the internet. You can find the one I use here:

Here is a pic of our setup:

BLTouch mount

Electrical

The BLTouch sensor has 5 wires:

  • 3 to the first servo connection and 5v
  • 2 to the Z min end stop, negative and signal pins.

BLTouch con

Reworking the Motherboard

You will have to do a litle bit of soldering rework on the anet ET4/ET5 mother board in order to connect the BLTouch leveling sensor properly. The first thing to do is to remove the deboucing capacitor C37 and its compagnion resistor R40. Then you can connect the BLTouch S signal to the extension board.

ET5 MB Rework

Wiring

WARN Handle wiring with printer turned off and always DOUBLE CHECK CONNECTIONS before turning on the printer

Once we have desoldered the resitor and capacitor, we need to wire all the things up.

Adapter Board Pin DCDC Converter Pin BLTouch Pin
Power GND (Pin 4/16) (In -) Step down converter (Out -) Bltouch Power GND (Brown wire)
Power VCC (Pin 2/14) (In +) Step down converter (5V Out +) Bltouch VCC (Red wire)
Zmin (Pin 11) Bltouch Zmin (White wire)
Zmin GND (Pin 4/16) Bltouch Signal GND (Black wire)
Servo/Control (Pin 3) Bltouch Control Signal (Orange wire)

There are two PCB models for this part, whose function is to expose pins from the 20 pin IDC wire to JST headers.

ET4 Adapter Board (Piezo Electric Sensor)

Check the printer model you have. Please be noted the Anet ET4 has two versions. One with capacitive leveling sensor. The other with NO capacitive leveling sensor on the extruder, like the picture list below. The two versions need different firmwares.

Board picture

ET4 Adapter No capacitive sensor

Connection diagram:

BLTouch con

ET4 ET4pro ET5x ET5pro (Capacitive Sensor)

Board picture

ET4/ET5 Adapter Pro con

Connection diagram:

BLTouch con

Software

In order to simplify software update procedure you can use the OpenBLT Bootloader. OpenBLT is an open source bootloader for STM32 and other microcontroller targets. It enable you to update the Anet Firmware writing an update file on your SDcard.

OpenBLT

You can get the bootloader binarie on the developper repo

Once that you have the bootloader, you need to flash it from address 0x08000000. This step needs to be performed just once, so, you can skip this step if you have already done so.

  • Clone Openblt:
git clone https://github.com/davidtgbe/openblt
  • Flash Openblt prebuilt binaie using st-flash

Unscrew the bottom shell off. Connecting the ST-Link V2 to relative cables according to below table.

ET4 SWD Pinout

STLink PIN desc. PIN nb. Anet PIN Name
SWDIO 4 SWDIO
GND (Ground) 5/6 G
SWCLK (SW Clock) 2 SWCLK
RESET 1 RESET
  • Power up the printer.

  • Connecting the board to the host. The STLink probe to the host should be connected to the host via USB. You should see something like this when running lsusb command

lsusb
Bus 001 Device 005: ID 0483:374b STMicroelectronics ST-LINK/V2.1

Now you are able to flash the bootloader on your motherboard

st-flash write firmware.bin 0x8000000

Building Marlin

PlateformIO, Marlin and Anet ET Series board definition

PlatformIO allows developer to compile the same code with different development platforms using the Only One Command platformio run. You can download an IDE version here. If like me you prefer a command line version, you can get it here.

Marlin Firmware

Now that plateformIO is ready, a new Firmware supporting the 3D Touch must be flashed on the Anet ET4/ET5 board. This firmware is Marlin, an Open-Source firmware for various 3D Printers. First you must download the Marlin project source code:

  1. Clone Marlin Firmware:
git clone https://github.com/MarlinFirmware/Marlin.git

The BLTouch needs changes made to the configuration.h file in the Marlin source code in order to handle the BLTouch sensor. The required changes are similar to how you would setup a mechanical servo sensor.

Here is the configuration we have made for our own printers, download them and move them to the Marlin/Marlin directory (same directory than the Marlin.ino file):

ET4 pro (TMC2208)

ET5 pro (TMC2208)

Now that Marlin is configured you can build the firmware using your favorite IDE or opening a termimal:

pio run --evironement ANET_ET4_OpenBLT

WARN It is the same built environement for both ET4 and ET5 motherboards (Only Configurations files needs to be updated)

Testing

When the BLTouch is first powered up it does a self test - Starting with the pin up it them goes down/up 3 times and ends up the the LED on solid.

The BLTouch acts on the following gcode that can be used manually to diagnose faults etc but you don’t need to normally worry about them.

GCode Description
M280 P0 S10 pushes the pin down
M280 P0 S90 pulls the pin up
M280 P0 S120 Self test – keeps going until you do pin up/down or release alarm
M280 P0 S160 Release alarm

The BLTouch has two fonctional modes:

  1. Alarm/Continuous flashing – The BLTouch can sense when something is wrong and then goes into alarm mode. Alarm can be triggered like an obstruction that stops the pin going up and down freely, it could be dirt etc.
  2. Printing - Providing the firmware is correctly configured the sensor responds to the same codes as any other sensor eg inductive, capacitive or IR. The Start Code in you slicer should contain the sequence G28 followed by G29 to do the auto bed levelling. (don’t put another G28 after the G29 as it will just remove the G29 results).

Calibration using GCODE instruction

This process also assumes that the EEPROM has been enabled in Marlin. From the command window of Repetier Host or Octoprint Host. enter the following:

GCode Description / instruction
M851 note the number
M851 Z0 set the offset to zero
G28
G1 Z0

The LCD display should show Z = 0

If you have sets the software endstops in your firmware ([XYZ]_MIN_POS to [XYZ]_MAX_POS), you may have to disable the software endstops.

GCode Description / instruction
M211 S0 Optionally enable/disable software endstops, then report the current state.

ow place a 90g paper sheet under the nozzle and adjust the height of the Z axis: You have two options.

From the display menu

  1. go to the Menu then Prepare/Move axis/0.1mm/Move Z
  2. move the Z axis slowly down until the nozzle is the right distance from the build plate (folded piece of paper or thin card).
  3. Note the Z axis value on the display it should be something like -1.5

Using Gcode:

GCode Description / instruction
G0 Z-0.1 Move down Z (Reapit until the nozzle is the right distance from the build plate (folded piece of paper or thin card).

Now you can save the Z value and set the software endstops:

GCode Description / instruction
M851 Z-1.5 to set the offset you got in the previous step.
M211 S1 Enable software endstops then report the current state.
M500 Stores the values in EEPROM so that it is not reset when you power the printer off and on.

Thats it – you are ready to print.

If you find that you need to increase or decrease the gap then do:

GCode Description / instruction
M851 Z-1.4 this would make the gap bigger
M851 Z-1.6 this would make the gap smaller
M500 to save the value to EEPROM

NOTE: Remember the -1.4, -1.5 and -1.6 are just examples , yours will be different If your firmware isn’t setup to allow negative z movement (#define min_software_endstopsfalse) you will need to measure/estimate the negative value to enter with the M851 command.

Calibrating BLTouch from LCD display controls.

Assumptions:

  • The value of PROBE_OFFSET_FROM_EXTRUDER is set at -2 in Marlin configuration.h if it is set at something else take that into account in the formula below.
#define Z_PROBE_OFFSET_FROM_EXTRUDER -2   // Z offset: -below [the nozzle] (always negative!)

Initial setup

Let’s now setup the printer according to the new configuration:

  1. Control > Restore failsafe (start with default settings if first installation)
  2. Prepare > Auto home
  3. Prepare > Move axis > Move 0.1mm > Move Z
  4. Slowly move the Z axis down until you have the correct first layer gap (paper or thin card method)
  5. Note the distance on the display e.g. 0.6 mm (0.6 mm is example, note your actual)
  6. Use this formula to determine your Z offset needed: e.g. Z offset = -2 + 0.6, meaning -1.4mm
  7. Control > Motion > Z offset and enter the value obtained above e.g. -1.4 in this example
  8. Control > Store memory

Fine tuning – after initial setup

The BLTouch is very accurate and consistent after the initial setup but there are times when you might want to fine tune for example for different filament materials or bed types.

  1. Control > Motion > Z offset and enter the new value e.g. -1.3
  2. Control > Store memory

Notes on BLTouch flashing alarm

When the BLTouch starts up initially or starts a G28 homing sequence it extends its probe and if any obstruction is found it goes in to a flashing alarm mode. An obstruction could also be dirt on the pin restricting smooth movement, in that case just clean it. Raise the nozzle by either LCD menu or host software so the alarm won’t just happen again. Then there are 3 ways to reset the alarm:

  1. Power down/up again
  2. Frome host software send this gcode M280 P0 S160
  3. Some printer manufactures have added Reset BLTouch to the LCD menu

Questions ?

Any questions, remarks ? Contact us on any of our social networks or communications interfaces !