How to Build a Remote-Controlled Car with Telemetry Sensors

Building Remote-Controlled Cars / Visits:6

If you’ve ever dreamed of building a remote-controlled car that does more than just zoom around the living room, you’re in the right place. We’re not talking about a simple toy-grade RC car with a two-channel remote and a plastic chassis. We’re talking about a fully customizable, telemetry-equipped machine that streams real-time data—speed, temperature, battery voltage, and steering angle—back to your controller or laptop. And at the heart of this build, playing a surprisingly critical role, is the humble micro servo motor.

You might think servos are only for steering, and sure, that’s their most obvious job. But in a telemetry-enabled RC car, the micro servo motor becomes a multi-functional workhorse. It handles precise steering actuation, it can trigger sensor deployment mechanisms, it can even operate a small camera gimbal for FPV (first-person view) driving. The challenge—and the fun—lies in integrating these tiny, high-torque motors with a microcontroller, a radio link, and a suite of sensors that all need to talk to each other in real time.

In this guide, I’ll walk you through the entire process, from selecting the right micro servo for your build to wiring up telemetry sensors and writing the code that ties everything together. Whether you’re a hobbyist looking to level up your RC game or a student diving into embedded systems, this project will give you hands-on experience with servo control, sensor fusion, and wireless data transmission.

Why Micro Servo Motors Are the Unsung Heroes of Telemetry RC Cars

Let’s start by getting one thing straight: not all servos are created equal. When you’re building a telemetry car, you need a servo that can handle rapid, precise movements without introducing electrical noise that messes up your sensor readings. Standard analog servos are fine for basic steering, but they often suffer from jitter and power spikes that can corrupt voltage readings from your telemetry sensors.

Micro servo motors—specifically the 9g class (like the SG90 or MG90S)—have become the go-to choice for RC builders who want a balance of size, torque, and precision. Here’s why they shine in this application:

  • Low power draw: A typical micro servo draws around 100-200mA under load, which is critical when you’re powering everything from a single LiPo battery. Less current draw means less voltage sag, which means more accurate battery telemetry.
  • High resolution pulse width modulation: Most micro servos can respond to 1-2ms PWM signals with 1μs resolution, giving you about 1000 discrete positions over a 180-degree range. That’s plenty for steering, and it allows you to map servo angle to a telemetry value like “steering percentage” with high fidelity.
  • Metal gears for durability: If you’re building a car that might hit a curb or two, spring for a metal-gear micro servo like the MG90S. Plastic gears strip easily under the lateral forces of steering, and a stripped servo means no steering telemetry—and no control.

But here’s the real kicker: micro servos are incredibly easy to interface with microcontrollers. You can control them with a single PWM pin from an Arduino, ESP32, or Raspberry Pi Pico. And because they operate on 5V (with some accepting 4.8-6V), you can power them directly from the same 5V rail that feeds your microcontroller and sensors. No messy external motor controllers required.

The Core Components: What You’ll Need

Before we dive into wiring and code, let’s get the bill of materials straight. This build assumes you’re starting from scratch, but you can adapt it to any RC car platform you already have.

| Component | Purpose | Recommended Model | |---|---|---| | Micro servo motor | Steering actuation | MG90S (metal gear) | | Microcontroller | Brain of the car, reads sensors, sends telemetry | ESP32 (built-in WiFi/BLE) | | DC motor + ESC | Drive the wheels | 390 brushed motor + 30A ESC | | Radio receiver | Remote control input | FlySky FS-iA6B (PWM output) | | Telemetry sensors | Voltage, current, temperature, speed | INA219 (current/voltage), DS18B20 (temp), Hall effect sensor (speed) | | 2S LiPo battery | Power source | 7.4V 2200mAh | | 5V regulator | Step down battery voltage for servo and MCU | LM2596 buck converter | | Chassis | Platform for everything | 4WD RC car chassis (any brand) |

Notice the micro servo is listed first. That’s intentional. It’s the component that will demand the most attention in your code and wiring, because it needs to be synchronized with your telemetry sampling rate.

Wiring the Micro Servo for Telemetry Integration

Let’s talk wiring. The micro servo has three wires: brown (ground), red (power, 5V), and orange (signal, PWM). In a standard RC car, you’d plug the signal wire directly into the receiver’s steering channel. But in a telemetry build, we want the microcontroller to intercept that signal so it can both control the servo and read the steering angle back.

Here’s the smart way to do it:

  1. Power the servo from the 5V regulator, not directly from the microcontroller’s 5V pin. A servo can draw bursts of current that will brown out your MCU if you’re not careful. Use a separate 5V rail with a 470μF capacitor across the servo’s power pins to smooth out spikes.

  2. Connect the servo signal wire to a PWM-capable pin on your ESP32 (e.g., GPIO 18). This pin will generate the 50Hz PWM signal that controls the servo position.

  3. Connect the receiver’s steering channel to a different GPIO pin (e.g., GPIO 19) configured as an input with pulseIn(). This reads the PWM signal from your remote, which tells the microcontroller what angle the servo should be at.

  4. Add a voltage divider between the servo signal wire and the MCU input if you’re using a 5V servo with a 3.3V microcontroller (like the ESP32). A simple 10kΩ and 20kΩ resistor divider will drop 5V to about 3.3V.

This setup allows the microcontroller to read the remote’s steering command, compute the desired servo angle, and then output that angle to the servo. Meanwhile, it can also read the actual servo position by measuring the feedback potentiometer inside the servo (if you’re using an analog servo). Most micro servos don’t have a dedicated feedback wire, but you can infer the position from the PWM signal you’re sending—or better yet, add an external potentiometer to the steering linkage for absolute position telemetry.

Telemetry Sensors: What to Measure and How to Read Them

Now that the servo is wired up, let’s talk about the sensors that will give your RC car a digital brain. Telemetry isn’t just about showing numbers on a screen; it’s about making real-time decisions based on data. Here are the four key metrics you should measure, and how each one interacts with your micro servo.

Steering Angle Telemetry

This is the most direct servo-related metric. You want to know exactly where your front wheels are pointed, not just where your remote thinks they should be. To measure this, attach a 10kΩ linear potentiometer to the steering linkage. As the servo moves, the pot rotates, and you read the analog voltage with your microcontroller.

Wiring: Connect the pot’s outer pins to 3.3V and ground, and the wiper to an analog input on the ESP32 (e.g., GPIO 34). The voltage will range from 0 to 3.3V, corresponding to full left and full right steering.

Code snippet (Arduino-style):

cpp int steeringAngle = analogRead(34); // 0-4095 on ESP32 float anglePercent = map(steeringAngle, 0, 4095, -100, 100); // -100% to +100%

This value gets sent over your telemetry link every 50ms. If you notice the servo is not reaching the commanded position (e.g., due to mechanical binding or a dying servo), you can flag an alert in your telemetry dashboard.

Battery Voltage and Current

Your micro servo is directly affected by battery voltage. As the LiPo drains, the servo’s torque drops, and its response time increases. Measure voltage with an INA219 sensor, which also measures current draw. Place it in series with the battery’s positive lead.

The INA219 uses I2C, so connect SDA to GPIO 21 and SCL to GPIO 22 on the ESP32. The library is straightforward:

cpp

include <Adafruit_INA219.h>

Adafruit_INA219 ina219;

float shuntvoltage = ina219.getShuntVoltagemV(); float busvoltage = ina219.getBusVoltageV(); float currentmA = ina219.getCurrentmA();

If the bus voltage drops below 3.5V per cell (7.0V for a 2S pack), you’ll want to send a “low battery” warning. More importantly, if the current draw spikes above 2A, your servo might be stalling—another telemetry flag.

Motor Temperature

Overheating is the enemy of RC cars, and your micro servo is no exception. While the servo itself has a plastic housing that insulates heat, the motor inside can reach 60°C under sustained load. Use a DS18B20 temperature sensor attached to the servo’s metal gearbox with thermal tape.

The DS18B20 uses the OneWire protocol. Connect it to GPIO 4 with a 4.7kΩ pull-up resistor.

cpp

include <OneWire.h>

include <DallasTemperature.h>

OneWire oneWire(4); DallasTemperature sensors(&oneWire);

sensors.requestTemperatures(); float tempC = sensors.getTempCByIndex(0);

If the servo temperature exceeds 70°C, you can automatically reduce the steering throw or cut power to the servo to prevent damage. This is a great example of telemetry-driven control.

Wheel Speed (RPM)

Speed telemetry is fun, but it also helps you calibrate your servo. If you’re turning at high speed, you might need to reduce the servo throw to avoid flipping. Use a Hall effect sensor (like the A3144) mounted near a wheel with a small magnet attached to the axle. Each rotation triggers a pulse, and you count pulses per second.

cpp volatile int pulseCount = 0;

void IRAM_ATTR countPulse() { pulseCount++; }

void setup() { pinMode(2, INPUT_PULLUP); attachInterrupt(digitalPinToInterrupt(2), countPulse, RISING); }

Divide pulseCount by the number of magnets per wheel (usually 1) to get rotations per second, then multiply by wheel circumference to get speed.

Building the Telemetry Data Stream

With all sensors feeding data into the ESP32, you need a way to send that data back to your controller or a laptop. The easiest method is WiFi UDP or BLE (Bluetooth Low Energy). The ESP32 has both built in, so no extra hardware is needed.

For a remote control application, BLE is often better because it doesn’t require a WiFi network. You can pair your phone or a laptop to the car and receive telemetry in real time.

BLE setup (using the ESP32 BLE library):

cpp

include <BLEDevice.h>

include <BLEUtils.h>

include <BLEServer.h>

BLECharacteristic *pCharacteristic;

void setupBLE() { BLEDevice::init("RC-Car-Telemetry"); BLEServer *pServer = BLEDevice::createServer(); BLEService *pService = pServer->createService(SERVICE_UUID); pCharacteristic = pService->createCharacteristic( CHARACTERISTIC_UUID, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_NOTIFY ); pService->start(); BLEAdvertising *pAdvertising = pServer->getAdvertising(); pAdvertising->start(); }

Then, in your main loop, package all sensor data into a JSON string and send it:

cpp String telemetry = "{"; telemetry += "\"steering\":" + String(steeringPercent) + ","; telemetry += "\"voltage\":" + String(busVoltage) + ","; telemetry += "\"current\":" + String(current_mA) + ","; telemetry += "\"temp\":" + String(tempC) + ","; telemetry += "\"speed\":" + String(speedKph) + "}";

pCharacteristic->setValue(telemetry.c_str()); pCharacteristic->notify();

On the receiving end (your phone or laptop), you can use a BLE terminal app or write a simple Python script to parse and display the data.

Calibrating the Micro Servo for Precision Steering

Here’s where the micro servo motor really earns its keep. A raw servo out of the box might have a center point that’s slightly off, or a range that doesn’t match your car’s steering geometry. You need to calibrate it so that the telemetry data matches reality.

Step 1: Find the mechanical center

Disconnect the servo horn from the steering linkage. Send a 1500μs pulse to the servo (the theoretical center). Rotate the horn until the servo output shaft is at its mechanical center, then reattach the horn.

Step 2: Set the endpoints

With the car on a stand, send the minimum pulse (usually 1000μs) and maximum pulse (2000μs). Adjust the steering linkage so that the wheels don’t bind at either extreme. If they do, reduce the pulse range in software.

Step 3: Map the telemetry pot to servo angle

Now, rotate the steering pot through its full range and record the analog readings. Use these to create a lookup table in your code. For example:

cpp int potMin = 800; // measured at full left int potMax = 3200; // measured at full right int servoMin = 1000; int servoMax = 2000;

int potReading = analogRead(34); int servoPulse = map(potReading, potMin, potMax, servoMin, servoMax); servo.writeMicroseconds(servoPulse);

This ensures that when your telemetry says “steering at 50%,” the wheels are actually at 50% of their mechanical range.

Advanced Micro Servo Techniques: Closed-Loop Control

If you really want to push the envelope, implement a closed-loop PID controller for your servo. This uses the steering pot feedback to correct for any positional errors caused by friction or load.

The idea is simple: calculate the error between the desired position (from the remote) and the actual position (from the pot). Then adjust the servo PWM signal to minimize that error.

cpp float kp = 0.5; float ki = 0.1; float kd = 0.05; float integral = 0; float lastError = 0;

void loop() { int target = pulseIn(remotePin, HIGH); // from receiver int actual = analogRead(potPin); int error = target - actual;

integral += error; float derivative = error - lastError; int correction = (kp * error) + (ki * integral) + (kd * derivative); lastError = error;

int output = constrain(target + correction, 1000, 2000); servo.writeMicroseconds(output); }

This is especially useful if your micro servo is under heavy load (e.g., driving on rough terrain) and you want consistent steering response. The telemetry system will also show you the error term, which is a great diagnostic tool.

Putting It All Together: The Final Wiring Diagram

Here’s a simplified wiring summary for the entire system:

  • Battery (7.4V) → ESC (power for motor) → Motor
  • Battery (7.4V) → Buck converter (5V output) → 5V rail
  • 5V rail → ESP32 (VIN), micro servo (red), INA219 (VCC), DS18B20 (VDD)
  • ESP32 GPIO 18 → Servo signal (via voltage divider)
  • ESP32 GPIO 19 → Receiver steering channel (PWM input)
  • ESP32 GPIO 34 → Steering pot (analog input)
  • ESP32 GPIO 21 (SDA) → INA219 SDA
  • ESP32 GPIO 22 (SCL) → INA219 SCL
  • ESP32 GPIO 4 → DS18B20 data (with pull-up)
  • ESP32 GPIO 2 → Hall effect sensor (interrupt pin)

All grounds must be connected together: battery negative, ESC ground, buck converter ground, ESP32 GND, servo ground, and sensor grounds.

Testing Your Telemetry RC Car

Once everything is wired and the code is uploaded, it’s time for the first test. Start with the car on blocks so the wheels can spin freely.

  1. Power on the battery. You should see the ESP32’s blue LED blink (or whatever indicator you programmed). The servo should center itself.

  2. Open a BLE scanner on your phone. Look for “RC-Car-Telemetry” and connect.

  3. Move the steering stick on your remote. The servo should follow smoothly. On your phone, you should see the steering percentage change in real time.

  4. Spin the wheels by hand (or use the throttle). The speed telemetry should update. If you have a load on the motor, the current reading will spike.

  5. Check the temperature after a few minutes of running. If the servo gets hot, you might need to reduce the maximum steering angle or add a heatsink.

Troubleshooting Common Micro Servo Issues

Even with careful planning, things can go wrong. Here are the most common problems and their fixes:

Servo jittering or not moving smoothly

This is almost always a power issue. The servo is drawing too much current, causing the 5V rail to sag. Check your buck converter’s current rating (should be at least 3A). Add a 1000μF capacitor across the servo power pins.

Steering telemetry shows erratic values

The potentiometer might be noisy. Add a 100nF capacitor between the pot’s wiper and ground. Also, implement a simple moving average filter in software:

cpp int filteredValue = 0; const int numReadings = 10; int readings[numReadings]; int readIndex = 0; int total = 0;

void loop() { total = total - readings[readIndex]; readings[readIndex] = analogRead(34); total = total + readings[readIndex]; readIndex = (readIndex + 1) % numReadings; filteredValue = total / numReadings; }

Servo not reaching full range

Your remote’s endpoints might be set too low. Most hobby-grade transmitters allow you to adjust the servo travel (EPA) for each channel. Set them to 100% and then recalibrate your pot mapping.

Telemetry data is delayed

If you’re using BLE, the default notification interval might be too slow. In the ESP32 BLE library, you can set the connection parameters to request a faster interval:

cpp pServer->getAdvertising()->setMinInterval(10); // 10ms pServer->getAdvertising()->setMaxInterval(20); // 20ms

Expanding the System: What’s Next?

Once you have the basic telemetry car working, the possibilities are endless. Here are a few ideas that leverage the micro servo motor in creative ways:

  • Active aero: Add a second micro servo to control a rear spoiler. Based on speed telemetry, you can adjust the spoiler angle for downforce at high speeds and low drag at low speeds.
  • Sensor deployment: Mount a temperature or gas sensor on a micro servo arm. When you want to take a measurement, the servo swings the sensor out from a protected position.
  • FPV camera gimbal: Use two micro servos (pan and tilt) to stabilize a camera. The telemetry system can log the camera angle alongside the car’s steering and speed.
  • Autonomous driving: Add a GPS module and IMU. Use the micro servo to follow a pre-programmed path, with telemetry providing real-time feedback on path deviation.

Each of these expansions relies on the same fundamental principle: the micro servo motor gives you precise, repeatable mechanical motion that can be monitored and controlled through your telemetry system. It’s not just a motor; it’s a data point.

Final Wiring Check Before You Drive

Before you take your car outside for a real test, double-check these five things:

  1. Is the servo horn securely fastened? Use a tiny drop of thread locker on the screw. A loose horn means no steering and no steering telemetry.

  2. Is the buck converter set to exactly 5.0V? Measure it with a multimeter. Too high and you’ll fry the servo; too low and it won’t have enough torque.

  3. Are all I2C addresses unique? If you add more sensors, make sure they don’t conflict. The INA219 default address is 0x40, which is fine for a single sensor.

  4. Is the BLE connection stable? Walk around the car with your phone to test range. If the connection drops, you’ll lose telemetry but the car should still respond to the radio receiver (since that’s a separate link).

  5. Is the servo’s PWM frequency correct? Standard servos expect 50Hz (20ms period). If you accidentally set it to 100Hz, the servo will buzz and overheat.

Now you’re ready to hit the pavement. Your micro servo motor is calibrated, your telemetry sensors are streaming, and your code is handling all the data. Drive it hard, watch the numbers change, and use that information to improve your driving—or your next build.

Copyright Statement:

Author: Micro Servo Motor

Link: https://microservomotor.com/building-remote-controlled-cars/rc-car-telemetry-sensors.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!

Tags