Skip to content

fisherinnovation/FI-Rover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

199 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FI-Rover

FI-Rover is currently focused on the drivetrain control stack. An Arduino generates deterministic STEP/DIR pulses for two stepper drivers, while control comes from either:

  • an ExpressLRS receiver over CRSF on the Arduino hardware UART, or
  • USB serial commands from the Python host tools for bench testing.

The web controller experiment has been removed from the active firmware because HTTP handling made step timing choppy.

Current Status

  • Board: Arduino UNO R4 WiFi.
  • Motor drivers: STEP/DIR drivers with MS1/MS2/MS3 microstep pins and active-low enable.
  • Radio control: ELRS CRSF at 420000 baud on Serial1.
  • Drive mapping: arcade mix, channel 2 is forward/reverse and channel 1 is left/right.
  • Current drivetrain tuning:
    • Quarter-step mode.
    • 2400 microsteps/second max command speed.
    • 3200 microsteps/second^2 acceleration.
    • ELRS neutral deadzone of 120 mapped control units.

Safety Behavior

The Arduino firmware is deliberately conservative around startup and signal loss:

  • Drivers are disabled at boot.
  • ELRS control will not arm until throttle and steering are both neutral for one second.
  • ELRS signal loss stops motion, disables drivers, and requires neutral again before re-arming.
  • USB serial continuous commands time out if the host stops sending updates.
  • MOVE is retained only for short blocking bench-test nudges.

Always test firmware changes with the drivetrain raised off the floor first.

Repository Layout

  • Arduino/StepperController/ - Arduino firmware for the two drivetrain stepper drivers and ELRS CRSF input.
  • host/rover_control/ - Python 3 serial client and CLI for USB bench control.
  • docs/ - wiring, protocol, and bring-up notes.

ELRS Wiring

ELRS receiver Arduino UNO R4 WiFi
5V 5V
GND GND
TX D0 / RX
RX D1 / TX

Configure the receiver output protocol as CRSF. The firmware reads CRSF on Serial1 at 420000 baud.

Current channel calibration:

  • Channel 1: steering, min 174, center 922, max 1811.
  • Channel 2: throttle, min 174, center 922, max 1811.

Firmware Workflow

  1. Open Arduino/StepperController/StepperController.ino in the Arduino IDE.

  2. Upload it to the Arduino UNO R4 WiFi.

  3. Open Serial Monitor at 115200.

  4. Leave the transmitter sticks centered until this appears:

    ELRS armed: neutral confirmed
    
  5. Drive gently at first and watch for missed steps, buzzing, or unexpected movement.

ELRS_DEBUG_ENABLED is currently on for bring-up. Set it to 0 later if you want less serial output during normal driving.

USB Bench Control

Install the host dependency:

cd host
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

Test serial communication:

python -m rover_control.cli --port /dev/ttyACM0 ping

On Windows, use the Arduino COM port:

python -m rover_control.cli --port COM3 ping

Short arcade-control test with the drivetrain raised:

python -m rover_control.cli --port /dev/ttyACM0 arcade 250 0 --duration 1.0

Interactive keyboard control:

python -m rover_control.cli --port /dev/ttyACM0 teleop

Use W/S for throttle, A/D for steering, space to stop, and Q to quit.

Read docs/bringup.md before testing on the floor.

About

Arduino firmware and Python host tools for a stepper-driven ground rover with ExpressLRS radio control.

Resources

Stars

Watchers

Forks

Contributors