Skip to main content
Version: FILS English

RC Car with physical controller

A remote controlled car designed to drive around for entertainment using a physical controller.

info

Author: Gheorghe Alin-Ioan

GitHub Project Link: https://github.com/UPB-PMRust-Students/project-blue-v27

Description​

This car is build using a Raspberry Pi Pico 2W, 2 motors with wheels, a L298N module, and two LEDs. The controller is build using a Raspberry Pi Pico 2W, a joystick and two buttons. The controller sends the input to the car via WIFI, thus dictating the movement of the car.

Motivation​

Growing up I've never had a remote controlled car and so I chose to build one for myself. I aim to make it the car in such a way that it is fun to drive around.

Architecture​

Schematic Diagram​

The diagram of the project:

Schematic

Raspberry Pi Pico 2W

  • Role: Controls every component. In the case of the car it controls the motors and the LEDs. In the case of the controller it reads the input from the buttons and the joystick.
  • Connections: GPIO for LEDs, motors, buttons and ADC joystick.

DC motors

  • Interface: GPIO
  • Role: Allow the car to go forward and backwards
  • Connections: conected to the L298N Module, left Motor: + -> out1, - -> out2; right Motor: + -> out3, - -> out4

L298N

  • Interface: GPIO
  • Role: controls the motors
  • Connections: Vcc -> powerSource, Gnd -> Gnd, 5V -> Vsys, in1 -> GP2, in2 -> GP3, in3 -> GP4, in4 -> GP5,

Servo motor

  • Interface: GPIO
  • Role: controls the steering of the car
  • Connections: Gnd -> Gnd, 5V -> powerSource, Pwm - GP14

LEDs

  • Interface: GPIO
  • Role: Indicate when the car is breaking.
  • Connections: GP12 and GP13, each having a 470Ohm resistor connected in series.

Joystick

  • Interface: ADC
  • Role: Controlls the steering of the car
  • Connections: yAxis -> GP27, VCC -> powerSource, GND -> Gnd.

Buttons

  • Interface: GPIO
  • Role: Controlls the acceleration and breaking of the car
  • Connections: GP16 AND GP17, each having a 10kOhm resistor in series

Log​

Week 5 - 11 May​

I started cutting the Acrylic plates and assembling the hardware part of the project.

Picture of the Acrylic plates

Picture of the sketch

picture of hardware current state

Week 12 - 18 May​

Completed the hardware of the project making all connections and the cable management. I have also added a ballcaster underneath the plate to support some of the weight pressing onto the small front wheels. For the controller I simply connected everything onto a custom made acrylic frame. I have also designed and cut a custom steering setup for the car.

picture of the car

picture of the controller

Week 19 - 25 May​

Completed the code for the car wich gets inputs, and acts acordingly, from the controller via UDP acces point.

Hardware​

I've used two Raspberry Pi Pico 2 W's, a L298N module connected to 2 Dc motors with wheels, 2 LEDs to indicate when you are breaking, a servo motor for steering, a joystick for controlling the steering and 2 buttons for going forward and backwards. The frames for both the car and the controlel, as well as the steering setup, are made out of acrylic.

picture of hardware current state

Schematics​

picture of schematic

Bill of Materials​

DeviceUsagePrice
2x Raspberry Pi Pico 2WThe microcontroller39.66 RON
L298N driver moduleDriver module10.99 RON
2x Dc MotorWheels2x 14.99 RON
2x WheelsSteering Wheels2 x 4.99 RON
Servo MotorServo Motor13.99 RON
JoystickJoystick6.92 RON
2x LEDsBreak lights2x 0.39 RON
2x 1k RezistorSeries Resistance for the break lights2x 0.10 RON
2 Round Cap Buttons Acceleration and breaking buttons2x 1.99 RON
40 15cm Male-Female wiresMale-Female Wires7.99 RON
40 15cm Male-Female WiresMale-Male Wires6.99 RON
40 30cm Male-Male WiresMale-Male Wires7.98 RON

Software​

LibraryDescriptionUsage
embassy-rpRP2040 peripheral accessInitializes and interacts with Pico W hardware peripherals
embassy-executorAsync runtimeRuns asynchronous tasks like motor control and input reading
embassy-timeTime utilitiesUsed for delays, scheduling, and task coordination
embassy-netNetworking stackManages TCP/IP over Wi-Fi; used for remote control
embassy-lab-utilsPico W Wi-Fi helpersSimplifies Wi-Fi and network stack setup
gpioGPIO moduleControls motor direction pins (L298N IN1–IN4)
pwmPWM moduleAdjusts the arm position of the servo motor
adcADC moduleReads analog joystick values for direction/speed input
defmtLogging frameworkFor debug messages via RTT/serial
panic-probePanic handlerHandles panics with minimal overhead
static_cellStatic memory allocationSafely manages statically allocated Embassy resources
cyw43WIFIHandles the wifi chip on the board
  1. Arduino Line Follower
  2. Steering Inspiration