Skip to main content
Version: FILS English

Obstacltron

A compact Raspberry Pi-powered robot adept at avoiding obstacles.

info

Author: Matei Eduard Gabriel
GitHub Project Link: Obstacltron on GitHub

Description​

Obstacltron is an obstacle avoider robot built using Raspberry Pi Pico W. It utilizes an L298N motor driver, DC motors, and an HC-SR04 ultrasonic distance sensor.

Motivation​

The motivation behind this project was to create a simple yet effective robot that can navigate its environment autonomously by detecting and avoiding obstacles. This project aims to showcase practical applications of robotics and sensor integration while providing a platform for experimentation and learning.

Architecture​

  • Raspberry Pi Pico W: Chosen as the microcontroller unit due to its affordability and versatility.

  • L298N Motor Driver: Responsible for controlling the DC motors, offering bidirectional control and allowing precise manipulation of the robot's movement.

  • HC-SR04 Ultrasonic Sensor: Serves as the primary sensor for obstacle detection, utilizing ultrasonic waves to measure distances accurately.

  • DC Motors: These motors are the driving force behind the robot's movement, enabling it to navigate its environment.

Components​

  • Raspberry Pi Pico W: Microcontroller unit
  • L298N Motor Driver: Controls the DC motors
  • HC-SR04 Ultrasonic Sensor: Detects obstacles
  • DC Motors: Drive the robot's movement

Connection​

  • Raspberry Pi Pico W and L298N Motor Driver are connected via GPIO pins.
  • The DC motors are connected to the output terminals of the L298N Motor Driver.
  • The HC-SR04 Ultrasonic Sensor is connected to the Raspberry Pi Pico W.

Log​

Week 6 - 12 May​

Acquired the required parts and researched the feasibility of the project. This phase involved understanding the specifications of each component and planning the integration.

Week 7 - 19 May​

Assembled all the parts and wired everything up. This step involved careful connection of the components according to the schematics and initial power-up testing to ensure all parts were functional.

Week 20 - 26 May​

Writing the software for the robot and testing

Hardware​

Hardware Diagram

Diagram

Completed Robot

Robot

Schematics​

KiCad Schematic

Kicad schematic

Bill of Materials​

DeviceUsagePrice
Raspberry Pi Pico WMicrocontroller35 RON
L298N Motor DriverMotor Driver9 RON
HC-SR04 Ultrasonic SensorDistance sensor7 RON
2x 9V BatteryPower Source5 RON

Software​

LibraryDescriptionUsage
embassyRust framework for embedded programmingUsed for writing correct, safe and asynchronous code, particularly targeted at embedded systems
L298NRust crate for L298NUsed for driving the motors
HC-SR04Rust crate for HC-SR04 distance sensorUsed for calculating the distance to the object in front

1. Inspiration video: Obstacle Avoider Youtube Video

2. Inspiration video: Obstacle Avoider Youtube Video 2

3. Ultrasonic sensor: Datasheet

4. L298N H-Bridge: Datasheet