|
Page 1 of 1
|
[ 4 posts ] |
|
| Author |
Message |
|
rkrishnan2012
Rookie
Joined: Sun Feb 27, 2011 3:41 pm Posts: 20
|
 Encoders are Inaccurate?
Hello guys, It is my first time posting in this forum. I am from FTC Team Unlimited 0001. We were wondering if it is just us who has trouble with the DC Motor Encoders. Whenever we make an autonomous and finish, our encoder always acts up the next time and we need to tweak it a little again (by like 3 inches). Is there a way to get super accurate readings each time? Here's how i do it... Now, we are using two encoders and it is still being bad. Before we also tried with one encoder.
|
| Sun Feb 27, 2011 3:46 pm |
|
 |
|
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1023
|
 Re: Encoders are Inaccurate?
Don't know what you meant by acting up and have to tweak it again, but your algorithm is not accurate to start with. First, you only reset the right encoder at the beginning, but you did not reset the left one. Secondly, even if you applied equal power to both wheels, the wheels are not running at the same rate, so your robot will probably not going straight and will most likely overshoot because you won't stop until both encoders traveled at least x inches. You may consider using some of the RobotC bult-in facilities such as Sync the wheels or even PID control drive. There are many threads about this in this forum. You can search for them.
|
| Sun Feb 27, 2011 11:36 pm |
|
 |
|
pbesen
Rookie
Joined: Wed Feb 18, 2009 4:06 pm Posts: 12
|
 Re: Encoders are Inaccurate?
We have seen the exact same behavior. My own theory is that sometimes it takes a long time for the zeroing of the encoder to take place (I don't have any idea why this should happen?). So if you look at your program, you reset the encoder and immediately start the motors. The encoder may not really reset until the motor has been running for some time.
Insert a delay after reseting the encoder (250 msec?). Also instead of reseting the encoder, you could just read it's current value and use that as the starting reference.
We haven't had time to figuire this out, so I would be curious with regard to your fix.
|
| Mon Feb 28, 2011 6:02 pm |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2865 Location: Rotterdam, The Netherlands
|
 Re: Encoders are Inaccurate?
I will often add a 100-200ms delay after resetting the tachos. When they're reset, it's not immediate due to a few internal things that need to be reset as well.
- Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Tue Mar 01, 2011 2:12 am |
|
|
|
Page 1 of 1
|
[ 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
|
|