Controlling the linear pots of an RC transmitter from Arduino

Okay, I need a little guidance here. I thought this was going to be really simple, but I found that not to be case.

It might help to understand what it is that I'm really trying to accomplish. My father has built a WWII Fletcher class destroyer model that he wants to make remote control. But he doesn't want conventional RC controls. He actually wants independent engine control, and he wants to literally call for "1/3 AHEAD" and "FULL SPEED AHEAD" by pressing buttons. He wants the engines to slowing come up to speed just as they would in a real ship. He's trying to make this a minature ship simulator to relieve his memories serving aboard the bridge as an officer back in the 60's.

I was thinking I could take the wires intended for the analog sticks on a RC transmitter and instead have the Arduino vary the voltage on the wires via the analog pins. Unfortunately, I haven't been able to get this to work. I modified a cheap park flyer transmitter already as a proof-of-concept and created an interface cable to one of the analog inputs on the transmitter. The wires intended for the linear pot are also on the interface cable as separate wires. So I have 2 wires going to the connector on the transmitter and 2 wires going to the linear pot. If I connect the 2 sets of wires together appropriately, the analog stick work like it did before. (Note that I'm only working with a single axis stick for my proof-of-concept). Using just the 2 wires going to the transmitter board, if I short them together (no resistance) the engine on the receiver goes to 0% throttle. If I unshort them, the engine goes to 100% throttle.

Here's where I'm stuck. How do I control this from the Arduino? I already tried hooking up each wire to an analog pin and trying a range of values using AnalogWrite(), but the engine always ran full tilt. I'm obviously missing something important. I did test the range of voltages across these 2 pins with a multimeter while the analog stick was hooked up, and I got a range between 0.001 and close to 1V. Of course I realize the analog pin wants to put out 5V at the top end of the range. Do I just need to add some resistors? I feel like I lack the appropriate knowledge. Any help would be greatly appreciated.

I don't have the answer for you, because my testing materials for a similar project have not yet arrived, but maybe what I've found so far might help.

Depending on how the model itself works, it may not be controlled by voltage. What I've found is that servos, at least, are powered to a specific voltage based on their tolerance and desired output. The speed of rotation (or angle of rotation) is controlled not by voltage, but by pulsed information on their third (data) wire. So, altering the voltage supply would not have the desired result on the engine output.

The project I'm working on is a tracked vehicle controlled by a R/C car (steering wheel/trigger) remote. My plan is to take the trigger - speed - data, and apply it to the tracks proportionally based on the steering data. I plan to start by just running the receiver into the Arduino, and running the data from the inputs back out to the computer. Once I know what data the receiver is sending, I will use the Arduino to send duplicate data back to the actual servos. (I am doing it this way to allow me in the future to program automatic movement that can be overridden by the remote control)

I don't know if this is helpful, or even right, but hopefully it's a way of thinking that might be helpful.

analogWrite() gives a PWM output; a square wave bouncing between 5V and 0V. When the transmitter sees this it would understandably get confused. See: PWM or Google for "RC filter" for all the gory details.

If you're looking for a straight solution, try putting a 1K resistor off the Arduino PWM pin, connect the other end of the resistor to the transmitter analog input, and additionally put a 47uF capacitor between that analog input point and ground. See image.

As an aside, if you had a rotary, ~four position switch (or however many speeds you want) you could avoid using the Arduino completely. That would allow you to switch between (four) different resistances to the transmitter input.

You probably need to explain the design of the "engines" in a little more detail. Are the engines electric motors, or are they actual heat cycle engines? Just thinking, you might use an resistor/capacitor circuit in the normal RC pot control (or speed switch circuit) such that when the pot/switch is moved the actual output voltage to the RC transmitter board very slowly increases and decreases slowing the final motor response.

I took his post to mean that he's rearranging the guts of an off-the-shelf transmitter so he can make a custom interface (using an Arduino to "spiffy" things up).

I don't think WW2 destroyers used buttons for speed control though :wink:

Hello
Can you give us more information about the mode - size, does it have any motors mounted on it or any other gear (some pictures will be helpful). If I was going to make such kind of simulator i would use stepper motor for the propulsion and a servo motors for turning. You can easily control the stepper motor's speed and direction.
P.S. Props to your dad very nice idea

Edit: maybe this can give you some ideas How To Control Your Cheap RC Car With A Computer | Hackaday

The premise here is that when the captain calls for 1/3rd speed ahead, an enlisted man pulls a Telegraph lever to point to 1/3 ahead. The guys in the engine room see this and change the engine speed. They answer back by moving another Telegraph to indicate 1/3 ahead. This is seen by the bridge crew, and somebody says "engine room answers one third ahead, sir."

So we are sorta trying to simulate this. I might even decide to have a servo move an analog indicator like a Telegraph.

The electronics in the ship model will all be standard rc parts. There is a receiver, 2 esc's or a dual esc, a servo for the rudder, and 2 ungeared motors, one for each prop.

I need all interaction to happen in transmitter so that I can drive indicators and such. I want to slowly change the speed of the motors.

Why not build an engine room telegraph from a multi way switch?
The response from the engine room could drive a servo to verify the selected engine speed.

Xpendable:
I need all interaction to happen in transmitter so that I can drive indicators and such. I want to slowly change the speed of the motors.

IIRC, there are hobby R/C transmitters that take a serial input; they are meant to be hooked up to a PC to allow flight simulator software to control an actual R/C plane, among other things.

You probably want to use something like that; the only real problem is whether they've all gone to USB by now (which they probably have)... That will make communications using an Arduino difficult (as the Arduino has to act as a host, and you have to reverse engineer the protocol being used if it isn't simple HID, etc - plus a bunch of custom software driver writing, etc - it get's big, bad, and terrible fairly quickly).

Your best bet would probably be to modify the transmitter to control the potentiometers via servos, and any switches via relays. Then you can use an Arduino and the Servo library to control those servos, and use digital output pins (and appropriate transistor/mosfet drivers) to control the relays. You'll likely have to remove the potentiometers from the transmitter, and measure their resistance (or read it off the parts, if they are marked). You could then either substitute your own, or use the existing ones; probably mount the pots to a board (extending wires from the transmitter), and mount the servos next to them, then connect the shafts (using rubber tubing or something else).

The rest would be programming - interfacing your "telegraph controls" to the Arduino, and having code to simulate the call-pause-acknowledge cycle in a realistic matter (perhaps with audio playback, or LCD display, or output to the computer via the serial port - any number of possibilities).

You might want to stick with using a Mega for this, though - I can see the number of pins needed for the project being fairly large, and perhaps outside the ability of a standard Arduino (without using multiplexing or some other scheme, of course).

IIRC, there are hobby R/C transmitters that take a serial input; they are meant to be hooked up to a PC to allow flight simulator software to control an actual R/C plane, among other things.

That PC interface method is just a application of a feature that many R/C transmitters have, as follows. Most or at least many better quality R/C transmitters are designed and have a rear multi-conductor jack that allows two transmitters to be linked together in a master trainer/student trainee mode such that the student's joy stick are active (and the student's transmitter is the only one outputting an RF signal to the model) unless the trainer flips a switch and the trainer's joy stick commands are the ones routed to the student's transmitter and sent out the airwaves. Makes for the safest method to teach new R/C pilots how to fly their expensive plane.

Anyway this method utilizes a serial PPM data stream that is always used somewhere inside any R/C transmitter and an arduino could certainly emulate this PPM serial stream along with the digital override signal to the R/C transmitter. The main problem implementing this is that you really need the users manual to your specific transmitter which shows that it indeed has this feature and the pin out of it's remote connector.

Lefty