Autonomous Parking Car
A simple autonomous parking prototype using Raspberry Pi Pico 2W, Rust and Embassy.
Author: Ghita Alexandru-Catalin
GitHub Project Link: https://github.com/UPB-PMRust-Students/project-GhitaAlexandruCatalin
Description
This project builds a small autonomous parking car, using Raspberry Pi Pico 2W programmed in Rust with Embassy. The car uses three ultrasonic sensors to detect a parking space and automatically perform a parking maneuver using tank steering. A simple web interface on the Pico 2W shows the parking status and allows the user to confirm the parking if needed.
Motivation
I chose this project because I wanted to understand how automated parking systems work, like the one in my Renault 2024. I noticed the real system sometimes struggles, so I decided to create a basic prototype to see how parking detection and control could be implemented with simple sensors and motors. I also wanted to practice using Rust in embedded systems.
Architecture
The system is made up of a Raspberry Pi Pico 2W that runs all the logic. It reads data from three ultrasonic sensors:
one at the front-center (to detect obstacles ahead),
one at the right-front (to detect the start of a parking space),
one at the right-rear (to detect the end of the parking space).
The Pico 2W also controls the two motors (using tank steering) through a TB6612FNG driver. It hosts a simple web interface that shows if a parking space was found and allows the user to press a button to start parking.
When a space is detected, the car either starts parking automatically or waits for confirmation through the web interface. The parking maneuver is done by reversing with tank steering.
Log
Week 5 - 11 May
Week 12 - 18 May
Week 19 - 25 May
Hardware
The car is built on a 2-wheel drive chassis from a robot kit. It uses two DC motors controlled by a TB6612FNG motor driver. Three ultrasonic sensors (2x HC-SR04 and 1x HC-SR04+) are used to detect obstacles and parking space. A Raspberry Pi Pico 2W runs the control program. Power is provided by 4x AA batteries in a holder with a switch.
Schematics
This is the kicad schematic.
Bill of Materials
Device | Usage | Price |
---|---|---|
Raspberry Pi Pico 2W | The microcontroller | 39 RON |
Raspberry Pi Pico Debug probe | Pico Debug Probe | 66 RON |
TB6612FNG Motor Driver | Controls the 2 DC motors | 25 RON |
2 DC Motors + 3 wheels chassis + 4 AA battery holder + battery switch | The motors that power the car | 50 RON |
Breadboard+Wires+Resistors+Power supply | Used to connect the devices together | ~25 RON (included in a kit) |
2x HC-SR04 Distance sensors | Used to measure the distance from the car to the wall | 6 RON |
HC-SR04+ Distance sensor | Used to measure the distance from the car to the wall | 15 RON |
Holding brackets for the distance sensors | Used to keep the sensors in a good position for the parking manoeuvre | 2RON |
Software
Library | Description | Usage |
---|---|---|