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?
Asked
— Edited
Yes, you can definitely add 8 potentiometers to the 8 ADC ports to control 8 servos. You will need to attach one side of the potentiometer to GND and the other side to 3.3V and the wiper will go to the ADC port. Replicate this wiring for each potentiometer.
Here's some example code to control one servo with a potentiometer:
Code:
If you want to add more ADC ports I believe there are I2C to ADC solutions out there but I haven't had any experience with them.
By using the ADC I have the choice of using rotational pots, slider pots and flex pots, and or mix and match.
I just found this 6 year old thread. My project is similar to the video he posts #7, but way more involved.
https://www.ez-robot.com/Community/Forum/Thread?threadId=285
Use jeremie's suggestion...
You might find a bunch of jitter with the pot - in which, i can whip up a kalman filter plugin for you. It's something i've been meaning to do anyway...
Code:
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?
Yes, you can do the same with Dynamixels.
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.
I favor the mean filter, on 8 with a 25 sleep. Very smooth on the micro servo I tested with. I have like 2 dead zones that I think are related to the pot I bought. Just a cheap $1 pot.
There's an update to the complimentary filter which allows custom dampening to be applied as an optional parameter. It's documented in the help displayed of the plugin.
Please?
Many of the EZ-Robot plugins do have source code available on the plugin page.
Here is the list of what I found. I thought the Bing speech Recognition one was as well, but I don't see the link. It was in a discussion thread a few weeks ago.
SMTP
https://synthiam.com/redirect/legacy?table=plugin&id=128
Dynamixel
https://synthiam.com/redirect/legacy?table=plugin&id=39
Display Popup
https://synthiam.com/redirect/legacy?table=plugin&id=17
TicTacToe
https://synthiam.com/redirect/legacy?table=plugin&id=6
Screen Recorder
https://synthiam.com/redirect/legacy?table=plugin&id=38
Command Duplicator
https://synthiam.com/redirect/legacy?table=plugin&id=165
User Defined Function
https://synthiam.com/redirect/legacy?table=plugin&id=162
Remote Mouse
https://synthiam.com/redirect/legacy?table=plugin&id=37
TCP Client
https://synthiam.com/redirect/legacy?table=plugin&id=48
Augmented Reality
https://synthiam.com/redirect/legacy?table=plugin&id=50
Oculus Rift Camera
https://synthiam.com/redirect/legacy?table=plugin&id=59
Connectoin Diagnostic
https://synthiam.com/redirect/legacy?table=plugin&id=64
Camera Click Servo
https://synthiam.com/redirect/legacy?table=plugin&id=58
Camera Overlay
https://synthiam.com/redirect/legacy?table=plugin&id=47
Target Overlay
https://synthiam.com/redirect/legacy?table=plugin&id=51
Alan