Servo behaving oddly since last upgrade

Support for Arduino in combination with Air Manager and Air Player

Moderators: russ, Ralph

Post Reply
Message
Author
ChuckK
Posts: 95
Joined: Sun Nov 06, 2016 2:33 pm

Servo behaving oddly since last upgrade

#1 Post by ChuckK »

My flap gauge uses an SG9 servo and up to recently has been operating perfectly.

However now with latest upgrade the servo is moving slightly on its own, even with XP not running. Seems to move every 5 secs or so. Then when XP is then launched the gain and offset terms (simple linear eq: y = mx + b) equation in my instrument no longer result in the correct needle alignment. I re-did the equation once, got it aligned and working but it soon was out of position again.

Any Thoughts?

Chuck

User avatar
Ralph
Posts: 7918
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Servo behaving oddly since last upgrade

#2 Post by Ralph »

Can you please let me know which type of Arduino and preferably send us the instrument, then I can monitor it work an oscilloscope.

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Servo behaving oddly since last upgrade

#3 Post by Sling »

ChuckK wrote: Tue Apr 26, 2022 1:21 pm My flap gauge uses an SG9 servo and up to recently has been operating perfectly.

However now with latest upgrade the servo is moving slightly on its own, even with XP not running. Seems to move every 5 secs or so. Then when XP is then launched the gain and offset terms (simple linear eq: y = mx + b) equation in my instrument no longer result in the correct needle alignment. I re-did the equation once, got it aligned and working but it soon was out of position again.

Any Thoughts?

Chuck
What kind of flap gauge is this Chuck that you need to use that equation to position the needle. I’m thinking all you need for this is to scsle what’s coming from the sim to whatever the SG90 needs. I can’t see how an offset would occur with that arrangement unless the PWM output has changed somehow.

ChuckK
Posts: 95
Joined: Sun Nov 06, 2016 2:33 pm

Re: Servo behaving oddly since last upgrade

#4 Post by ChuckK »

Tony,

XP provides the poorly named "flap_handle_deploy_ratio" dataref for the flap position. My aircraft has 4 flap positions so the dataref is either 0, .333, .667, or 1. I then just use a linear fit equation to output the required pwm to the servo. Has worked fine for years. The offset is needed because my when the gauge is reading flap "0" the teeth on the servo output shaft don't allow for perfect alignment of the needle to the printed "0" on the gauge, hence a small amount of offset.

This morning however I think I may have stumbled on to the issue. I'm pretty sure one of my USB hub power supplies is bad. It shows an open circuit voltage, but I suspect it collapses under load requiring the 15 USB ports to pull current from the PC. This of course causes the Arduino to disconnect, and when it tries to reconnect the servo moves slightly. This is the uncommanded movement I'm seeing.

A replacement power supply seems to have fixed this issue pending further testing.

The piece that is confusing, as a servo is a closed loop feedback device, why would the fit equation change just because it has connected and disconnected several times.

Chuck

Post Reply