Welcome to Synthiam!

Program robots using technologies created from industry experts. EZ-Builder is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.
Get Started

Asked
Edited

Continuous Servo Control From Variable Resistor.

Good afternoon everyone,

Did a search and couldnt find anything on this.

My robot has a head that rototes on a 72 tooth gear belt driven from a smaller 18 tooth gear (4:1) with a continuous servo attached and this servo is connected to a variable 10 turn 10K resistor.
Good afternoon everyone,

I dont want the head to turn more than 180 degrees from central position, so i make that x2 turns of the servo either way.

from what ive learnt i believe i need to somehow convert the resistance to a PWM, but i have no idea where to start with that.

If someone could point me in the right direction i would be very greatful

User-inserted image

Thanks?


Related Hardware EZ-Robot EZ-B v4
Related Control Continuous Servo
AI Support Bot
AI Support Bot
Synthiam
Greetings! I'm the support robot! I've searched other questions, tutorials and controls related to your question. Take a look at these links. They're all sorted by what I believe is the most relevant:
Synthiam
#1  
Hello @Almostrodney,

You have a few options:

1. Multi-turn potentiometer
2. Optical encoder
3. Magnetic encoder

You should be able to scour youtube, google, and the Synthiam pages to find more info on each topic.
#2  
Thanks for the reply Jeremie,

As i said above, im using the Multi turn potentiometer (10 turn 10k) and have searched, but i dont know enough about them to know where to start.

Do i use ADC? how do i get it to relate to PWM? where in the software do i do this?

Im happy to do my research but the tutorials are scares on these.
Synthiam
#3  
Oh I apologize, I didn't see the 10 turn pot info. In that case, yes, you can use an ADC to measure the voltage.

It depends on what voltage the Pot is getting but you should be able to connect a wire to the wiper of the Pot and get your analog voltage from there. I'd measure the voltage of the wiper to see what your min and max voltage are (fully stowed to fully retracted).

If you are using an arduino to measure the max analog voltage it could measure 0 to 5V scale. If it's an EZ-Bv4 it would be 0-3.6V (with protection upto 5V) if it's an IoTiny there's not 5V protection so I'd say 0-3.3V max.
Synthiam
#4   — Edited
User-inserted image
Actually, you could short-cut that process by just measuring from A to B. If the voltage is too high for the ADC on the controller you are using then you could look into adding a resister to make a voltage divider to make it work. I believe a resistor added between the wiper and the ADC wire would work.
Synthiam
#5   — Edited
I'd recommend using a standard HDD servo and removing the stopper and removing the POT.

Then, attach the wires from the POT to the new POT

Voila, you have a servo without having to write a pile of code because it'll all be self contained. That's how the InMoov joints work. They remove the POT and locate it on a joint.