This document provides an overview of how to get a Belay sensor running.
Table of Contents
- Prerequisites
- BOM/sourcing
- Printed parts
- Assembly
- Wiring
- Kalico installation
- Testing
- Further reading
Your 3D printer must meet the following requirements to work with Belay:
- Must use 1.75mm filament.
- Must run Kalico or Klipper firmware.
- The toolhead or primary extruder must have a collet/coupling to secure a 4mm bowden tube at its inlet. The secondary extruder must have one at its outlet as well.
The following hardware is required:
Component/Item | Qty Required | Notes |
---|---|---|
Omron D2F-L Microswitch | 1 | See Trad Rack BOM/sourcing guide for other variants that will work |
Collet | 2 | See Trad Rack BOM/sourcing guide for an ECAS04 source |
Collet clip | 2 | Only needed if using a 5mm or 6mm collet |
M2 x 12mm Pan Head Self Tapping Screw | 2 | Longer screws will also work but will stick out |
See the STLs README for collet type options. Some example sources for 5mm/6mm collets and collet clips:
- 5mm collet - KB3D
- 5mm collet clip - KB3D
- 6mm collet and collet clip - AliExpress
See the Annex BOM/sourcing guide for recommended sources for all other components.
See the following files/folders:
- Print Settings and File Key: print settings to use and info on reading the STL filenames.
- STLs folder: contains all STL files.
- STLs README: information on what parts to print.
This section lists the assembly steps. If you are using ECAS04 collets, you can ignore any time a step tells you to add a collet clip.
Insert the 2 collets into the sensor housing and slider:
Place the slider into the sensor housing. Make sure the arrow is visible and facing the same direction as in the image:
Place the cover onto the sensor housing:
Insert the microswitch from the bottom and secure with 2 M2x12 screws (going through the cover, through the switch, and into the sensor housing). Make sure the tip of the lever on the microswitch is pointing to the left:
Push the slider to the left until it reaches the end of its travel. Then insert the entry bowden tube and push it in as far as it can go. The tube should extend past the left end of the slider and into the sensor housing:
Gently pull the tube until the slider reaches the other end of its travel:
Important
The tube should extend past the left end of the slider and into the sensor housing, as shown by the orange highlighted portion in the image above. If you can see a gap in the filament path, then the tube was not inserted all the way, and you need to retry the previous 2 steps (move the slider to the left end of its travel before pushing the tube further in, then pull the tube until the slider reaches the right end of its travel).
Add a collet clip by inserting it through the slot in the cover:
Insert the exit bowden tube, then add a collet clip:
The microswitch has 3 solder points, but we're only going to be using 2 of them. Specifically, we'll be using the two solder points on the left and right sides of the housing. You can ignore the middle one.
The wires will not be used to carry any substantial current. So you don't have to worry about using a specific gauge of wire.
Solder 2 wires to the microswitch as shown below:
Make sure you secure them to the sensor housing with a zip tie as shown below. This will keep any stresses from moving the belay around off the solder points.
Next, you'll need to identify a port on your controller board to use. An endstop port is the easiest option, but you can use almost any available port with an input signal pin and a ground pin. Make sure you note the microcontroller pin name for the signal pin of this port, as you'll need it when we get to setting up the belay in Kalico or Klipper later. In this example, we'll be using an endstop port. This is a 3-pin port, and connects using a JST-XH connector.
The port's pins are 3.3v, ground, and signal. The Belay only needs to connect to the ground and signal pins. You'll need to crimp the wires and then make sure you insert them in the connector aligned with the proper pins. It does not matter which wire is connected to ground or signal.
That's all it takes to wire the belay. Whenever you're ready, you can run the wire and plug it in to your printer's controller board. Remember that sensor pin name for the next steps.
This section lists the steps to get Belay set up to work with Kalico or Klipper:
This section involves adding the Belay Klippy module(s) to Klipper and enabling updates through Moonraker.
If you are using Kalico, you can skip to setting up config files since Kalico already includes the belay module.
Run the following commands to download and install the Klippy module(s):
cd ~
curl -LJO https://raw.githubusercontent.com/Annex-Engineering/Belay/main/Kalico/klippy_module/install.sh
chmod +x install.sh
./install.sh
Then remove the install script with the following command:
rm install.sh
Finally, restart the klipper service using the following command:
sudo systemctl restart klipper
Tip
If you ever need to run the install script again in the future (for
example if additional Klippy modules get added), you can do so
without recreating the belay_klippy_module
directory using the
following commands:
cd ~
./belay_klippy_module/Kalico/klippy_module/install.sh <branch_name>
If unspecified, branch_name
defaults to main
.
To enable updates of the Belay Klippy module(s) through Moonraker,
add the following to your moonraker.conf
file. This file is usually
located in ~/printer_data/config/
:
[update_manager belay]
type: git_repo
path: ~/belay_klippy_module
origin: https://github.com/Annex-Engineering/Belay.git
primary_branch: main
managed_services: klipper
Then restart the moonraker service using the following command:
sudo systemctl restart moonraker
Sample config files are provided for different secondary extruder types. Copy the file from the corresponding subfolder of the kalico_config folder and include it in your main printer config file.
Change the sensor_pin
config option to match the pin you are using.
In addition, make sure to follow all instructions left in the comments
of the config file (which are specific to the type of secondary
extruder you are using) for any further changes that may be needed.
Restart Kalico once you have finished making changes to the config file(s).
This section explains how to test that Belay is working properly:
Push the bowden tubes before and after Belay together by hand so that Belay is compressed. Run the following command and observe the console output:
QUERY_BELAY BELAY=my_belay
Then pull the bowden tubes apart so that Belay is expanded and run the command again.
The expected result is that the console should have reported that
belay my_belay was "compressed" the first time and "expanded" the
second time. If these are reversed, add or remove !
in the value for
sensor_pin
in the config file. If the reported states matched, then
it is likely that either the wrong pin was used or there is a problem
with wiring.
During a print, Belay's slider should stay close to the middle of its travel range without hitting either end.
The recommended starting value for the debug_level
config option is
1
. With this setting, the extruder multiplier set by Belay will be
reported in the console whenever Belay's switch changes state.
Throughout a print with debug_level
set to 1, the reported
multiplier should generally flip back and forth between the values of
the config options multiplier_high
and multiplier_low
(which
default to 1.05
and 0.95
respectively). However, it is possible
that the same multiplier may appear in the console 2 or more times in
a row if the state of the switch changed during a retraction; this is
normal.
If Belay seems to be working and you do not want to see these messages
in the console anymore, you can set debug_level
to 0
in the config
to disable them.
See the Overview document to see the full documents available for Belay, for example to see all available gcode commands or config options.