Autonomous obstacle-avoidance robot powered by a neural network deployed entirely in FPGA hardware on the Altera DE1-SoC (Cyclone V). Achieves ~1 microsecond inference latency, zero collisions during live demonstration, and fully untethered battery-powered operation.
The system operates in a continuous 100ms control loop. Three ultrasonic sensors feed distance readings through an Arduino Uno, which serializes the data over UART to the DE1-SoC FPGA. The neural network runs entirely in hardware (no CPU, no software), classifies the sensor input into one of three actions, and sends the decision back to the Arduino for motor execution.
3 ultrasonic sensors (HC-SR04) read distances at 45-degree left, center, and 45-degree right
Arduino maps distances to bytes and sends 3 bytes to FPGA via UART at 9600 baud
FPGA scales inputs to Q6.10 fixed-point, runs NN forward pass in ~50 clock cycles
Arduino receives class (Forward / Stop / Turn) and drives the 4 motors accordingly
A compact 2-layer fully-connected network designed to fit within FPGA constraints. All arithmetic uses signed 16-bit Q6.10 fixed-point. A single hardware multiplier is time-shared across all neurons to minimize DSP block usage.
| Class | Action | Condition |
|---|---|---|
| 0 | Forward | All directions clear (center ≥ 40 cm, sides ≥ 25 cm) |
| 1 | Stop | Cornered on all sides (< 15 cm each) |
| 2 | Turn | Obstacle detected on any side |
| Component | Qty | Role |
|---|---|---|
| DE1-SoC Board (Cyclone V 5CSEMA5F31C6) | 1 | NN inference engine |
| Arduino Uno R3 | 1 | Sensor/motor interface |
| HC-SR04 Ultrasonic Sensor | 3 | Obstacle detection (left, center, right) |
| L298N Motor Driver | 2 | Dual H-bridge for 4 DC motors |
| 4-Wheel Robot Chassis | 1 | Mobility platform |
| Bi-directional Level Converter | 1 | 3.3V (FPGA) to 5V (Arduino) |
| 7.4V 2S LiPo Battery | 2 | Motors/Arduino + FPGA (via boost converter) |
| DC Boost Converter | 1 | Steps up to 12V for DE1-SoC |
| Resource | Used | Available | Utilization |
|---|---|---|---|
| ALMs (Adaptive Logic Modules) | 222 | 32,070 | < 1% |
| DSP Blocks | 2 | 87 | 2.3% |
| GPIO Pins | 2 (UART) | 36 | 5.6% |
| 7-Segment Displays | 1 | 6 | 16.7% |
| LEDs | 4 | 10 | 40% |