Author Topic: Theory on odd rotation  (Read 3346 times)

0 Members and 1 Guest are viewing this topic.

Offline gamefreakTopic starter

  • Supreme Robot
  • *****
  • Posts: 543
  • Helpful? 2
  • Robo-Enthusiast
Theory on odd rotation
« on: May 27, 2008, 07:33:07 PM »
Alright during this years FIRST competetion my team's programming team had an issue with the autonomous code they tried to implement. When the robot received an IR command it was supposed to drive forward until commanded to do other wise, but even though both moters received the same commands from the controller, there was always a slight turn which invariable led to driving towards a wall.

Now could this have been a result from the fact the code runs in a linear fashion? It seems unlikely but since I was lazy and didnt feel like removing 30 lbs. of robot and breaking chains again I sought for another answear, could the slight delay of a linear program when driven through 12 volt moters and chains result it a rotation?
All hail Rodney, the holy 555 timer
And Steve said: "Let there be lead!"

Offline bens

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 335
  • Helpful? 3
Re: Theory on odd rotation
« Reply #1 on: May 28, 2008, 12:28:47 AM »
Now could this have been a result from the fact the code runs in a linear fashion? It seems unlikely but since I was lazy and didnt feel like removing 30 lbs. of robot and breaking chains again I sought for another answear, could the slight delay of a linear program when driven through 12 volt moters and chains result it a rotation?
Probably not.  It would probably take a delay on the order of 10s of milliseconds or longer to produce a noticeable rotation, especially given how heavy your robot was.  In your case, the weight gives your robot more inertia, which would further decrease the effect of any time lag between when the two motors were told to move.

What microcontroller were you using and how fast was it running?  Could you have somehow introduced a delay in software between when you told one motor to start moving and when you told the other to start moving?  For example, if your "set motor speed" function was insanely inefficient and took 100ms to carry out its job and return, then you might see an initial rotation kick.

Was the behavior an initial rotation followed by more-or-less straight motion, or was your robot constantly curving?  If it's the latter, I'd blame the behavior primarily on a disparity between your motors and a failure to compensate for their differing characteristics in software.

- Ben

Offline gamefreakTopic starter

  • Supreme Robot
  • *****
  • Posts: 543
  • Helpful? 2
  • Robo-Enthusiast
Re: Theory on odd rotation
« Reply #2 on: May 28, 2008, 05:40:25 AM »
I dont know anything about the microcontroller, it was supplied by FIRST,I wasnt part of the programming team and only helped on the occasion when some were missing, and after its initial jolt to the left it would drive straight.
All hail Rodney, the holy 555 timer
And Steve said: "Let there be lead!"

paulstreats

  • Guest
Re: Theory on odd rotation
« Reply #3 on: May 28, 2008, 06:32:12 AM »
If the inputs for the motor driver circuit arent pulled low(or high depending on your setup),then it can cause an initial odd movement.

the following h-bridge example describes why
http://www.robotroom.com/HBridge.html


 

SMF spam blocked by CleanTalk