How to Build a Remote-Controlled Car with a Proportional Control System

Building Remote-Controlled Cars / Visits:12

Forget the clunky, all-or-nothing steering of toy store RC cars. The true magic of hobbyist robotics lies in precision and control—the kind that makes a vehicle feel like an extension of your will. Today, we’re diving deep into building a remote-controlled car that doesn’t just turn left or right, but gracefully arcs with the exact radius you command. The secret weapon? The humble, yet extraordinarily capable, micro servo motor. This isn't just a build guide; it's a journey into the heart of proportional control systems.

Why the Micro Servo is the Unsung Hero of Precision RC

Before we turn a single screw, let's understand our star component. A micro servo motor is a compact, integrated package containing a small DC motor, a gear train, a potentiometer, and control circuitry. Unlike a standard motor that simply spins, a servo is a closed-loop system. You send it a Pulse Width Modulation (PWM) signal—a specific pulse length between 1ms and 2ms—and its internal controller works tirelessly to move and hold its output shaft at the corresponding angular position, typically across a 180-degree range.

For our RC car, this is revolutionary. It means we can map the position of our transmitter's steering stick directly to the angle of the front wheels. Push the stick a little, the wheels turn a little. Hold it fully left, they turn to full lock. This is proportional control: the output is directly proportional to the input. The result? Smooth, intuitive, and race-worthy handling that binary, on-off steering can never match.

Key Advantages of Using a Micro Servo for Steering:

  • Precision & Repeatability: It accurately holds any set angle.
  • Compact Size & Lightweight: Perfect for small-scale chassis without sacrificing performance.
  • High Torque for Its Size: The gear reduction provides surprising force to turn the wheels.
  • Simplicity: It abstracts away complex motor control, needing just one signal wire from your microcontroller.

The Blueprint: Components and System Architecture

Building a proportionally controlled RC car is a symphony of interconnected systems. Here’s what you’ll need to gather.

Part 1: Chassis and Drivetrain

  • Chassis Kit: A simple 2WD (two-wheel drive) acrylic or aluminum chassis kit. Ensure it has a front axle that can be adapted for servo steering.
  • Drive Motors: Two standard DC geared motors for the rear wheels.
  • Wheels and Tires: Matching set for rear drive and front steering.
  • Micro Servo Motor (9g type): The cornerstone of our project. A classic SG90 or MG90S is ideal.
  • Servo Mounting Bracket & Horns: To attach the servo to the chassis and to the steering linkage.

Part 2: The Brain and Nervous System

  • Microcontroller (MCU): An Arduino Nano or ESP32 is perfect. It will interpret radio signals and generate precise PWM for the servo.
  • Motor Driver: An L298N or TB6612FNG dual H-bridge module to control speed and direction of the two DC drive motors.
  • Power: Two separate power sources are highly recommended:
    • A 5V voltage regulator or dedicated BEC (Battery Eliminator Circuit) for the MCU and servo.
    • A 7.2V NiMH or 2S LiPo battery (7.4V) for the drive motors. This prevents servo operation from causing voltage dips that reset your microcontroller.

Part 3: Communication and Control

  • RC Transmitter & Receiver: A 2-channel hobby-grade transmitter/receiver pair. Channel 1 will be steering (servo), Channel 2 for throttle (drive motors).
  • Jumper Wires & Connectors: For making clean connections.
  • Basic Tools: Screwdrivers, wire strippers, soldering iron, and double-sided tape or zip ties.

The Build: Mechanical Integration and Wiring

Step 1: Assembling the Rolling Chassis

Start by building your chassis kit according to its instructions for the rear drivetrain. Attach the DC motors and wheels. Leave the front axle assembly for later.

Mounting the Micro Servo

This is a critical step. The servo must be securely fastened to prevent flex, which destroys steering accuracy. 1. Use the provided screws to attach the servo to its mounting bracket. 2. Securely fix this bracket to the front of the chassis, centered left-to-right. The servo shaft should be aligned with the intended pivot point of your front axle. 3. Attach a servo horn (usually a short, double-sided arm) to the servo’s output shaft. The horn's outer holes will connect to your steering linkage.

Creating the Steering Linkage

This mechanism translates the servo horn's rotary motion into the turning of the front wheels. 1. Install the front axle, ensuring it pivots freely on its kingpins. 2. Using thin piano wire or rigid rod, create tie rods that connect from the holes in the servo horn to attachment points on the front wheel mounts. 3. The goal is a solid, slop-free connection. Use small z-bends or ball joints if available. This is an iterative process—you may need to adjust the horn's position at "center" to get the wheels straight.

Step 2: Electrical Heart Transplant

Now, we bring the machine to life with electricity and logic.

The Control Wiring Loom

  1. Power the MCU: Connect your 5V regulated supply to the Vin and GND pins of the Arduino.
  2. Connect the Receiver: Bind your RX to your TX first. Then, connect its channels:
    • Channel 1 (Steering) -> Digital Pin 9 on Arduino (a PWM-capable pin).
    • Channel 2 (Throttle) -> Digital Pin 10.
    • Receiver V+ and GND -> Arduino 5V and GND.
  3. Command the Servo: Connect the servo's 3-pin connector:
    • Signal (usually yellow/orange) -> Digital Pin 9 (shared with RX Ch1 signal wire).
    • VCC (red) -> Your dedicated 5V power rail (NOT Arduino 5V pin).
    • GND (brown/black) -> Common ground with Arduino and your 5V supply.
  4. Drive the Motors: Connect the motor driver:
    • Driver logic power (VCC, GND) -> Arduino 5V and GND.
    • Driver motor power -> Your 7.4V motor battery.
    • Motor A outputs -> Your two DC drive motors.
    • Driver control pins (IN1, IN2, IN3, IN4) -> Arduino digital pins (e.g., 5, 6, 7, 8).

The Code: Programming Proportional Intelligence

The software is where proportional control is realized. The Arduino reads the PWM pulses from the receiver and maps them to outputs for the servo and motor driver.

Decoding the Receiver's Signals

Hobby RC receivers output a PWM signal, but it's not the standard Arduino analogWrite() type. It's a pulse between 1000µs and 2000µs, repeated every ~20ms. We must use pulseIn() to measure it.

cpp

include <Servo.h>

Servo steeringServo; // Create servo object to control it

// Pin Definitions const int STEERINGCHPIN = 9; const int THROTTLECHPIN = 10; const int MOTORIN1 = 5; const int MOTORIN2 = 6;

// Variables for pulse measurement int steeringPulseWidth, throttlePulseWidth; int servoAngle; int motorSpeed;

void setup() { steeringServo.attach(STEERINGCHPIN); // Attach servo to pin 9 pinMode(THROTTLECHPIN, INPUT); pinMode(MOTORIN1, OUTPUT); pinMode(MOTORIN2, OUTPUT);

// Initialize motor to stop digitalWrite(MOTORIN1, LOW); digitalWrite(MOTORIN2, LOW); }

void loop() { // 1. READ PROPORTIONAL INPUTS steeringPulseWidth = pulseIn(STEERINGCHPIN, HIGH, 25000); // Timeout after 25ms throttlePulseWidth = pulseIn(THROTTLECHPIN, HIGH, 25000);

// 2. MAP STEERING PULSE TO SERVO ANGLE (Proportional Control) // Receiver pulse ~1000us (Left) to ~2000us (Right) -> Servo angle 0 to 180 // Add deadband and constrain for safety steeringPulseWidth = constrain(steeringPulseWidth, 1100, 1900); servoAngle = map(steeringPulseWidth, 1100, 1900, 0, 180); steeringServo.write(servoAngle); // Command the servo to the precise angle

// 3. MAP THROTTLE PULSE TO MOTOR SPEED & DIRECTION throttlePulseWidth = constrain(throttlePulseWidth, 1100, 1900); if (throttlePulseWidth > 1500) { // Forward motorSpeed = map(throttlePulseWidth, 1500, 1900, 0, 255); analogWrite(MOTORIN1, motorSpeed); digitalWrite(MOTORIN2, LOW); } else if (throttlePulseWidth < 1500) { // Reverse motorSpeed = map(throttlePulseWidth, 1500, 1100, 0, 255); digitalWrite(MOTORIN1, LOW); analogWrite(MOTORIN2, motorSpeed); } else { // Neutral digitalWrite(MOTORIN1, LOW); digitalWrite(MOTORIN2, LOW); }

delay(15); // A short delay for stability }

Calibration and Fine-Tuning

Upload the code. Power everything up. Now, the fine-tuning begins: 1. Center Your Servo: With the transmitter trim centered, your car's wheels should be straight. If not, adjust the map() function values or physically recenter the servo horn. 2. Adjust Endpoints: Turn your steering wheel fully left and right. Ensure the wheels don't bind or over-stress the servo. Use the constrain() function to limit the servo's travel range. 3. Test Throttle: Ensure the car moves forward and backward smoothly from neutral.


Leveling Up: Advanced Micro Servo Techniques

Once the basics work, the world of optimization opens up.

Implementing Exponential Steering

For more control at center stick (helpful for high-speed stability), use a non-linear map. A small stick movement gives less servo response, while full stick gives full response.

cpp // Simple exponential factor (e.g., 0.5 for softer center) float expoFactor = 0.5; int centeredPulse = steeringPulseWidth - 1500; centeredPulse = expoFactor * pow(centeredPulse, 3) / 1000000 + (1 - expoFactor) * centeredPulse; servoAngle = map(centeredPulse + 1500, 1100, 1900, 0, 180);

Reducing Servo Jitter and Improving Performance

Micro servos can sometimes jitter due to signal noise or mechanical load. * Add Capacitors: Solder a 100µF electrolytic capacitor across the servo's power and ground pins near the servo to smooth voltage spikes. * Upgrade the Power Supply: Ensure your 5V rail can deliver at least 2A peak. * Software Filtering: Implement a moving average filter on the pulseIn() readings to smooth out noise.

The Road Ahead: From Prototype to Polished Machine

Your functional prototype is just the start. Consider: * Designing a 3D-printed chassis and servo mount for perfect integration. * Adding an IMU (Inertial Measurement Unit) to explore autonomous stability control. * Implementing a PID controller that uses the servo to keep the car driving a straight line automatically. * Upgrading to a continuous rotation servo for a proportional drivetrain, or using a second servo for proportional throttle control on a single, powerful brushless motor.

The micro servo motor is your gateway. By mastering its integration into a proportional control system, you've learned the fundamental language of robotics: precise, intentional, and responsive interaction between the digital and physical worlds. Now, take it for a spin, listen to the whir of the gears as it tracks your every command, and start planning your next, even more ambitious, build.

Copyright Statement:

Author: Micro Servo Motor

Link: https://microservomotor.com/building-remote-controlled-cars/rc-car-proportional-control.htm

Source: Micro Servo Motor

The copyright of this article belongs to the author. Reproduction is not allowed without permission.

About Us

Lucas Bennett avatar
Lucas Bennett
Welcome to my blog!

Archive

Tags