Skip to main content
Version: FILS English

Parking Simulator

Small scale parking lot simulation

info

Author: Cristian Branet
GitHub Project Link: https://github.com/UPB-PMRust-Students/project-cristibtz

Description

The project consists of a small scale simulation of a parking lot, that has a barrier, motion sensor and a display.

It was built using three boards, each having a separate role.

  • Raspberry Pi Pico 2 W(main board)
  • 2 x Raspberry Pi Pico W(secondary boards)

Besides these boards, I have also used a servo motor, motion sensors, a display and WIFI connectivity for inter-boards communications.

The idea of this project is that tasks are delegated and each board does something useful: one board receives IR commands from a remote and sends them via WIFI to the main board which opens the parking lot barrier. After the car parks, motion sensors controlled by the main board detect the event and send the information, also via WIFI, to the other secondary board which will display the parking lot space status on a display. When a car leaves, the display reflects the parking lot space changes accordingly.

Having delegated tasks and the boards working in a detachable manner, it makes the process of handling one board's failure easier and the functionality of the whole assembly doesn't stop working 100%.

Motivation

I built this project with the idea of simulating something that is common in real life and creating a parking lot simulation was the idea that I was sure I can bring to life. I created it because it was very practical and by researching about this topic, learning how to design the project and how components are interconnected with each other at this scale, it helped me understand how more complex systems are created. Another reason is that I like the idea of multiple components actively communicating with each other, thus the use of three boards and WIFI

Architecture

Architecture

There are 3 important components in this project.

RP Pico 2 W:

  • Receives data from the IR sensor regarding the desired state of the barrier, either closed or opened.
  • Based on received data, it moves the servo motor.
  • Receives data from one or more motion sensors, if a parking space is occupied.
  • Sends motion sensor's data to the board controlling the display.
  • Modifies LEDs based on the barrier's and sensor's state.

RP Pico W no. 1:

  • Receives IR signals from the remote.
  • Processes the signal and sends command corresponding to the signal to the main Pico 2.

RP Pico W no. 2:

  • Receives data from the main board.
  • Updates displayed details based on received data.

LEDs:

  • Controlled by the main board.
  • They are turned on or off based on the state of the components associated with them(ex: opened barrier - light green LED or sensor that detected motion - light red LED)

Display:

  • Displays data about the state of the parking lot, more exactly when a place is freed or how many spaces are available.

IR remote and receiver:

  • Classic IR remote which sends IR signals.
  • The IR sensor receives the signals and sends them to the IR receiving board via wire.
info

All the boards communicate with between them using WIFI. Each one connects to a designated network via WIFI. The boards have a TCP server setup on them to listen for incoming connections. In this way, if a certain part stops working as it should, necessary data can be sent manually to keep the functionality working(ex: barrier can be opened by sending the proper code to the main board without IR). All other components are wired between each other and programmed to communicate accordingly in the software part.

Log

Week 5 - 11 May

Uploaded a part of the documentation for the project. Started working on each individual component's functionality and very soon planning to integrate them together. Also, still testing some functionalities, like infrared and display related stuff.

Week 12 - 18 May

Week 19 - 25 May

Hardware

Detail in a few words the hardware used.

Schematics

Kicad

Bill of Materials

DeviceUsagePrice
2 x Raspberry Pi Pico WHThe secondary boards2 x 56 RON
Raspberry Pi Pico 2 WThe main board40 RON
Infrared Sensor VS1838BReceive IR signals1.77 RON
Infrared RemoteSend IR signals10 RON
SG90 Servo MotorUsed to move the barrier12 RON
Display SSD1306Display parking space info34 RON
Motion Sensor PIR HC SR505Detects a parked car10 RON
LEDsUsed to signal certain events0.30 RON
ResistancesFundamental in every circuit0.10 RON

Software

LibraryDescriptionUsage
cyw43Rust driver for the CYW43439 wifi+bluetooth chipUsed for WIFI communications between the boards
embassy-rpAccess to the boards' peripheralsUsed for various interactions between components and actions
defmtLogging frameworkLogged certain events and actions to the console for debugging
fixedProvides fixed-point numbersUsed when configuring PWM
  1. First time trying sensors on RP