FPGA-Based Omnidirectional Mobile Manipulator Control System
4-Wheel Omni Chassis ยท 6-DOF Servo Arm ยท CORDIC Kinematics
Multi-UART Control ยท Sensor Suite ยท PID Motor Driver
๐ ไธญๆๆๆกฃ ยท ๐๏ธ Architecture ยท ๐งฑ Modules ยท ๐ก UART Protocol ยท ๐ Quick Start
|
๐ค ย ๐๐จ ย ๐ก ย ๐ฆพ ย ๐ ๐ ๐ ๐ ๐ ๐ |
|
4-channel DC motor drive with encoder feedback, PWM output, and speed PID closed-loop control. Smooth and precise motion guaranteed! ๐๏ธ๐จ |
Three motion models: Mecanum ๐, 4-wheel omni โ, and 3-wheel omni ๐บ โ selectable at runtime via UART. Pick your wheels, pick your moves! ๐ |
6-channel servo PWM with CORDIC-based inverse kinematics for arm positioning and gripper control. Reach, grab, conquer! ๐ฏโ |
|
Bluetooth control ๐ฑ, machine-vision input ๐๏ธ, configuration ACK TX โ , and FSM-based command parsing โ all over configurable UART channels. Talk to your robot your way! ๐ฌ |
DHT11 temperature & humidity ๐ค๏ธ, UART-based distance inputs (ร3) ๐, push-button inputs ๐, and 74HC595-driven 7-segment display ๐ข. Your robot has senses! ๐ |
Modular hierarchy ๐งฉ and clean top-level integration โ easy to understand, easy to extend. Clone it, tweak it, make it yours! ๐๐ |
๐ โโโโโโ ๐งฎ โโโโโโ ๐ฆพ โโโโโโ ๐ก โโโโโโ ๐ก๏ธ โโโโโโ ๐ง
โจ โโโโโโโโโโโโโโโโโโ ๐ โโโโโโโโโโโโโโโโโโ โจ
flowchart LR
classDef external fill:#f8fafc,stroke:#94a3b8,color:#0f172a;
classDef top fill:#e0f2fe,stroke:#0284c7,color:#0c4a6e;
classDef core fill:#ecfdf5,stroke:#059669,color:#064e3b;
classDef output fill:#fff7ed,stroke:#ea580c,color:#7c2d12;
classDef feedback fill:#fefce8,stroke:#ca8a04,color:#713f12;
subgraph IN["๐ External Interfaces"]
command_in["๐ฎ Command Inputs<br/>BLE UART / MV UART / Stop"]
sensor_in["๐ก๏ธ Sensor Inputs<br/>Range UARTs / DHT11 / Key"]
enc["๐ Motor Feedback<br/>Encoder A/B ร4"]
end
robot_top["๐งฉ robot_top<br/>System Integration"]
subgraph CHASSIS["โ๏ธ motor_chip_top โ Chassis Control"]
chassis_uart["๐ก uart_ctrl<br/>Speed + Config Decode"]
wheel_ctrl["๐ wheel_ctrl<br/>Kinematics + Motor Targets"]
motor_driver["๐ dc_motor_driver_top ร4<br/>PID + Encoder + PWM"]
end
subgraph ARM["๐ฆพ arm_top โ 6-Channel Servo Arm"]
arm_uart["๐ก uart_arm_mv / uart_arm_ble<br/>Target + Action Decode"]
arm_motion["๐ motion<br/>CORDIC Inverse Kinematics"]
servo_pwm["โก steer_pwm ร6<br/>Servo Pulse Generation"]
end
subgraph DISPLAY["๐ disp_top โ Sensors & Display"]
sensing["๐ distance ร3 + dht11_ctrl<br/>Sensor Sampling"]
display["๐ข hex_top + hc595_driver<br/>7-Segment Display"]
guard["๐ก๏ธ distance_en / direction_en<br/>Chassis Assist Signals"]
end
command_in --> robot_top
sensor_in --> robot_top
enc --> robot_top
robot_top --> chassis_uart
chassis_uart --> wheel_ctrl
wheel_ctrl --> motor_driver
motor_driver --> motors["๐ M1โM4<br/>H-Bridge + PWM"]
enc -. โฉ feedback .-> motor_driver
chassis_uart --> uart_tx["๐ค uart_tx<br/>Config ACK"]
robot_top --> arm_uart
arm_uart --> arm_motion
arm_motion --> servo_pwm
servo_pwm --> servos["๐ฆพ steeraโsteerf<br/>Servo PWM"]
robot_top --> sensing
sensing --> display
display --> panel["๐ shcp / stcp / ds"]
sensing --> guard -. ๐ก๏ธ safety feedback .-> wheel_ctrl
class command_in,sensor_in external;
class robot_top top;
class chassis_uart,wheel_ctrl,motor_driver,arm_uart,arm_motion,servo_pwm,sensing,display,guard core;
class motors,uart_tx,servos,panel output;
class enc,guard feedback;
| ๐ท๏ธ Subsystem | โก Top Module | ๐ Key Files |
|---|---|---|
| ๐งฉ System Integration | robot_top.v |
Connects chassis, arm, display, sensors, and UART channels |
| โ๏ธ Chassis Control | motor_chip_top.v |
wheel_ctrl.v, dc_motor_driver_top.v, uart_ctrl.v |
| ๐ Wheel Kinematics | wheel_ctrl.v |
Mcknum_wheel_calculate.v, all_direction_wheel_four_calculate.v, all_direction_wheel_three_calculate.v |
| ๐ Motor Driver | dc_motor_driver_top.v |
controller.v, controller_PID.v, encoder.v, pwm_generate.v |
| ๐ฆพ Robotic Arm | arm_top.v |
motion.v, steer_pwm.v, uart_arm_ble.v, uart_arm_mv.v |
| ๐ CORDIC Math | motion.v |
cordic_sincos.v, cordic_arctan.v, cordic_arccos.v, cordic_arctanh.v |
| ๐ Sensors & Display | disp_top.v |
dht11_ctrl.v, distance.v, hc595_driver.v, hex_top.v |
๐ก Tip: Successful configuration commands return
Set Successful!over UART. ๐Command parsing is a mix of ASCII keyword commands and fixed binary frames.
| ๐๏ธ Category | โจ๏ธ Command | ๐ Description | ๐ Example / Range |
|---|---|---|---|
| ๐ง System | baud+<n> |
Set UART baud preset | baud+0 โ baud+4 |
| ๐ Motion | wheel+<n> |
Select wheel kinematics model | wheel+0 Mecanum ๐, wheel+1 4-wheel omni โ, wheel+2 3-wheel omni ๐บ |
| โ๏ธ Config | gr+<value> |
Set gear ratio | gr+30 |
| โ๏ธ Config | Ppr+<value> |
Set encoder PPR | Ppr+13 |
| โ๏ธ Config | alen+<mm> |
Set chassis dimension A ๐ | alen+200 |
| โ๏ธ Config | blen+<mm> |
Set chassis dimension B ๐ | blen+150 |
| ๐ฎ Control | 55 A5 sx x sy y sz z F0 |
Chassis speed frame with sign bytes sx/sy/sz and magnitudes x/y/z ๐๏ธ |
sx/sy/sz: 00 positive โ
, 01 negative โ |
| ๐ Action | 55 C5 mode F0 |
Preset dance control frame ๐บ | mode=01 start mode=00 clear/reset โน๏ธ |
| ๐ฆพ Arm BLE | DD EE ... FF |
Arm action frame for observe ๐ / move ๐ฏ / pack ๐ฆ / put ๐ซณ / catch โ | Parsed by uart_arm_ble.v |
| ๐ฆพ Arm MV | AA BB ... CC |
Vision target frame carrying color ๐จ, signed X/Y ๐, and theta ๐งญ | Parsed by uart_arm_mv.v |
๐ฆ RoboMotion-FPGA/
โโโ ๐ verilog/ ๐ฆ 56 Hardware Source Files
โ โโโ ๐ rtl/ ๐ง RTL Design Sources
โ โ โโโ ๐ top/ ๐งฉ System Tops (robot_top, arm_top, motor_chip_top, ...)
โ โ โโโ ๐ comm/ ๐จ UART Communication (uart_*, fsm_baud)
โ โ โโโ ๐ motion/ ๐ Kinematics & Motion Control
โ โ โโโ ๐ motor/ ๐ Motor Driver, PID, Encoder, PWM
โ โ โโโ ๐ math/ ๐ CORDIC, Multiplier, Divider
โ โ โโโ ๐ peripheral/ ๐ก๏ธ Sensor, Display, Timer, Key Filter
โ โ โโโ ๐ protocol/ ๐ FSM Protocol Parsers (fsm_gr, fsm_ppr, ...)
โ โโโ ๐ filelists/ ๐ Legacy filelists (Windows absolute paths)
โ โโโ ๐ tb/ ๐ง Testbench directory (currently empty)
โ โโโ ๐ sim/ ๐ง Simulation directory (currently empty)
โโโ ๐ constrain/ ๐ Pin Constraints
โ โโโ ๐ robot_top_constrain.xdc
โ โโโ ๐ disp_top_constrain.xdc
โโโ ๐ README.md / README_CN.md ๐ Documentation
๐ Expand Full Hardware Topology ๐๏ธ
๐งฉ robot_top
โโโ ๐ disp_top
โ โโโ ๐ข hex_top / hc595_driver
โ โโโ ๐ก๏ธ dht11_ctrl
โ โโโ ๐ distance ร3
โ โโโ ๐ก uart_ble
โ โโโ ๐ switch_key_filter
โโโ โ๏ธ motor_chip_top
โ โโโ ๐ wheel_ctrl
โ โ โโโ ๐ Mcknum_wheel_calculate
โ โ โโโ โ all_direction_wheel_four_calculate
โ โ โโโ ๐บ all_direction_wheel_three_calculate
โ โ โโโ ๐ dc_motor_driver_top ร4
โ โ โโโ ๐งญ encoder / encoder_AB_detect
โ โ โโโ ๐ง controller / controller_PID / controller_Speed_loop
โ โ โโโ โก pwm_generate
โ โ โโโ ๐ฉ dc_motor_driver
โ โโโ ๐ก uart_ctrl
โ โโโ ๐ fsm_gr / fsm_ppr / fsm_wheel / fsm_a_len / fsm_b_len / fsm_baud
โ โโโ ๐ฎ uart_cmd / dance_cmd
โ โโโ ๐งฎ multiplier / divider
โ โโโ ๐ค uart_data_tx
โโโ ๐ฆพ arm_top
โโโ ๐ motion
โ โโโ ๐ cordic_sincos
โ โโโ ๐งญ cordic_arctan
โ โโโ ๐ cordic_arccos
โโโ โก steer_pwm ร6
โโโ ๐๏ธ uart_arm_mv
โโโ ๐ถ uart_arm_ble
| ๐ฅ๏ธ Tool | ๐ฏ Purpose |
|---|---|
| Synthesis, implementation, timing analysis, and bitstream generation | |
Target hardware; see .xdc files for package pin assignments |
- ๐ Create a new project in Xilinx Vivado
- ๐ฅ Add all Verilog sources from
verilog/rtl/ - ๐ Add XDC constraints from
constrain/ - ๐ Regenerate or replace the bundled filelists if your toolflow cannot use the legacy Windows absolute paths in
verilog/filelists/ - ๐ฏ Set
robot_top.vas the system top module - โ๏ธ Run Synthesis โ Implementation โ Generate Bitstream
- ๐ Download the bitstream to your FPGA board and power on โก
๐ โโโ ๐ฅ โโโ ๐ โโโ ๐ โโโ ๐ฏ โโโ โ๏ธ โโโ ๐ โจ Done! โจ
| ๐ Metric | ๐ข Count | ๐ Status |
|---|---|---|
| ๐งฉ Verilog Modules | 56 | ๐ |
| ๐ XDC Constraints | 2 | โ |
| ๐ CORDIC Operators | 4 | โ |
| ๐ Kinematic Models | 3 | โ |
| ๐ก UART Interfaces | 4+ | โ |
| ๐ Motor Channels | 4 | โ |
| โก Servo Channels | 6 | โ |
| ๐ค Special thanks to... | ๐ Appreciation |
|---|---|
| Xilinx / AMD FPGA Ecosystem | ๐ฏ |
| The Open-Source HDL Community | ๐ |
| All Contributors & Users | ๐ซต๐ |
|
This project is intended for educational and research use. ๐๐ฌ |
๐ โโโ ๐ง โโโ ๐ก โโโ ๐ค |