SanMower

SanMower is a DIY autonomous mower prototype based on a Greenworks 21-inch 40V brushless deck. The design separates high-level autonomy from time-critical hardware control: a Raspberry Pi 3 handles navigation, localization, geofencing, telemetry, and orchestration, while a Raspberry Pi Pico provides deterministic motor outputs and safety interlocks.

System design

  • Power and actuation: A 56V EGO battery bus feeds the blade controller directly and a 56V-to-36V converter for the two drive controllers. Two hoverboard hub motors provide differential drive, while a brushless mower motor provides the cutting load.
  • Navigation: A u-blox NEO-6M/NEO-8M GPS module supplies position data and a BNO055 IMU supplies orientation data. The Pi combines these streams for heading, waypoint, and coverage-path decisions.
  • Real-time control: The Pico generates PWM, direction, brake, and blade-control signals; exchanges commands with the Pi over UART; and decodes the FlySky receiver for manual operation and failsafe behavior.
  • Safety inputs: Three normally closed bumper/limit switches, an auto/manual selector, and an emergency-stop input can remove motor commands independently of high-level navigation.
  • Telemetry and UI: Runtime state is designed to be kept in memory and exposed over MQTT. The lightweight Flask/HTMX interface can poll status, display a generated geofence/track map, and issue start, pause, and emergency-stop commands.

Component details

Mower platform and power

  • Greenworks 21-inch 40V brushless mower deck: The donor platform provides the cutting deck, brushless blade motor, and mechanical chassis for the autonomous conversion. Its compact 21-inch deck keeps the prototype small enough for controlled testing while providing a realistic residential mowing load.
  • EGO 56V batteries: Two 56V lithium battery packs are specified in parallel as the main energy source. The battery bus supplies the blade controller and the downstream DC-DC converters. A main 60A–80A breaker is included in the documented power architecture.
  • 56V-to-36V DC-DC converter: A high-current step-down converter supplies the lower-voltage drive rail for the wheel controllers. The design documents a 30A output rating, equivalent to up to 1,080W at 36V, subject to peak-current, cooling, and load validation.
  • 56V-to-5V DC-DC converter: This converter creates the regulated logic rail for the Raspberry Pi, Pico, FlySky receiver, and sensors. Keeping the compute and signal electronics on a dedicated low-voltage rail isolates them from the high-current motor supply.
  • Power distribution and protection: The design uses a common ground bus, separate high-current and logic wiring, a main breaker, and planned branch protection. Wire gauges, fusing, pre-charge, and transient suppression still require final validation before high-power operation.

Drive and cutting hardware

  • Two hoverboard hub motors: The left and right hub motors provide differential drive. Independent speed and direction control allows the mower to move forward, reverse, turn, and pivot by varying the two wheel outputs.
  • Two RioRand 350W motor controllers: Each controller drives one wheel motor from the 36V rail. The Pico supplies PWM speed, direction, brake, and enable/stop signals. The documented controller range is 6V–60V, with approximately 16A continuous and 20A peak current per controller.
  • Brushless mower blade motor: The deck’s high-power brushless motor remains the cutting actuator. It is specified for approximately 40V–60V operation, with 15A–25A continuous current and substantially higher startup or peak demand.
  • Flipsky VESC 75100 V2.0/PRO: The VESC is the proposed blade motor controller. It connects to the 56V switched bus, drives the blade motor’s three phases, and receives a servo-style PPM command from the Pico for blade enable and speed control.

Compute, control, and sensing

  • Raspberry Pi 3 Model B+: The high-level computer runs Raspberry Pi OS Lite and Python services for navigation, geofencing, telemetry, and orchestration. It communicates with the Pico over UART, reads GPS over serial, and reads the IMU over I2C.
  • Raspberry Pi Pico: The real-time microcontroller runs MicroPython or Pico C/C++ firmware. It generates motor-control PWM, decodes RC input, handles physical GPIO interrupts, and applies stop conditions without depending on Linux scheduling.
  • u-blox NEO-6M/NEO-8M GPS module: The GPS supplies latitude, longitude, and time data over a serial NMEA connection. It supports boundary recording, position tracking, and the planned autonomous coverage path. An RTK-capable upgrade is identified as a future accuracy path.
  • BNO055 9-axis IMU: The IMU supplies absolute orientation and heading data over I2C. Its compass and orientation readings complement GPS during turns and short periods of noisy or sparse position updates.
  • FlySky FS-iA6B/FS-iA10B receiver: The RC receiver provides manual driving, blade-mode selection, emergency-stop input, and geofence-recording control through i-BUS/PPM channels. Manual drive output is capped at 60%, and blade control is limited to off, half, or full speed in the documented mapping.
  • ME-8108 rotary lever limit switches: Three normally closed switches act as front-left, front-right, and rear/deck-height bumper or end-stop inputs. Their fail-safe wiring allows an open circuit or triggered switch to request a motor stop.
  • Auto/manual selector: A physical selector connected to the Pico determines whether commands come from the autonomous Pi path or the manual control path. This provides a direct operator mode boundary during testing.
  • Emergency-stop input: A dedicated normally closed emergency-stop circuit is monitored by the Pico. The software response disables drive PWM, applies braking, and disables the blade command; a safety-rated hardware contactor or equivalent power-disconnect path remains a required improvement.

Software and operator interface

  • Raspberry Pi OS Lite and systemd: A headless operating-system configuration keeps the Pi focused on navigation and communications, with services able to start automatically and run without a desktop environment.
  • Python, pyserial, NumPy, and sensor libraries: Python provides high-level orchestration; pyserial handles Pi-to-Pico and GPS serial links; NumPy supports sensor and navigation calculations; BNO055 and GPS libraries provide device interfaces.
  • MQTT telemetry: MQTT is used as the lightweight machine-to-machine telemetry channel for state, position, coverage, and diagnostics without requiring a database.
  • Flask and HTMX dashboard: Flask provides local status and control endpoints, while HTMX periodically refreshes telemetry and map fragments without a separate JavaScript build system. The interface is intended to show state and coverage and provide pause and emergency-stop controls.
  • GeoJSON and in-memory geofencing: Recorded boundary points are stored as GeoJSON, while geofence polygons and coverage state are intended to remain in memory for fast containment checks and reduced SD-card wear.

Operating modes

  1. Manual mode uses the FlySky receiver for differential steering and throttle, with drive output capped for safer testing.
  2. Boundary recording captures GPS points into a GeoJSON boundary for a mowing area.
  3. Autonomous mode follows generated lawnmower-pattern waypoints while enforcing the virtual geofence and monitoring physical interlocks.
  4. Emergency stop disables drive and blade outputs and places the system in a stopped state until it is safely reset.

Engineering focus

The project emphasizes a small, service-oriented software stack suitable for a headless Raspberry Pi: Raspberry Pi OS Lite, Python, pyserial, NumPy, MQTT, and in-memory geospatial state rather than a database. This keeps the navigation loop responsive and reduces SD-card writes while retaining a browser-based monitoring surface.

The repository also documents the electrical design, pin mapping, remote-control channels, setup workflow, and findings from wiring review. Before outdoor or blade testing, the documented open items must be verified, including a hardware E-stop contactor, per-branch fusing, controller input voltage compatibility, current/thermal budgets, and RC-link-loss behavior.

Technologies: Raspberry Pi 3, Raspberry Pi Pico, MicroPython, Python, GPS, BNO055 IMU, MQTT, Flask, HTMX, UART, PWM, embedded systems

Source: sangit6031hub/sanmower

Updated: