Potentiometer feedback

Hi,
So i am working on a research project at Virginia Tech and im on the Electronics team, im somewhat out of my realm of knowledge being an Aerospace student, but we have an underwater glider that we are building and it operates similar to an aeroplane in the manner that we use it.

Essentially the thrust is provided by a ballast system that pushed water in and out of the hull changing the boyancy allowing it to go up or down and the forward motion is thus controlled by the lift from the wings. attitude and roll is controlled from a mass system that moves forward and aft as well as rolls its self around to roll the glider.  

Ive come accross sorta an issue that i dont know how to resolve. this is a prototype to test the systems for a bigger better glider, so we need accurate servo feedback, but the internal potentiometers cant be used without risking the servo or with any accuracy as the throws will be greater than a full revolution. so we have conlcuded to set up a PID using a potentiometer feedback from the servo location, but how to actually go about hooking up a servo and a potentiometer is sorta giving me trouble

Thank you,
Chris

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Developer
    Chris, you don't give any information on if you are using ArduPilot, or even Arduino, so I'm not sure this answer has relevance.

    Assuming that your servo's will still be driven with PWM.... You can use a PWM output to drive the servo. Use a fixed voltage into your potentiometer yielding a voltage proportional to position out of the potentiometer. Connect this to one of the analog pins. Now you can set up a PID controller between the desired servo position (converted to the equivalent voltage from the potentiometer) and the voltage from the potentiometer, with the output converted to an appropriate PWM value.
This reply was deleted.

Activity