RC Car Daughter Board

_images/RC_inst_1.webp

Description

Have you ever wanted a remote control phone that looks vaguely like a tractor? Or maybe your screen addiction has gotten so bad a single colorful glowing rectangle just isn't enough of a dopamine hit any more? Well, you're in luck because this RC car daughterboard ticks those boxes and so many more.

To drive the car, you'll need a second WiPhone since one acts as a controller (or make your own controller using anything that can send UDP packets). The controller phone runs an app that sends commands to the car phone. On the RC car side the daughterboard uses a DRV8833 dual H bridge and some micro gearmotors with matching wheels to drive around.

Features

  • Dual H-bridge motor driver with current regulation.
  • Low power consumption: Designed for battery-powered applications.
  • Powered from WiPhone Battery.
  • W420 Steel Ball Castor front Wheel.
  • N20 3V 300 RPM ALL Metal Gear Micro DC Motor.

Technical Details

_images/RC-Car_Pinout_v1.0.png
DB pin# Pin Name Arduino Pin Description
12 VBAT   Supply voltage for Motors.
2, 11,13 GND   This pin is connected to System GND.
3 Fault Status 38 Logic low when in fault condition (overtemperature, overcurrent).
4 Sleep mode Select 32 Logic high to enable device, logic low to enter low-power sleep mode and reset all internal logic. Internal pulldown.
7 AIN1 12 Bridge A input 1. Logic input controls state of AOUT1. Internal pulldown.
8 AIN2 13 Bridge A input 2. Logic input controls state of AOUT2. Internal pulldown.
9 BIN1 27 Bridge B input 1. Logic input controls state of BOUT1. Internal pulldown.
10 BIN2 14 Bridge B input 2. Logic input controls state of BOUT2. Internal pulldown.

Hardware Overview

_images/RCCarBotLegened.png

Texas Instruments DRV8833

_images/pwp0016c.png

The DRV8833 is a powerful and efficient motor driver IC designed for controlling two small to medium-sized DC brushed motors. It offers precise current control, thermal protection, and operates over a wide voltage range, making it ideal for both hobbyist and professional applications. Perfect for projects requiring bidirectional motor control, such as RC cars, drones, and automated systems, the DRV8833 ensures reliable performance with its durable design.

N20 Micro Gear Motor

_images/N20-3V-300-Rpm-Micro-Metal-Gear-Motor.png

The N20 is a compact and powerful DC motor with a metal gearbox, perfect for RC cars, robotics, and DIY projects. It delivers high torque, features durable gears, and operates over a wide voltage range."

_images/GearMotorWithRubberWheel.png

The N20 Micro Gear Motor, combined with a rubber tire and D-shaft bracket, is an excellent choice for powering small-scale mobile robots or vehicles.

RC Car Daughter Board Operation

  1. Load WiPhone with the “Motor Driver” firmware.
  2. Install the RC Car daughter board on the back of the WiPhone.
  3. On WiPhone, navigate to Tools -> Development -> Motor Driver.
_images/MotorDriverApp.png
  1. On Motor Driver App, you will see the IP address and port to send the UDP message to drive the RC Car.
_images/SendUDPMessage.png
  1. To send the UDP message to the RC car, we can either use the UDP sender app on another WiPhone or use computer software like Packet Sender (downloadable from the resources section).
_images/UDPSender_Forward.png _images/UDPSender.png

Note

Both the WiPhone with the RC Car daughter board and the device with the UDP Sender App need to be connected to the same WiFi network to send commands to the RC Car daughter board.

  1. The code that controls the movement and direction of the RC car is provided below. We will send UDP messages based on this code to control the RC car.
moving = buff[0]=='f' || buff[0]=='r' || buff[1]=='f' || buff[1]=='r';
if (moving) {
  started = millis();
  if (buff[0]=='f' && buff[1]=='f') {
        newDir = FORWARD;
  } else if (buff[0]=='r' && buff[1]=='r') {
        newDir = REVERSE;
  } else if (buff[0]=='f' || buff[1]=='r') {
        newDir = RIGHT;
  } else if (buff[0]=='r' || buff[1]=='f') {
        newDir = LEFT;
  }
} else {
  newDir = STOP;
}
  1. So, we can send the following commands from the UDP sender to control the RC car. The RC Car WiPhone will display arrows indicating the direction corresponding to the commands sent from the UDP sender:
  • ff moves the car forward.
_images/UDPSender_Forward.png _images/Forward.png
  • rr moves the car in reverse.
_images/UDPSender_Reverse.png _images/Reverse.png
  • fr turns the car right.
_images/UDPSender_Right.png _images/Right.png
  • rf turns the car left.
_images/UDPSender_Left.png _images/Left.png