View unanswered posts | View active topics It is currently Wed Jul 01, 2015 1:17 am






Reply to topic  [ 4 posts ] 
DC Motor PID control and Sync? 
Author Message
Rookie

Joined: Sun Jan 04, 2015 8:47 pm
Posts: 23
Post DC Motor PID control and Sync?
I've been having serious problems with this mini bot I built. Because it's so light, I had something added to weigh down one wheel so it would grip and actually move. However, this perpetually makes it want to grip and drift.

I haven't seen anywhere saying that you can't use PID with DC motors, but I think they need encoders? Can you use PID without encoders? If so, what else do I need to add beside the nPidUpdateInterval = 20; code?

And for Syncing, can you sync DC motors? The code says that you can "syncBC" or something like that, but my DC motors show up as mtr_S1_C1_1, which I can't put into that command. Am I missing something or is this just not possible?


Fri Jan 09, 2015 10:21 pm
Profile
Professor
User avatar

Joined: Sat Aug 31, 2013 9:15 am
Posts: 256
Post Re: DC Motor PID control and Sync?
Yes, the only way to do PID on a motor is to have an encoder on it. Also, there is no way to have ROBOTC internally sync DC motors. The syncing functionality sadly only works for NXT motors.

_________________
FTC Team 6100 Chariots of Fire - Programmer (2012-2013)
FTC Team 7468 Blue Chariots of Fire - Programmer (2013-2014)
FTC Team 7468 Blue Chariots of Fire - Mentor (2014-2015)
Check out our team website at http://bluechariotsoffire.com/.


Mon Jan 12, 2015 11:47 am
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1519
Post Re: DC Motor PID control and Sync?
Regarding on using PID on motors without encoders, PID is close-loop control, so it requires feedback. Encoder is one way to give feedback to PID control but other sensors may work as well depending on the application. If it's a robot arm, it could be a potentiometer. I have tried once using accelerometer instead of encoders. It didn't work too well but it could be done if you understand the restrictions.


Mon Jan 12, 2015 10:54 pm
Profile
Rookie

Joined: Sun Jan 04, 2015 8:47 pm
Posts: 23
Post Re: DC Motor PID control and Sync?
MHTS wrote:
Regarding on using PID on motors without encoders, PID is close-loop control, so it requires feedback. Encoder is one way to give feedback to PID control but other sensors may work as well depending on the application. If it's a robot arm, it could be a potentiometer. I have tried once using accelerometer instead of encoders. It didn't work too well but it could be done if you understand the restrictions.


Would you mind giving an example of this? How do you give feedback to the encoders? What kind of feedback is needed?


Tue Jan 13, 2015 10:00 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

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

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.