User Tools

Site Tools


pibot_cnc_laser_series:v496_pro:connect_io_expander:start

PiBot I/O Expander V4 for FluindNC

The main function of this board is to expand I/O capability, solving the problem of insufficient I/O ports on the ESP32.

A comprehensive guide detailing all features is available on the FluidNC wiki, which we recommend reviewing.

Additionally, PiBot provides a quick-start tutorial to help you get up and running swiftly in PiBot wiki.

This is an add-on board for FluidNC CNC controllers. It uses only 2 I/O pins from your ESP32 to provide 18 additional configurable pins and includes an RGB LED. It also features a dedicated connector for a pendant or smart display.

The board extends I/O via a UART connection, offering inputs for switch detection and outputs configurable as digital or PWM.

For your convenience, the board is pre-loaded with firmware prior to shipment.

Package Contents

  1. Expander V4 Main unit × 1 (SKU:PIPDT400B01)
  2. RJ12 module × 1 (SKU:PIRJM012B01)
  3. RJ12 communication cable (0.3m) × 1 (SKU:PIRJC012B01) – [300mm is standard (default). You can optionally select the 1000mm version.]

Feature

  • (4x) opto isolated inputs
  • (4x) photoelectric limit switch inputs - Like the 3D printer Switch(only in PiBot Board)- also can configure as a normal button input.
  • (4x) 5V outputs (PWM capable)
  • (2x) MOSFETS 40V 8A (PWM capable) outputs
  • (2x) Solid-state relay output rating: 40V, 2.5A (only in PiBot Board)
  • (2x) Pin output only (only in PiBot Board)
  • (1x) 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
  • (1x) RJ12 UART input to connect to your controller
  • (1x) RJ12 UART output to connect to your pendant or smart display
  • (1x) 6“ RJ12 cable to connect to controller

Hardware Connection

Diagram Overview


Connect to Controller Board

This module is designed for UART communication through an RJ12 connector. Controllers that feature a dedicated I/O Module socket will need a corresponding RJ12 breakout module to establish the connection.

For flexibility, we have included 5-pin headers on both the main and expansion boards for connection via Dupont wires. Please be aware that the quality of wires and connectors is critical for stable communication.

connect to V4.9PB or V4.9Pro

connect to V4.7B

Controller Connect Pendant via Expander

For UART-based pendants, connect them to the RJ12 port labeled “To Pendant” on the expander.

Please use the firmware version with a baud rate of 100,000, as the expander only supports this baud rate version.

V4.9PB V4.9PRO Connect Pendant via Expander

V4.7B V4.9PRO Connect Pendant via Expander


Firmware Upload

For your convenience, the board is pre-loaded with firmware prior to shipment.

Method One: Via FluidTerm and the UART (Recommend)

Step 1: Prepare a controller board with FluidNC firmware version 3.9.7 or newer installed. Load the provided YAML configuration example onto it. Then, connect the RJ12 cable and link the board to your computer.


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.


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 those steps

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.

Example Yaml code

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

https://www.st.com/en/development-tools/stsw-link004.html

Check and Test

Check the message after Re-Power

Re-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.

Yaml code example

coolant:
  mist_pin: uart_channel1.14
  flood_pin: uart_channel1.15

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.

Test completed.


Brief to YAML Configuration

You can now design your machine parameters by referring to the YAML file we provided.

PIN I/O #Number configuration details from Diagram Overview or the PCB Silkscreen specifications as reference.

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.


Connect Pendant to I/O Expander

Wire the Pendant to the Expander

The expander features a dedicated RJ12 port for connecting the pendant. Additionally, a 5-pin header is reserved for this purpose. Simply plug in the pendant to begin use.

Important Note: The baud rates must match. Since the expander defaults to 1,000,000, ensure you use a pendant version that also supports 1,000,000.

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.

2025/12/07 00:23 · admin

Trouble Shoot

RX TX Communicate Trouble

When you encounter the following situation.

  • If the Pendant Independent connection to the main board and works,
  • If STM32 expander Independent connection to the main board and works,

But the pendant has no signal when pendant V4 connect controller Board via I/O expander

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.

The newly shipped version of Expander has now resolved this issue. Using PiBot's complete kit will not cause this problem. However, if you use PiBot's Pendant V4 with Expanders from other manufacturers (such as Airedale - FluidNC I/O Expander), issues may still occur.

2025/12/07 00:23 · admin

Size

Sch Doc

pibot_cnc_laser_series/v496_pro/connect_io_expander/start.txt · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki