added RS485 communication with VFD

This commit is contained in:
cpu
2025-12-27 18:40:22 +01:00
parent ccb6470b67
commit 555f220e0e
5 changed files with 50 additions and 31 deletions

Binary file not shown.

View File

@@ -34,6 +34,8 @@
* **Limit Sensors:** 3x **LJ12A3-4-Z/BX** (Inductive NPN NO). * **Limit Sensors:** 3x **LJ12A3-4-Z/BX** (Inductive NPN NO).
* *Note: The PiBot V4.7 features built-in 0-10V analog output and opto-isolated inputs, eliminating the need for separate converter modules and isolation boards.* * *Note: The PiBot V4.7 features built-in 0-10V analog output and opto-isolated inputs, eliminating the need for separate converter modules and isolation boards.*
![PiBot FluidNC GRBL Laser CNC Controller V4.7B top](images/PiBot_Board_top.jpg)
![PiBot FluidNC GRBL Laser CNC Controller V4.7B bottom](images/PiBot_Board_bottom.png)
### Power System (Dual PSU) ### Power System (Dual PSU)
* **Motion Power:** Mean Well **LRS-350-24** (24V, 350W) for Drivers. * **Motion Power:** Mean Well **LRS-350-24** (24V, 350W) for Drivers.
* **Logic Power:** Mean Well **MDR-20-24** (24V, 20W DIN Rail) for PiBot Board & Sensors. * **Logic Power:** Mean Well **MDR-20-24** (24V, 20W DIN Rail) for PiBot Board & Sensors.
@@ -90,8 +92,8 @@ The PiBot V4.7 uses 5V logic shifting for axis signals. The following diagram il
### D. Spindle Control (0-10V Direct) ### D. Spindle Control (0-10V Direct)
The PiBot V4.7 includes an integrated 0-10V circuit. The PiBot V4.7 includes an integrated 0-10V circuit.
**Signal Connection:** **1. 0-10V Signal Connection**
* Locate the **10V Spindle Interface** terminal on the PiBot. Locate the **10V Spindle Interface** terminal on the PiBot.
| PiBot Output | VFD Terminal | Function | | PiBot Output | VFD Terminal | Function |
| :--- | :--- | :--- | | :--- | :--- | :--- |
@@ -101,6 +103,22 @@ The PiBot V4.7 includes an integrated 0-10V circuit.
| **out2/Rev** | **REV** | Reverse Signal | | **out2/Rev** | **REV** | Reverse Signal |
| **out common** | **DCM** | Digital Common | | **out common** | **DCM** | Digital Common |
**2. RS485 Implementation Detail (4-Core Shielded)**
It allows for digital precision (no voltage drift), real-time RPM feedback, and the ability to monitor VFD temperature and current via the FluidNC Web UI.
To ensure zero-error communication at 24,000 RPM, the RS485 cable must be paired as follows:
1. **Signal Pair:** [RS+] and [RS-] must share a single twisted pair to maximize differential noise cancellation.
2. **Reference Pair:** Both wires of the remaining twisted pair are joined for [GND] to provide a stable common-mode reference between the PiBot and VFD logic.
3. **Shielding:** The drain wire/braid is connected to the VFD Earth terminal (PE) only. The PiBot side of the shield is left floating (cut and insulated) to prevent ground loops.
4. VFD Config (Huanyang):
Set PD001=2 and PD002=2 for RS485 control.
Set PD163=1, PD164=1, PD165=3 for 9600 baud communication.
5. Wiring:
PiBot [A] → VFD [RS+]
PiBot [B] → VFD [RS-]
PiBot [GND] → VFD [DCM] (If required)
Shield → VFD PE (Earth Ground screw)
### E. Probe (GX12) ### E. Probe (GX12)
* **Pin 1 (GND):** Alligator Clip. * **Pin 1 (GND):** Alligator Clip.
* **Pin 2 (Signal):** Touch Plate (Connect to PiBot Probe Input). * **Pin 2 (Signal):** Touch Plate (Connect to PiBot Probe Input).
@@ -162,6 +180,7 @@ For **1.5kW, 220V, 400Hz** spindle:
| **PD005** | Max Freq | **400.0** | | | **PD005** | Max Freq | **400.0** | |
| **PD004** | Base Freq | **400.0** | **CRITICAL:** Do not leave at 50/60. | | **PD004** | Base Freq | **400.0** | **CRITICAL:** Do not leave at 50/60. |
| **PD003** | Main Freq | **400.0** | | | **PD003** | Main Freq | **400.0** | |
| **PD011** | Min Freq | **100** | Lowest spped 6,000 RPM Safety Limit |
| **PD141** | Rated Voltage | **220** | | | **PD141** | Rated Voltage | **220** | |
| **PD142** | Rated Current | **5** | | | **PD142** | Rated Current | **5** | |
| **PD143** | Motor Poles | **2** | High-speed CNC spindles are 2-pole. | | **PD143** | Motor Poles | **2** | High-speed CNC spindles are 2-pole. |

View File

@@ -27,7 +27,7 @@ axes:
feed_scaler: 1.100 feed_scaler: 1.100
motor0: motor0:
limit_neg_pin: gpio.34:low limit_neg_pin: gpio.26:low
limit_pos_pin: NO_PIN limit_pos_pin: NO_PIN
limit_all_pin: NO_PIN limit_all_pin: NO_PIN
hard_limits: false hard_limits: false
@@ -54,7 +54,7 @@ axes:
feed_scaler: 1.100 feed_scaler: 1.100
motor0: motor0:
limit_neg_pin: gpio.39:low limit_neg_pin: gpio.33:low
limit_pos_pin: NO_PIN limit_pos_pin: NO_PIN
limit_all_pin: NO_PIN limit_all_pin: NO_PIN
hard_limits: false hard_limits: false
@@ -82,7 +82,7 @@ axes:
motor0: motor0:
limit_neg_pin: NO_PIN limit_neg_pin: NO_PIN
limit_pos_pin: gpio.36:low limit_pos_pin: gpio.32:low
limit_all_pin: NO_PIN limit_all_pin: NO_PIN
hard_limits: false hard_limits: false
pulloff_mm: 1.000 pulloff_mm: 1.000
@@ -133,34 +133,34 @@ coolant:
################################################################################################################################ ################################################################################################################################
# Begin Huanyang RS485 # Begin Huanyang RS485
# uart1: uart1:
# txd_pin: gpio.15 txd_pin: gpio.15
# rxd_pin: gpio.16 rxd_pin: gpio.16
# rts_pin: gpio.14 rts_pin: gpio.14
# baud: 9600 baud: 9600
# mode: 8N1 mode: 8N1
# Huanyang: Huanyang:
# uart_num: 1 uart_num: 1
# modbus_id: 1 modbus_id: 1
# tool_num: 1 tool_num: 1
# speed_map: 0=0% 0=25% 6000=25% 24000=100% speed_map: 0=0% 0=25% 6000=25% 24000=100%
# off_on_alarm: false off_on_alarm: true
# Begin 10V # Begin 10V
10V: # 10V:
forward_pin: gpio.15 # forward_pin: gpio.15
reverse_pin: gpio.14 # reverse_pin: gpio.14
pwm_hz: 5000 # pwm_hz: 5000
output_pin: gpio.13 # output_pin: gpio.13
enable_pin: NO_PIN # enable_pin: NO_PIN
direction_pin: NO_PIN # direction_pin: NO_PIN
disable_with_s0: false # disable_with_s0: false
s0_with_disable: true # s0_with_disable: true
spinup_ms: 0 # spinup_ms: 0
spindown_ms: 0 # spindown_ms: 0
tool_num: 0 # tool_num: 0
speed_map: 0=0.000% 1000=0.000% 24000=100.000% # speed_map: 0=0% 6000=25% 24000=100%
off_on_alarm: false # off_on_alarm: false
# End of File # End of File

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

BIN
images/PiBot_Board_top.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB