- Stock: In Stock
- Brand: PiBot
- Weight: 0.11kg
- SKU: PISTM040B01
This offer ends in:
What is it
The main function of this board is to expand multiple I/O ports for input and output, solving the problem of insufficient I/O ports on the ESP32.
There is an comprehensive in FluidNC wiki page that tells you how to use each feature. You should probably read it.
But In there PiBot offers a simple tutorial to help you get started quickly.
This is an add on board for FluidNC CNC controllers. It uses (2) I/O pins from your ESP32 to add 18 additional pins and an RGB LED. It also has a connection for a pendant or smart display.
This device adds additional I/O pins to a FluidNC controller via a UART connection. It has inputs that can be used for switches. It also has outputs that can be digital or PWM.
the board have upload the firmware before ship
Feature
- (4) opto isolated inputs
- (4) photoelectric limit switch inputs - Like the 3D printer Switch(only in PiBot Board)
- (4) 5V outputs (PWM capable)
- (2) MOSFETS 40V 8A (PWM capable) outputs
- (2) Solid-state relay output rating: 40V, 2.5A (only in PiBot Board)
- (2) Pin output only (only in PiBot Board)
- (1) RGB LED status indicator. This is used to show the status of the firmware during booting and can then be used as indicator by the user as output pins 18,19 and 20.
- LED indicators on every input and output.
- Terminal blocks on all I/O for easy connection
- (1) RJ12 UART input to connect to your controller
- (1) RJ12 UART output to connect to your pendant or smart display
- (1) 6" RJ12 cable to connect to controller
How it works
It was designed to connect to controllers that support our standard RJ12 UART interface. This is the same connector people have been using for pendants and displays. It does not need a special version or compile of FluidNC.
ou can also connect it to other controller that can directly connect to (2) ESP32 pins. Be careful with the wiring. Miswiring can break both your controller and this expander.
Overview

(Figure-0)
Hardware connect
It is designed to work with controllers that have RJ12 UART connectors. There are RJ12 modules for controllers that have CNC I/O Module sockets.

(Figure-1)

(Figure-2)
If you are already using a Pendant via RJ12, you can insert the expander between the controller and pendant.
If you have a uart based pendant or display, like the FluidDial, you can connect it to the other RJ12 connector labeled "To Pendant".


Firmware Upload
Method One: Via FluidTerm and the UART -- Recommend
Step 1: Prepare a board that has been flashed with FluidNC firmware version 3.9.7 or above. Upload the provided YAML configuration example to it, then connect the RJ12 cable as shown in Figure 1, and finally connect it to the computer.
document:https://www.pibot.com/dls/stm32expanderv4/expander-yaml-config.zip
Step 2: Open the folder of FluidNC firmware version 3.9.7 or above, double-click on "fluidterm", select the appropriate port to enter the program. Wait for the program to appear, then press CTRL+S, select the "firmware.bin" firmware, enter "-W", and press Enter.
document:https://www.pibot.com/dls/stm32expanderv4/STM32_Expander_fimware_1d1.zip
document:https://www.pibot.com/dls/stm32expanderv4/fluidnc-v3.9.7-win64.zip

Step 3: press the BOOT0 button and hold it while pressing and releasing the RESET button. The device will enter bootloader mode and stay in that mode until it is later reset without the BOOT0 button held down.

Some notes regarding this step:
You need to create a UART. The ESP32 has three (0, 1 & 2). The standard USB/Serial port uses 0, so you must use 1 or 2.
The baud for the extender is 1000000
The passthrough_baud should be 57600. In this case the passthrough is referring to passing data from the primary FluidNC serial port to the UART being defined. This is used when uploading firmware from FluidTerm.
If you are using a display or pendant on the second UART, you should have a report interval other than 0.
uart1:
txd_pin: gpio.25
rxd_pin: gpio.27
baud: 1000000
mode: 8N1
passthrough_baud: 57600
passthrough_mode: 8E1
uart_channel1:
report_interval_ms: 75
uart_num: 1
Method Two: via the STM32 programmer
There is an ST-Link header connector on the Stm32. It ls located below the boot and reset buttons. Use the STM32 ST-Link Utility program. Connect the ST-Link as follows
ST-Link | Stm32 expander
3.3V | 3v3
GND | Gnd
SWDIO | SWD
SWCLK | SWC
Re-Power Up
Power on the main controller. It will power the Expander. You should see the a LED light near the RJ12 connector and the RGB status LED should light with all colors on.
Check your startup messages for errors.

Output Test
Enter the M7 command, and solid state relay light 1 will illuminate as shown in the figure.
Enter the M8 command, and solid state relay light 2 will illuminate as shown in the figure.
Enter the M9 command, and all lights will turn off.
coolant:
mist_pin: uart_channel1.14
flood_pin: uart_channel1.15

Test completed.
Config Yaml for your-self
You can now refer to the YAML file we provided to design your own machine parameters, based on the information given in Figure-0 or the channel details provided on the PCB.
Assigns pins to functions in your config file.
The pins are labeled with a number. This is the number you use in the config file. You specify the UART channel number and the pin number like:
limit_neg_pin: uart_channel1.4:low
mist_pin: uart_channel1.14
Note: This number has nothing to do with the STM32 pin numbers, Like A5, B11, etc. These are numbers assigned for the Airedale in the expander's firmware.
Be sure to only assign input pins to input functions and output pins to output functions. If you make a mistake, nothing will break, you just get a warning in your start messages.
Others
This features allows you to add another UART channel device like a pendant or display. The expander filters out expander specific communication and sends the rest out the pass through port. All data received on the pass through is sent through the other UART to the FluidNC controller.
Trouble shoot
we have fix this bug in new version 4.1 ship after Oct.22
If the Pendant rj12 is connected to the main board and works,
and the STM32 expander is connected to the expansion board and works,
but the pendant has no signal when the main board is connected to the expansion board and then to the pendant,
simply swapping these two RX and TX wires will resolve the issue.
These PH2.0 connector cables are inherently designed for flexible configuration—simply pry the latch with a pin to release them.

Sizes

Specification

Shipping List
- Board and connectors × 1
Shipping Notification
1. Global Standard (Excluding USA)
Rate: $7.99
Coverage: Worldwide (excluding the United States)
Features:
Basic international shipping service.
Customs clearance fees not included.Also excluding certen regions like: Peru, Ukraine, Thailand......
2. Global Express (Excluding USA; EU Clearance Included)
Rate: $27.99
Coverage: Worldwide (excluding the United States)
Carriers: DHL or FedEx agents
Key Benefit:
Customs clearance handled for all European Union (EU) destinations.
3. USA Special Channel
Rate: $18.99
Coverage: United States only
Key Benefit:
Includes all customs clearance fees.