Directly reading a servo's potentiometer, throttle control for a simulator.

Longtime reader but first time posting. I'm grateful for the expertise of all the folks in this forum and am hoping to run an idea by you so that you can either help me flesh it out... or talk me out of i!

I'm working on building a physical control interface for this spaceship bridge simulation game: https://www.artemisspaceshipbridge.com/ , and I'd like to inexpensively build eight "throttle" type controls which are usually manipulated by a person, but occasionally re-positioned by software to preset levels. Think of an audio mixer with motorized sliders: physical positions set by hand, then recalled with the touch of a button.

This application doesn't really require a ton of precision: it just needs to look cool, and be fun to use. +/- 10% error or so is fine.

I started dreaming up complex designs (stepper motor, belts, etc) but then I realized: could I do this using a hobby servo, and then get position information by directly reading the servo's own potentiometer? Idea is:

  • Servo with a 2 inch arm attached to it: that's the "throttle"
  • Servo power is normally off: either actually switched off with a transistor/relay, or just no PWM signal sent to it.
  • Servo's potentiometer is always connected to gnd, vcc and an analog pin (I'll have to open up the servo and solder directly to its potentiometer). Reading this pin gives the position of the throttle.
  • When a preset needs to be recalled, power is returned to the servo's main mechanism, and the servo is instructed to move to a specific position. Then power is cut again.

There are of course lots of issues with this: gear backlash adds imprecision, spinning the motor turns it into a generator which sends noisy power back into the rails... probably other things I'm not considering too. But what do you think: is it worth pursuing? Has anyone here tried reading a servo's real position (not just last given position in software) this way before? It just seems so convenient that at least in theory, a hobby servo already contains everything I need for this use case, all in one package.

I'll attach a photo of my very basic benchtop mockup of the idea, although I haven't yet disassembled the servo to try and read its potentiometer. I can confirm that the servo does indeed hold its position once powered down, and the stick gives a satisfying amount of physical resistance while moving it.

Moving a servo by hand is very hard on the gears. I recently ruined a servo that way.

Here's a video of the mockup physically working in a very basic way, but again I haven't actually pulled apart the servo to try and read its potentiometer yet, which is where things will get more messy.

Throttle.mpg (1.97 MB)

groundFungus:
Moving a servo by hand is very hard on the gears. I recently ruined a servo that way.

Hmm I'm discouraged to hear this. I was hoping maybe the small forces I'd put on the servo would be within the limits of what the servo was designed to handle (the world of RC cars/boats/planes is not exactly gentle!) but I suppose that ruggedness is mainly concerned with resisting external motion, not accepting it coming back through the gearbox, 100 degrees at a time.

I can see what you're truying to do, but if breaking servos isn't off the table, this approach may be ok, but I'd probably fabricate a simple stepper (or servo) + separate pot or encoder with a slippy clutch which allows you to manually move the shaft.
That will allow you to control the motor as needed, yet read the position (which might be different at any given time).
Rewmember the two are not always in a 1:1 position relationship, so you have to 're zero' your known pot position after every 'known' motor reposition.

It's a bit fussy but not too difficult.
Luckily you have a known / limited range of motion - so there's some joy in that !

I was hoping maybe the small forces I'd put on the servo would be within the limits of what the servo was designed to handle (the world of RC cars/boats/planes is not exactly gentle!)

True, but servos are not usually designed to be driven by turning their output shafts

Hi,
Welcome to the forum.

Look at this Adafruit product and the YouTube demonstration, it looks like exactly what you are looking for.

Tom... :slight_smile:

@TomGeorge I was so hoping that it would be a servo meant to tolerate being moved from the output shaft.

As has been pointed out, servos generally don't "like" being reverse driven. In my experience it works until it doesn't, then doesn't work anymore.

It can awfully feel like nothing untoward is being visited upon the gear train, but once jammed or stripped you are screwed. (<-- technical terminology there).

a7

With the standard size servo as in your picture, I would not be too concerned about stripping the gears when moving by hand.
If you could use a metal gear servo the chance would even be less.

I also like your idea of simply tapping the analogue pin and would definitely give it a try and open one up your servo. Give the servo's a separate 5V power supply and connect the ground and potmeter-tap wire to your Arduino and use the example sketch Analogread to see what you get.

if the high end of the servo potmeter is not 5V but 3.3V you could connect that 3.3V to the Aref pin of the Arduino and have more resolution.
Good luck.

Thanks everyone for your replies. The video in that Adafruit demo does show exactly my use case: moving the servo arm by hand, then later moving it programmatically.

I guess the question is: how many times will a cheap hobby servo accept torque being applied to its output shaft before something breaks. I was planning to use this $2.88 MG995 clone, which is a "high torque metal gear" servo with "Fine workmanship" and "Long service life"... but I'm betting they've had to make some build quality sacrifices to somehow sell and ship this to me for less than a head of broccoli.

Before testing further: I'm concerned that because the servo's motor will act as a generator, it will send power back into the project's rails. I really need to maintain a clean 5V for other components to work. On a quick test with a multimeter I can get 2V just by spinning this Servo's arm quickly.

I don't think I'll be able to totally isolate the servo on its own power supply, because I'll be reading the pot from the servo itself, so I'll at least need to share a ground with the rest of the project. Or am I overthinking this and the effect will be relatively small as long as I keep the motor's + lead on its own power supply.

Is there some sort of diode I could use to avoid this issue?

Also at the same time I'm going to think more about building this "properly" by fabricating a purpose-built mechanism. I have a 3D printer and 3018 CNC so I can whip up some small parts if that's what's needed. Can anyone suggest where to start looking for a "slippy clutch" design? Googling hasn't gotten me far with this.

The voltage the servo motor generates would come back via the red (+) wire. So if you only tie the grounds together and use two separate power supplies I don't know how the servos ever would be possible to corrupt power supplied to your Arduino.

Servo gears tend to strip when there is a sudden force. In my model airplanes, that's when I bump a rudder to a wall when walking off the stairs or putting the plane back in the car. If you would make your throttle arms from a little flexing material, that would take off the edge of the moment-force and allow the gears in the servo to come up to speed less abruptly.

A completely different method: Mount the control lever on the servo arm so it can flex a bit in both directions. Put fixed contacts on either side so the control lever will make contact before the stress on the gears becomes excessive. The two contacts act as UP and DOWN buttons and the software will move the servo in the desired direction to follow the motion of the control lever. That way you don't strain the gears and the servo can be moved with the control lever when you want it to. You don't even need to open the servo.

Optical interrupters or mechanical switches could be used in place of simple contacts if more robustness is needed.

The contacts don't have to be on the control lever. The servo could be on a springy mount and rotation of the servo body could trigger the UP and DOWN signals.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.