PRO003 - RC car tweaking

Servo range optimization


During the first pandemic lockdown for COVID in Belgium (around March), I was placed on temporary unimployement and bought myself a 3D printer (Creality CR10-S pro). Since I wanted to have a specifict project to work on off the bat, and I was amazed by the performance of the Tarmo4 I decided to jump right in and go for it. The RC car has a bit of everything: Normal PLA printing, printed gears and printing with flexible materials.
I am not going into detail about my specific build of the Tarmo4, but if you have any questions or remarks, feel free to reach out.

Now that I have the car running, let's see if there are possible improvements. I am thinking of increasing the servo range, perhaps get better steering performance and acceleration. Then let's see if I can get some vehicle dynamics and automation on there.

Steering servo problem

Perhaps It is my old transmitter (bought about 10 years ago for a model airplaine), but I noticed that the servo used for the steering did not rotate a complete 90° as expected.
A Servo is actuated by a PWM pulse, so I connected the receiver to an ESP8266 and use the pulseIn() command to read the pulses. The results are shown in the following table:

- 90°+ 90°
Normal Servo1.0 ms1.5 ms2.0 ms
My Servo.992 ms1.505 ms1.945 ms

Which actually does not look too bad. Looking at these numbers only a 10% (around 9°) shortage in one direction and should actually increase movement in the other. But overwriting the control of the Servo with the ESP, the improved movement is a lot better. The figure below shows the difference in movement between original and the one controlled by the ESP:

Servo range control vs transmitter.
Fig.1 - Servo range from transmitter (top) vs. full range from ESP (bottom).

Below is the small snippit of code to recalculate the servo PWM signal to actuate across teh full range:

#include <Servo.h>       //Servo library 
Servo servo_test;        //initialize a servo object for the connected servo  
float SteeringAngle = 0; 
unsigned long ServoPulse = 0;   
int ServoPin_in = 14;
int ServoPin_out = 12;
int ServoRange[] = {992, 1505, 1945}; // measured servo signal range

void setup(){ 
servo_test.attach(ServoPin_out);      // attach the signal pin of servo to pin9 of arduino
void loop(){ 
ServoPulse = pulseIn(ServoPin_in,HIGH);
if (ServoPulse < ServoRange[1]){
    SteeringAngle = (ServoPulse-ServoRange[0])*(90.0/(ServoRange[1]-ServoRange[0]));
    SteeringAngle = 90+(ServoPulse-ServoRange[1])*(90.0/(ServoRange[2]-ServoRange[1]));

Translation to vehicle

It definitively looks like the range of the servo is extended, but does this also tranlate into bigger movement of the wheels for rotating the car? the steering linkage in the Tarmo4 is shown in the figure below:

Fig.2 - Steering servo connection to steering rod.

As you can see, the movement of the horizontal displacement is less for higher rotational movement of the servo. Looking at the actual movement of the wheels the range is indeed increased, but, as expected, less then what you would think looking at the increase in servo range. But I am still happy with the improvement.

Improved wheel movement.
Fig.3 - Wheel rotation, green: Original - red: improved.

This improvement proabably won't be possible for all RC vehicles but could be interesting to find out. I'll do the same to the PWM signal of the EM driving the vehicle and see if there are any improvements to be made there. Since the way of working is the same I will not elaborate on that here.

Project overview:

Increasing servo rangeNovember 14th 2020