Asked — Edited

Building A Slave System

Hello all. A few questions here. I'm building a POC. And i need a little info and some help.

Is it possible to add 8 pots to the ADC ports and control 8 servos?

I'd like to build a slave system to control something. The idea is I have a contraption that I use that has pots located at joints, as i move the pots the servos move with the input from the pots.

I've looked around and found several threads on how to connect the pots to the ADC ports, but I cant seem to find any code to help me use the pot data to directly control the servos.

Also is there a way to add more ADC ports short of adding another EZB?


ARC Pro

Upgrade to ARC Pro

Stay at the forefront of robot programming innovation with ARC Pro, ensuring your robot is always equipped with the latest advancements.

PRO
Canada
#9  

Thanks @DJ, we all know that I'm more of a hardware guy lol

PRO
USA
#10  

oOo weee. Them thar are some chunky moves. I would definitely be grateful for a kalman filter plugin, if it cleared up the pulsing.

Would the type of pot make any difference? I have here a 10k and 1k ohm rotating pots both produce about the same results.

Also I'm using a HDD servo and the IO tiny

Lastly in this script would I be able to replace a digital port with support for a virtual port for Dynamixels?

PRO
Canada
#11  

The value of the potentiometer won't matter but the physical size will. The larger the size the better (finer) resolution you will get. A multi turn pot would likely be more ideal.

Yes, you can do the same with Dynamixels.

PRO
Synthiam
#12  

Try removing or lowering the sleep() value in the script loop. I don't know what "chunky moves" means - but if chunky means "jerky", then you'd want a faster refresh.

PRO
USA
#13  

Ok I’ll play with the values a bit. Video is worth a thousand words, if I can’t get it to smooth out the moves I’ll shoot a little video so you can see chunky moves, I know not a very good adjective. :)

PRO
USA
#14  

Thanks on the info Jeremie. Good to hear about the dynamixels and I do have thoose larger pot, I'll look into a mutiturn pot!

PRO
USA
#15  

@DJ, removing the sleep completely, fixed the problem, smooth as butter. As always thanks fellas!

edit: On second observation, maybe not. It could be this pot. Seems to be several a dead zones, where its moving, then it stops then it tries to quickly move and catch up. Hard to do fine motion. Maybe there needs to be some kinda sleep in there.

PRO
Canada
#16  

Yeah Will, I think you'll need a bit of a sleep in there maybe try Sleep(25) and move up from there if needed.