Smallest, cheap ON-OFF switch for RC cars using a servo

A few months ago, my friend Erwan showed me his recently acquired RC car which was very powerful and quite fun. That was enough to convince me and my other friend Benoit to buy one each :

They are so fast and powerful that you definitely need some large places to play with them. We tried them on a parking on a late afternoon but night started to fall and I found that some light was missing. Given that there's an unused 3rd channel with a dedicated on/off button on the transmitter, that made me think that an obvious mod was going to happen in the form of LEDs.

The receiver has 4 channel outputs for servos. Only the first two ones are used, so I needed to connect a device accepting servo commands. I quickly checked on the net for RC ON/OFF switches replacing a servo but found very few which were quite expensive and large for what they are (around $8 minimum). In fact, you can find some small entry-level servos for less than $1. I thought "after all a servo will make it fine".

A servo contains 3 parts :
  - a motor
  - a potentiometer attached to the motor
  - the signal decoder, moving the motor in the same direction as the signal so that the potentiometer matches the signal length.

The signal decoder can drive a motor so it can deliver at least around 1 amp under 5V, which is perfect.

The signal is a 500-2500 microsecond pulse every 20 ms. I checked with my oscilloscope, and the OFF pulse is around 1300 microseconds, and the ON pulse is around 1700 microsecond large. Given that the center for servos is 1500 microseconds, I just need to detect the position around the center. That could be dealt with using a microcontroller but the servo approach looked cheaper and simpler. Thus I ordered a few of these servos and disassembled them. It's quite easy, there are only 4 screws. The servo looks huge here but all the photos were taken in macro. The servo is only 23 mm wide :
The PCB is extremely small (7x11 mm). Fortunately both the potentiometer and the mtor are soldered using wires, meaning their removal is trivial. It seems like the manufacturer thought about my use case, because the potentiometer pads are exactly aligned and spaced like common SMD resistors, and the motor pads are large and 2.54mm spaced, perfect to place a jumper header. Any pair of 1-10k resistor will fit, as we only want to pretend the potentiometer is at the center so that the controller sends the current either in one polarity or the other.

Just put that into some heat shrink tube :

And the circuit is complete! It's so small that it will easily fit on top of the receiver in the closed box in the car. A quick test shows that it works perfectly, it outputs either +5V or -5V depending on the selector position.

For the next step, I drilled a plastic tab of the appropriate width, I attached 4 white leds in parallel, each with their dedicated 150 ohm resistor, and screwed this at the front of the car. A 2-pin 2.54mm connector and a pair of wired was soldered to the leds, and plugged to the circuit :

That's only $1 and one hour of work in total to put front lights on this car. More importantly there was only 5 minutes of work on the signal decoder so it's really not worth buying a more expensive and larger board.