Skip to content

Smart car that can avoid obstacles using two ultrasonic sensors, based on a Raspberry Pi Pico. The robot detects the distance to objects in its path and adjusts its movement to avoid collisions.

License

Notifications You must be signed in to change notification settings

marcoseverini/pico-obstacle-avoiding-car

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Obstacle Avoiding Robot with Raspberry Pi Pico

This project showcases a simple robot that can avoid obstacles using two ultrasonic sensors, based on a Raspberry Pi Pico. The robot detects the distance to objects in its path and adjusts its movement to avoid collisions. The project includes the code, circuit diagram, and 3D model created in Tinkercad.

Features

  • Autonomous Movement: The robot moves forward and avoids obstacles automatically.
  • Obstacle Detection: It uses two ultrasonic sensors to detect obstacles and measure distances.
  • Decision Making: Based on the distance readings, the robot decides whether to stop and change direction.

Components

  • Raspberry Pi Pico
  • 2x Ultrasonic Sensors HC-SR04
  • 2x DC Motors (Left and Right wheels)
  • Motor Driver L298N
  • Power Supply (Battery)
  • Chassis
  • Jumper Wires
  • Breadboard

Power to the pico will come from 2 different sources:

1. The USB connection (5V)
2. The 5V power output from the motor driver board

I decided to use a powerbank for the USB connection.

Circuit Diagram

3D Model

You can access the 3D model made with Tinkercad here.

Image 1 Image 2 Image 3

Code

The MicroPython code is in the main.py file

Demonstration Video

Project Animation

About

Smart car that can avoid obstacles using two ultrasonic sensors, based on a Raspberry Pi Pico. The robot detects the distance to objects in its path and adjusts its movement to avoid collisions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages