Mysterious Motor behavior

10 replies [Last post]
Thatsillogical
Thatsillogical's picture
Title: NooBot
Joined: 04/19/2013
Posts:
BotPoints: 26
User offline. Last seen 3 years 37 weeks ago.

Hey, I was wondering if anyone had some suggestions for the following issue:

My motors are not behaving very properly, they are in ports 0 and 1 on the KIPR Link, and they are exhibiting a number of incorrect behaviors where they should be driving at speed 100 each, for .5 secs.

The incorrect behaviors are:

One motor jerks forward a very short distance (5 mm or so) and then stops
Both motors travel backwards , but one is slower than the other, creating an arc.
Motors travel backwards first, then travel forwards as they should, but resulting in a net no movement

In my program, I tried many functions, (a drive_cm(int cm) function I wrote, fd, motor, mav, and mrp) with the equivalent values, and saw the same odd behavior.

When I isolated the motors from the program, and tested them with the velocity test on the Link, half of the time they worked as normal, and the other half, changing one velocity caused the other motor to move (although I am not sure if this was a software or hardware problem).

I tried this with multiple motors, old and new, and tried rebooting the Link a few times. Admittedly, I have not re-installed the firmware, as I did not have a usb with me, and this problem has only come up today.

I will try to re-install the firmware as soon as I can, but in the meantime, could anyone give me other suggestions?

Thank you very much!

:3

Jeremy Rand
Jeremy Rand's picture
Title: Botball Youth Advisory Council
Joined: 04/03/2009
Posts:
BotPoints: 1168
User offline. Last seen 2 years 29 weeks ago.

Can you post some example code which triggers the problem?

-Jeremy Rand
Senior Programmer, Team SNARC (2012-2013), Norman Advanced (2010-2011), Norman HS (2008-2009), Norman North (2005-2007), Whittier MS (2003-2004)
2012-2013 VP of Tech, 2011 President, Botball YAC (2009-2013)
Mentor, Alcott and Whittier MS

Marty Rand
Marty Rand's picture
Title: Botball Youth Advisory Council
Joined: 07/04/2009
Posts:
BotPoints: 253
User offline. Last seen 3 years 17 weeks ago.

Also, what firmware version are you on?

-Marty Rand
{
Senior programmer at Norman Advanced Robotics

Former senior programmer at Whittier Middle School

Youth Advisory Council

All around nerd
}

Thatsillogical
Thatsillogical's picture
Title: NooBot
Joined: 04/19/2013
Posts:
BotPoints: 26
User offline. Last seen 3 years 37 weeks ago.

msleep(2000);

// temporary measures, motors are not working- is not motors, is link or code, most likely Link

drive_cm(10);

msleep(1000);

everything before and after this section works fine... In the place of drive_cm I've also used the methods I described in the OP with the required msleeps.

:3

Thatsillogical
Thatsillogical's picture
Title: NooBot
Joined: 04/19/2013
Posts:
BotPoints: 26
User offline. Last seen 3 years 37 weeks ago.

I'm on 1.7

:3

Marty Rand
Marty Rand's picture
Title: Botball Youth Advisory Council
Joined: 07/04/2009
Posts:
BotPoints: 253
User offline. Last seen 3 years 17 weeks ago.

I remember that the Link had very weird motor issues on 1.4 or 1.7. I can't remember which one. Try upgrading to the latest firmware.

http://www.kipr.org/kiss-platform-link-firmware

-Marty Rand
{
Senior programmer at Norman Advanced Robotics

Former senior programmer at Whittier Middle School

Youth Advisory Council

All around nerd
}

Thatsillogical
Thatsillogical's picture
Title: NooBot
Joined: 04/19/2013
Posts:
BotPoints: 26
User offline. Last seen 3 years 37 weeks ago.

Okay, I'm away from the robot as of right now, but i'll try the update asap, and let you know what happens.

Thanks!

:3

dgoree
Title: NooBot
Joined: 02/13/2012
Posts:
BotPoints: 130
User offline. Last seen 1 year 5 weeks ago.

I believe it was 1.4 that had crazy strange issues, however they were fixable by changing the motor calls in the program. Ie mav(1,100); to move motor 3 forward at 100. 1.7 is what we used at the tournament back in March.

-Daniel Goree
Former...
Senior Project Manager
President
Norman Advanced Robotics (13-0113)

Marty Rand
Marty Rand's picture
Title: Botball Youth Advisory Council
Joined: 07/04/2009
Posts:
BotPoints: 253
User offline. Last seen 3 years 17 weeks ago.

Hmm... if that's the case, I would check the PID gains for the motors They should be 1.0 , 0.5 , 0.05 (or something close to that I think). What are yours? Did this happen suddenly or was it always like this? Also try all the motor ports.

-Marty Rand
{
Senior programmer at Norman Advanced Robotics

Former senior programmer at Whittier Middle School

Youth Advisory Council

All around nerd
}

Thatsillogical
Thatsillogical's picture
Title: NooBot
Joined: 04/19/2013
Posts:
BotPoints: 26
User offline. Last seen 3 years 37 weeks ago.

Hi guys, sorry its been so long, the firmware update fixed the issue, I wish I knew more properly what caused it in the first place, but I'd prefer a working robot! :)

Thanks all!

:3

Jeremy Rand
Jeremy Rand's picture
Title: Botball Youth Advisory Council
Joined: 04/03/2009
Posts:
BotPoints: 1168
User offline. Last seen 2 years 29 weeks ago.

Good to hear you got it fixed, thanks for letting us know!

-Jeremy Rand
Senior Programmer, Team SNARC (2012-2013), Norman Advanced (2010-2011), Norman HS (2008-2009), Norman North (2005-2007), Whittier MS (2003-2004)
2012-2013 VP of Tech, 2011 President, Botball YAC (2009-2013)
Mentor, Alcott and Whittier MS