Skip to main content
Version: ACS CC

Hand controlled Wi-Fi car

A car controlled based on hand gestures

info

Author: Popa Bogdan-Florin
GitHub Project Link: https://github.com/UPB-PMRust-Students/proiect-BogdanPopa123

Description

A device that acts as a UDP server and waits for another device to send commands to the first one. Based on the command, the car will move accordingly

  • The system utilizes a gyroscope to detect the inclination which orders the command

  • A motor controller to control the motors

  • The commands are sent via Wi-Fi

  • The gyroscope will send its params to the UDP server (the car) via Wi-Fi, and according to that it will action the motor controller

Motivation

This project represents the perfect opportunity for me to step into the embedded world, while also learning a new programming language, Rust, highly praised for its speed and safety.

I ve always been pasionate about techology. As a kid I always wondered about how toys are made, especially remote control cars. This project also helps me have a better understanding of computer networks.

Architecture

  • 2 x Raspberry Pi Pico 2W 2350 - the microcontrollers of the project, serving as the "brains" of the project

  • L298N motor driver - the units that commands the two motors

  • 2 x motor - does the moving

  • 2 x Wi-Fi chip - responsable for the communication between the two devices

Log

Week - May

Week - May

Week - May

Hardware

  1. Raspberry Pi Pico 2W:
  • Purpose: Controls all components.
  • Function: Acts as the main controller, controlling all other modules
  1. Motors:
  • Purpose: Helps the car move.
  • Function: Used to move the car.
  1. L298N motor controller:
  • Purpose: Controls the motors.
  • Function: Serves as the controller of the motors, dictating their speed and rotation
  1. MPU-6500:
  • Purpose: Gyroscope and accelerometer.
  • Function: Measures the acceleration and incline on all 3 axes.

Hardware Overview:

  • The Raspberry Pi Pico controls and coordinates all components.
  • The motors are used to move the car.
  • The MPU-6500 Measures the acceleration and incline on all 3 axes
  • The L298 Serves as the controller of the motors, dictating their speed and rotation

Schematics

diagram

Bill of Materials

DeviceUsagePrice
Rapspberry Pi Pico 2WThe microcontroller40 RON
L298Colour Sensor11 RON
MotorMotor DC15 RON
MPU-6500Gyroscope/accelerometer20 RON

Software

LibraryDescriptionUsage
embassy-rpRP2040 HALAccess to RP2040 hardware peripherals
embassy-netNetworking stackTCP/IP, UDP, DHCP, DNS over Ethernet/Wi-Fi
embassy-executorAsync executorRuns async tasks on embedded devices
embassy-syncAsync synchronizationPrimitives like mutexes, channels
embassy-timeTime utilitiesDelays, timeouts, timers
embassy-usbUSB stackUSB device support
embassy-usb-loggerUSB loggingLogging over USB via defmt
cyw43Wi-Fi chip driverDriver for CYW43 Wi-Fi chip
embedded-halHAL traitsCommon embedded interfaces (SPI, I2C)
embedded-hal-asyncAsync HAL traitsAsync SPI/I2C interfaces
  1. Hand gesture car