BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Mon Jul 23, 2018 6:33 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Robo Claw using POT-Race Simulator
PostPosted: Thu Nov 13, 2014 10:10 pm 
Offline
New User

Joined: Thu Nov 13, 2014 9:51 pm
Posts: 1
Trying to figure out how to use Robo Claw to operate DC Motors using Potentiometer Feedback. Typically the motor rotates 0-180 degrees with 90 degrees being "home".

Do we need an Arduino to control the Robo Claw in a way like we use the MotoMaster or can we use the PC Serial Output from the Simulator Software? See link. If so, could you post a sample of the lines of code required for the Arduino?

http://www.xsimulator.net/wp-content/up ... -setup.png

If we choose an encoder, how would you suggest we make it move back to "home"?


Top
 Profile  
 
 Post subject: Re: Robo Claw using POT-Race Simulator
PostPosted: Sat Nov 29, 2014 6:32 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
You should use the IonMotion software to setup the roboclaw to use the POT as an encoder. The pot signal should connect to the A channel of the encoder for the particular motor channel you are using. In the general settings in IonMotion set the encoder type to absolute.

Then to use position control you will need to setup the variables in the position settings tab. There are a lot of settings. At a minimum you must set the QPPS, Position P and D and Position Min and Max. Everything else can be 0.

To calculate QPPS with a POT can be tricky because its got limited range of motion. In the PWM settings window run the motor at 150(1/10 full power) and read the speed value. You are looking for the max speed reached. Move the motor back and forth at +-150 since you have limited range. Once you know approx speed at 1/10 multiply that value by 10 and that will be your approx QPPS.

back in the Position Settings windows.
Set min and max to the range of your pot(in encoder counts) with about 50 to 100 margin so you wont damage the pot if the motor over shoots.
Set the Speed argument to the same value as QPPS.

At this point you can try using the autotuner. Set the drop down to PD and hit the autotune button for the motor you are tuning. Be ready to shut everything off if something goes wrong. This usually only happens if QPPS is set badly wrong. Other wise the motor should move a bit and oscillate a little for a couple seconds and then stop. When its done you hsould have some values in P and D. If they say "infinite" then it failed to autotune.

In either case you will probably want to do some manual tunning even after the autotuner is finished.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO