Raspberry Pi Pico RC Vehicle

by KushagraK7 in Circuits > Raspberry Pi

5895 Views, 22 Favorites, 0 Comments

Raspberry Pi Pico RC Vehicle

Cover Image.jpg
Raspberry Pi Pico RC Vehicle

A while back, DFRobot sent over their Black Gladiator kit. I also had an RC controller that I bought for a competition laying around, so I thought of making this quick project. I would like to thank The Bored Robot for his video for helping me make this project.

Supplies

For this project, you will need:

  • A Raspberry Pi Pico(Almost any microcontroller can be used here, but the Pico offers great features and comes cheaper than Arduino boards, so I will recommend you to go with a Pico)
  • An L298N motor driver module(Use this or any other driver that can deliver at least 2A on each channel)
  • A 2-channel RC transmitter and receiver(I used the FlySky FS GT2 remote and the receiver came with it)
  • A tank or a 4X4 wheeled chassis(This is the one I used)
  • A 12v battery
  • Wires for making all the connections
  • 2 2kΩ resistors(You can connect two 1kΩ resistors in series if 2kΩ resistors are not available.)
  • 2 1kΩ resistors
  • Breakout board for Raspberry Pi Pico(Optional, takes more space but makes wiring easier.)

Program the Pico

20210428_185034_.jpg

Download the code and open it in the Arduino IDE. If you want to learn how to program the Pico using the Arduino IDE, you can check this Instructable out.

Solder Wires to the Motors

Solder long enough wires to the motors so that they can easily reach the motor driver to be installed on top of the chassis. Put hot glue on the motor's terminals to firmly secure the wires on them.

Get the Vehicle Chassis Ready

Complete all the mechanical assembly of the chassis, if required, and keep it ready.

Install the Battery

Study the Circuit Schematic

Raspberry Pi Pico RC Receiver Circuit.png

Make the Wiring Connections

Following the circuit schematic, connect everything. You may install the motor driver and Pico on the chassis before or after doing the wiring. After completing the wiring, double-check all the wiring to make sure they are done right.

Bind the Receiver With the Remote

You can skip this step if the transmitter and receiver are already bound.

If you are using the RC transmitter and receiver for the first time, you will need to bind them so that the receiver can receive the signals from the remote. Disconnect the channel 1 and 2 signals wires connecting the RC receiver to the Pico and keep the VCC and GND wires connected. I will highly recommend you consult the transmitter and receiver's manual, but generally, the binding process is done like this:

  1. Put the binding plug in the row labeled 'BIND'. The plug connects the digital pin to GND.
  2. Power on the receiver and the LED on it should start blinking.
  3. Press and hold the bind button on the remote and power it on. You might need a pen to reach the button.
  4. Check if the LED on the receiver has stopped blinking, if not, power off the remote and repeat step 3.
  5. Power off the receiver and then the remote.

Check the Motor Wiring

Place the vehicle on a raised surface such that the wheels/tracks don't make contact with the ground to prevent the vehicle from moving from its place. Open the cover of the remote and set the throttle and steering trim knobs to 0. Now power on the remote and then the vehicle. Always power on the remote first and then the vehicle.

Now, press the throttle to make the vehicle move in the forward direction, if the motors are moving in opposite directions, invert the connection of the motor that is moving backward. If both the motors are moving in the same direction but backward, invert the connections of both of them.

If the motors are working properly in the forward direction, they should work fine for reversing as well.

Understand the Controls

Here is how the controls work:

  • The throttle controls the speed and direction of the vehicle, you can use it to move forward/backward at a desired speed, the farther the throttle is from the center, the faster the vehicle will go in that direction.
  • The steering controls the speed of the motors in two ways:
  • When the vehicle is stationary(Throttle in the 0 position), the steering will make the vehicle rotate in its place by making the left and right motors run in the opposite direction. The extent of the steering wheel(Distance from the center point) will control the speed at which the motors will run to make the vehicle rotate faster or slower.
  • When the vehicle is moving, the steering will make the motor of the side to which the vehicle will turn slower. Here, the extent of the steering will control the turning radius of the vehicle. The farther the steering wheel is from the center, the tighter the turn will be taken by the vehicle.


Get the Vehicle Running!

Raspberry Pi Pico RC Vehicle

After you are done with the testing, you can put the vehicle on the ground and set it free.