A brief diversion from astronomy

While in the attic I came across a model boat I had made with my Dad, about 55 years ago. Its the Royal Barge that was used to accompany the Royal Yacht Britannia. Some of the cabin tops were warped or missing and the electrics had long since gone.

With grandchildren, it seemed a waste to let it fester in the attic.

IMG 5405

I therefore spent a fun couple of days remaking parts and re-purposing a radio control set I had lying around, (a long story!)

I bought a new motor and on initial testing found it to be very powerful. I think it is the right power for top speed, but controlling the boat at manoeuvering speed was very difficult. A more sophisticated speed contoller (ESC) was required and possibly even a brushless motor. Lots of money!

My blog followers will know I have been using Raspberry Pi Pico’s recently. It dawned on me that I could use one to modify the proportionality of the speed control.

The receiver outputs a pulse of variable length 1 to 2ms every 20ms. All I had to do was measure the pulse length, apply a correction, and recreate the modified pulse train to send to the ESC.

I tried a few corrections and found a simple ‘square’ law suitable. The graph shows the linear input from the receiver, plus square and cube laws. About 20 lines of micropython code were needed. The pico runs the code on power up (the receiver provides the power).

If necessary, I can use a spare receiver channel to change the law between linear and square, but early tests (in the hot tub!) suggest that wont be needed.

Job done! Pico cost £4.

All I need now is a boating pond.


© AstroKeith 2022