Skip to main content

RC Servo Throttle Modifier using a Raspberry Pi Pico

· 5 min read

Recently my father-in-law gave my son a Tamiya 1/10 Hornet 2WD RC car. To say my son was excited is an understatement, as my 2yr old felt the car was his new best friend from popa. While I have questions around how much of the gift was a present for my son and how much of it was some entertainment for him during their 6-week trip to Sydney recently, It’s been pretty fun to play with.

Tamiya 1/10 Hornet 2WD RC car

The only challenge is that the 1984 design specifically calls for heavy NI-CAD batteries. It being 2022 with all the fancy Li-ion battery love you can get your hands on means a much smaller, lighter and importantly powerful batteries can be installed into the car for those brave enough to solder some connections and unwilling to pay more for obsolete technology.

My son, who’s now three enjoys driving Zippy (a name had to come at some point) straight into walls at the 20-30Km/h top speed of the car. This becomes expensive fast. While spare components are available for very reasonable prices I’d rather spend my weekends doing something other than fixing Zippy. I had the idea that the servo signal should be easy enough to modify in real time with a microcontroller if the signal was intercepted before it got to the motor ESC (Electronic Speed Control).

How hard can it be?

How hard can it be?

The first version of the speed controller I constructed for Zippy actually still works great. As with any first version it suffers from prototype problems.

  • A rushed hardware design because you actually know the challenge is software
  • Incorrectly sized bread board
  • Made from a discarded arduino that are now unreasonably expensive on AliExpress
  • 7/10 jank score

Prototype controller

The first controller

While this version will forever live in my heart and likely Zippy’s internals. My Father-In-Law was quick to put in a request for one of these speed controllers. A model collector himself, he has several remote controlled models that he would like to limit the maximum throttle of. Mostly the steam tug boat; after a number of fire outs in the steam engine exactly in the middle of a pond, it has had it’s steam insides replaced with electronics. While the reliability is top-notch, I’m told a steam tug boat sending it across the pond in the park looks out of place.

What I imagine my father in law talking about

What I imagine my father-in-law talking about

The good version

For the next version I thought using a microcontroller from this decade could be a good idea. The Raspberry Pi Pico came to mind instantly as something that could hold a chance of being available for the foreseeable future. It’d also give me a chance of checking out how Micropython is coming along as I’ve never really had a good use for it yet.

Now is it really a second revision without some feature creep (I’m looking at you Second-system effect)? Some comments on the challenges around the first designs software.

  1. Assumed min/max servo value points. This creates a lot of problems when trying to match the controller to the device
  2. It’s impossible to re-set the neutral point of the throttle during use. If I’m honest the assumption I made in the original software that the throttle would be at neutral has caused the car to run off into the distance a few times
  3. It’s very hard to understand what value the pot is set at when you’re in the park

With all of this in mind I proceeded to lean in to the feature creep and design the updated version.

  1. Calibration system to set min, max and centre points of the RC Remote. In the field this would drastically simplify any controller issues in the park. This would also fix #1
  2. Using a 7-segment display as an interface. This would guide a user through the calibration process and show the current correction value.
  3. Measuring a few RC Radio values around Calibration is super important. I'm generally seeing +/- 1% for radio values. If out of bad luck you calibrate to off values this is bad.

Mock Up

Hardware Design

Finished version

Final version

One amazing thing about the Raspberry Pi Pico is how perfectly it's sized for fitting components in the middle of a daughter board. I'm a huge fan of this circuit style as it's physically robust and suitable for most applications. You get to remove all your circuitry to the back with very short wires between components.

The insides

I can't recommend enough Leo's bag of tricks if you're looking for a good circuit prototyping technique. The copper wire with silicone tube method is reliable, fast and easy. While I don't follow all his techniques If I regularly worked on the problems he's talking about it'd be the first method to try.

Software Flow

Building a software interface using a single button and a 7-segment display has always interested me. Single button video games are true marvels of engineering there is (for lack of a better term) a texture to a software interface that I thought could be fun to build. I had some 7-segment displays hanging around and have always wanted to try building a software interface using one. Then just a single button with a pot should be enough inputs.

After some trial and error I came up with this design:

Program Flow

To solve the calibration problem I developed this flow to step a user through the process. The Min and Max variables are to estimate the range that the RC radio operates at. Finally, the centre value is used to find the centre point that the scaled variation of throttle is made.

Calibration

Software

You can access the GitHub repo here