Internship Project Report & Engineering Handover
Author: Jagan J S (Embedded Engineering Intern, Department of Electrical Engineering, IIT Palakkad)
Project: Aerial Dexterous Manipulators, Grasping and Transportation / Autonomous Agricultural Robotics
Documentation: π Internship Report (PDF) | π Handover Document (PDF) | π Technical Handover Guide (MD)
Modern precision agriculture relies on autonomous unmanned ground vehicles (UGVs) to execute labour-intensive field tasks such as row monitoring, precision spraying, and selective weeding.
This repository houses the complete electrical architecture, bare-metal C firmware, PCB design files, and Python autonomy stack developed to transform a legacy, open-loop BeagleBone Black differential-drive rover into a distributed, closed-loop STM32F411 + Raspberry Pi 5 Ackermann-steering autonomous agricultural rover.
The vehicle is structured across a decoupled, multi-tiered hierarchy:
+-----------------------------------------------------------------------------+
| POWER SYSTEM (54.6V) |
| 54.6V LiFePO4 --> Isolator --> 100A DC Contactor --> 48V DC Bus |
| | |
| +------------------+-------------------+ |
| | | |
| 48V -> 12V Buck 48V -> 5V Buck |
| (Actuator & Driver) (Logic & RPi 5) |
+-----------------------------------------------------------------------------+
β
βΌ
+-----------------------------------------------------------------------------+
| HIGH-LEVEL COMPUTE & AUTONOMY |
| |
| +-----------------------+ +------------------------+ |
| | Raspberry Pi 5 |<βββ I2C1 (400k) βββ| BNO055 9-DOF IMU | |
| | Autonomy Engine | +------------------------+ |
| | β’ Stanley / Pure | |
| | Pursuit Followers | +------------------------+ |
| | β’ Skip-Row Planner | | 4G UGV Tracker (ESP32) | |
| | β’ Odom / IMU Fusion | | β’ Quectel EC200U LTE | |
| +-----------------------+ | β’ Standalone Telemetry | |
| β +------------------------+ |
| β UART 115200 (USART2 Binary Protocol + DMA) |
| βΌ |
+-----------------------------------------------------------------------------+
β
βΌ
+-----------------------------------------------------------------------------+
| REAL-TIME EMBEDDED CONTROL CORE |
| |
| +---------------------------------------------------------------------+ |
| | STM32F411CEU6 ("Black Pill") | |
| | β’ 20 Hz Deterministic Loop (TIM5 Hardware Timer) | |
| | β’ Discrete PI Wheel Velocity Control (wheel_pid.c) | |
| | β’ Dual-Zone Linear Actuator Steering Control (actuator.c) | |
| | β’ Electronic Differential Geometry Computation | |
| | β’ Contactor MOSFET Switch & 400ms Hard RF Failsafe Ladder | |
| +---------------------------------------------------------------------+ |
| β β β β |
+----------β-------------β-----------------β-------------------β--------------+
β β β β
PWM/DIR (PA8/5) I2C1 (0x48) I2C1 (0x60/61) TIM2/3 Quadrature
β β β β
βΌ βΌ βΌ βΌ
+-------------+ +----------+ +---------------+ +------------------+
| Cytron MD10C| | ADS1115 | | Dual MCP4725 | | YT06-OP-1M Optic |
| Motor Driver| | 16-b ADC | | 12-bit DACs | | Wheel Encoders |
+-------------+ +----------+ +---------------+ +------------------+
β β² β β²
βΌ β βΌ β
+-------------+ +----------+ +---------------+ β
| PA-12 Linear| | Dual 10k | | Dual BLDC |βββββββββββββ
| Actuator | | Kingpin | | Motor Drivers |
| (Steering) | | Pots | | (48V 32A) |
+-------------+ +----------+ +---------------+
β
βΌ
+---------------+
| Dual 750W BLDC|
| 20:1 Gearbox |
+---------------+
| Parameter | Symbol | Engineering Value | Firmware Reference |
|---|---|---|---|
| Wheelbase |
|
ROVER_WHEELBASE_M |
|
| Track Width |
|
ROVER_TRACK_WIDTH_M |
|
| Wheel Radius |
|
ROVER_WHEEL_RADIUS_M |
|
| Gearbox Reduction |
|
Motor-to-Axle Ratio | |
| Max Linear Velocity |
|
MAX_LINEAR_VELOCITY |
|
| Nominal Cruise Speed |
|
Path tracking default | |
| Max Steering Angle | STEER_MAX_DEG |
||
| Minimum Turning Radius | Non-holonomic steering limit |
-
Deterministic 20 Hz Execution: Managed via hardware timer
TIM5interrupt for jitter-free control. - Dual-Zone Steering Control: Combines full-speed slewing in large error zones with fine-grained PID in small error deadbands to eliminate linear actuator overshoot.
-
Electronic Differential: Dynamically calculates individual wheel speeds during turns:
$$v_L = v \left(1 - \frac{W}{2L} \tan\delta\right), \quad v_R = v \left(1 + \frac{W}{2L} \tan\delta\right)$$ - Hardware Failsafe Ladder: 400 ms timeout on iBUS/serial input; immediately drops throttle and disengages contactor if signal loss occurs.
- Stanley & Pure Pursuit Controllers: Robust cross-track and heading error compensation for path tracking.
-
Agricultural Skip-Row Headland Planning: Solves turning infeasibilities where crop row spacing (
$1.4\text{ m}$ ) is narrower than the vehicle's minimum turning radius ($2.5\text{ m}$ ).
- Custom schematic and 2-layer PCB layout incorporating optocouplers, RC snubber circuits, TVS diodes, and high-current copper pours.
Autonomous_Ackermann/
βββ docs/
β βββ figures/ β Architectural & field benchmark figures
β βββ Internship_Report.pdf β Full academic internship report (IIT Palakkad)
β βββ Handover_Document.pdf β Comprehensive technical handover manual
β βββ SUCCESSOR_HANDOVER_GUIDE.md β Markdown successor engineering guide
β
βββ Rover_closed_loop/ β Production STM32 Bare-Metal Firmware
β βββ Core/
β β βββ Inc/ β Header files (wheel_pid.h, main.h, etc.)
β β βββ Src/ β Source files (main.c, wheel_pid.c, actuator.c)
β βββ Drivers/ β STM32 HAL and CMSIS Drivers
β βββ Rover_closed_loop.ioc β STM32CubeMX Project Configuration
β
βββ RPi_companion/ β Raspberry Pi 5 Python Autonomy Stack
β βββ ackermann_controller.py β Stanley & Pure Pursuit path tracking
β βββ rpi_stm32_bridge.py β Fast binary UART serial bridge
β βββ make_lawnmower_path.py β Boustrophedon grid coverage generator
β βββ make_skip_row_path.py β Agricultural headland skip-row planner
β
βββ Hardware_KiCad/ β Complete KiCad v6 Schematics & PCB Layout
β βββ kicad_setup.kicad_pro β KiCad Project File
β βββ kicad_setup.kicad_sch β Full System Schematic
β βββ kicad_setup.kicad_pcb β 2-Layer PCB Board Layout
β
βββ ESP32_uart_sniffer/ β Diagnostic UART sniffer firmware
βββ Documentations/ β Detailed engineering logs and notes
- Open
Rover_closed_loop/in STM32CubeIDE or build usingmake/arm-none-eabi-gcc. - Flash via ST-Link V2 using STM32CubeProgrammer or OpenOCD:
st-flash write build/Rover_closed_loop.bin 0x8000000
- Connect Raspberry Pi 5 UART (
/dev/ttyAMA0) to STM32USART2(PA2/PA3). - Run the navigation controller:
cd RPi_companion python3 ackermann_controller.py --controller stanley --path paths/lawnmower_pattern.csv
- Author: Jagan J S
- Affiliation: Department of Electrical Engineering, Indian Institute of Technology Palakkad
- Supervision: Aerial Dexterous Manipulators, Grasping and Transportation Lab / OSDISG Research Group


