Skip to content

Latest commit

ย 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– RoboMotion-FPGA

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

HDL FPGA IDE License Modules XDC

๐Ÿ“– ไธญๆ–‡ๆ–‡ๆกฃ ยท ๐Ÿ—๏ธ Architecture ยท ๐Ÿงฑ Modules ยท ๐Ÿ“ก UART Protocol ยท ๐Ÿš€ Quick Start


๐Ÿ“– Overview

โšก RoboMotion-FPGA is a complete Verilog HDL control system for a mobile manipulation robot targeting Xilinx FPGA platforms. It integrates an omnidirectional four-wheel chassis, a six-servo robotic arm subsystem, sensor and display peripherals, and multiple UART command interfaces into a single, unified top-level hardware design โ€” purpose-built for autonomous mobile grasping applications. ๐ŸŽฏ

๐Ÿค– ย  ๐Ÿƒ๐Ÿ’จ ย  ๐Ÿ“ก ย  ๐Ÿฆพ ย  ๐Ÿš— ๐Ÿš— ๐Ÿš— ๐Ÿš— ๐Ÿš— ๐Ÿš—


โœจ Highlights

What makes this project โœจ Awesome โœจ?

๐Ÿš—
Mobile Chassis

4-channel DC motor drive with encoder feedback, PWM output, and speed PID closed-loop control. Smooth and precise motion guaranteed! ๐ŸŽ๏ธ๐Ÿ’จ

๐Ÿงฎ
Kinematics Engine

Three motion models: Mecanum ๐Ÿ”„, 4-wheel omni โž•, and 3-wheel omni ๐Ÿ”บ โ€” selectable at runtime via UART. Pick your wheels, pick your moves! ๐Ÿ˜Ž

๐Ÿฆพ
Robotic Arm

6-channel servo PWM with CORDIC-based inverse kinematics for arm positioning and gripper control. Reach, grab, conquer! ๐ŸŽฏโœŠ

๐Ÿ“ก
Multi-Protocol UART

Bluetooth control ๐Ÿ“ฑ, machine-vision input ๐Ÿ‘๏ธ, configuration ACK TX โœ…, and FSM-based command parsing โ€” all over configurable UART channels. Talk to your robot your way! ๐Ÿ’ฌ

๐ŸŒก๏ธ
Sensor Suite

DHT11 temperature & humidity ๐ŸŒค๏ธ, UART-based distance inputs (ร—3) ๐Ÿ“, push-button inputs ๐Ÿ”˜, and 74HC595-driven 7-segment display ๐Ÿ”ข. Your robot has senses! ๐Ÿ‘ƒ

๐Ÿ”ง
Developer Friendly

Modular hierarchy ๐Ÿงฉ and clean top-level integration โ€” easy to understand, easy to extend. Clone it, tweak it, make it yours! ๐Ÿš€๐Ÿ˜


๐Ÿš— โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿงฎ โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿฆพ โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ“ก โ”€โ”€โ”€โ”€โ”€โ”€ ๐ŸŒก๏ธ โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ”ง
โœจ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐ŸŽ‰ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โœจ


๐Ÿ—๏ธ Architecture

๐Ÿ“ System Block Diagram ๐Ÿ”

Click to expand & zoom โ€” it all starts with robot_top!

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;
Loading

๐Ÿงฑ Modules

๐Ÿ“ฆ What's Inside the Toolbox? ๐Ÿ”ง

๐Ÿท๏ธ 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

๐Ÿ“ก UART Protocol

๐Ÿ’ฌ How to Talk to Your Robot ๐Ÿค–

๐Ÿ’ก 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

๐Ÿ“ฆ Repository Layout

๐Ÿ—‚๏ธ File Tree โ€” Where Everything Lives ๐Ÿก

๐Ÿ“ฆ 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

๐Ÿ› ๏ธ Development Environment

๐Ÿ–ฅ๏ธ Tool ๐ŸŽฏ Purpose
Vivado Synthesis, implementation, timing analysis, and bitstream generation
FPGA Target hardware; see .xdc files for package pin assignments

๐Ÿš€ Quick Start

โšก Get Up and Running in 7 Steps! ๐Ÿ

  1. ๐Ÿ“ Create a new project in Xilinx Vivado
  2. ๐Ÿ“ฅ Add all Verilog sources from verilog/rtl/
  3. ๐Ÿ“Œ Add XDC constraints from constrain/
  4. ๐Ÿ”„ Regenerate or replace the bundled filelists if your toolflow cannot use the legacy Windows absolute paths in verilog/filelists/
  5. ๐ŸŽฏ Set robot_top.v as the system top module
  6. โš™๏ธ Run Synthesis โ†’ Implementation โ†’ Generate Bitstream
  7. ๐Ÿ”Œ Download the bitstream to your FPGA board and power on โšก

๐Ÿ“ โ”€โ”€โ†’ ๐Ÿ“ฅ โ”€โ”€โ†’ ๐Ÿ“Œ โ”€โ”€โ†’ ๐Ÿ”„ โ”€โ”€โ†’ ๐ŸŽฏ โ”€โ”€โ†’ โš™๏ธ โ”€โ”€โ†’ ๐Ÿ”Œ โœจ Done! โœจ


๐Ÿ“Š Project Stats

๐Ÿ“ˆ Metric ๐Ÿ”ข Count ๐Ÿ Status
๐Ÿงฉ Verilog Modules 56 ๐Ÿ†
๐Ÿ“ XDC Constraints 2 โœ…
๐Ÿ“ CORDIC Operators 4 โœ…
๐Ÿ”„ Kinematic Models 3 โœ…
๐Ÿ“ก UART Interfaces 4+ โœ…
๐Ÿ”Œ Motor Channels 4 โœ…
โšก Servo Channels 6 โœ…


๐Ÿ™ Acknowledgements

๐Ÿค Special thanks to... ๐Ÿ’ Appreciation
Xilinx / AMD FPGA Ecosystem ๐ŸŽฏ
The Open-Source HDL Community ๐ŸŒ
All Contributors & Users ๐Ÿซต๐Ÿ˜


๐Ÿ“œ License

This project is intended for educational and research use. ๐Ÿ“š๐Ÿ”ฌ

๐Ÿ“– โ”€โ”€โ†’ ๐Ÿง  โ”€โ”€โ†’ ๐Ÿ’ก โ”€โ”€โ†’ ๐Ÿค–

About

RoboMotion-FPGA is a complete Verilog HDL control system for a mobile manipulation robot targeting Xilinx FPGA platforms.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages