| Author |
Message |
|
hriste
Rookie
Joined: Sun Mar 06, 2011 6:53 pm Posts: 7
|
 NXT Brick freezing
We are having a problem where out robot's NXT brick keeps freezing up mid-telop . We checked our code and there does not seem to be a place where the the brick would have trouble executing the code. We tried to switch bricks and had the same issue.
The code is attached, any help would be appreciated.
Thanks
|
| Sun Feb 12, 2012 3:51 pm |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2858 Location: Rotterdam, The Netherlands
|
 Re: NXT Brick freezing
Are you using a separate power source for your Samantha module? I've heard that sudden power surges due to motor activity can cause a brown-out and reset of the module.
- 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]
|
| Mon Feb 13, 2012 2:36 am |
|
 |
|
hriste
Rookie
Joined: Sun Mar 06, 2011 6:53 pm Posts: 7
|
 Re: NXT Brick freezing
the Samantha is powered off the 12 volt battery where the brick is powered of a NXT rechargeable battery. The Samantha lights are still on even after the brick freezes.
|
| Mon Feb 13, 2012 9:47 am |
|
 |
|
ronmcrae
Rookie
Joined: Wed Jul 21, 2010 11:23 pm Posts: 39
|
 Re: NXT Brick freezing
Are you certain the NXT brick is freezing? Or is the NXT program still running and you are you just losing joystick control of your robot? What do you do to unfreeze the NXT? Can you still exit the program with the grey button once the problem appears?
We ran into some major issues early in the season where a momentary loss of connection in the 12VDC feed to Samantha caused the wifi connection to drop, which in turn caused a loss of control to the robot. It turned out to be a damaged pin in the battery connector. Jiggling the wires (or driving the robot) caused the power to drop out momentarily from time to time. We have now replaced all the battery connectors with PowerPole and the problem went away.
|
| Mon Feb 13, 2012 10:26 pm |
|
 |
|
hriste
Rookie
Joined: Sun Mar 06, 2011 6:53 pm Posts: 7
|
 Re: NXT Brick freezing
it is defiantly the brick even when we turn off the robot power the screen remains frozen and we have to take out the batteries or reset to get it working again. We attempted switching bricks to see if it was the brick but the same thing happened on the second brick (not all the time just some times)
|
| Mon Feb 13, 2012 11:30 pm |
|
 |
|
ronmcrae
Rookie
Joined: Wed Jul 21, 2010 11:23 pm Posts: 39
|
 Re: NXT Brick freezing
I vaguely recall having issues when writing an INT variable to a Servo, but I don't think it was crashing the NXT it was more of an overflow issue causing the servo to go to unexpected positions. Anyhow, you might want to change the line servotarget[arm] = (short) input; Nothing else in your code looks like it should cause a problem. Are you definitely using RobotC V3.05 with the corresponding NXT firmware (9.07)?
You probably also want to change the line input=thing/100*250; to input=(thing*250)/100;, but again that wouldn't cause a major program hang problem.
|
| Tue Feb 14, 2012 1:23 am |
|
 |
|
hriste
Rookie
Joined: Sun Mar 06, 2011 6:53 pm Posts: 7
|
 Re: NXT Brick freezing
i'll try the math changes (although for it to work properly i think i have to divide before i multiply) and i'll check the firmwear, although i believe that is also up to date, (we meet Sundays so i can't check till then)
|
| Wed Feb 15, 2012 12:07 am |
|
 |
|
hriste
Rookie
Joined: Sun Mar 06, 2011 6:53 pm Posts: 7
|
 Re: NXT Brick freezing
OK we implemented the math changes suggested earlier, and the brick still froze.
Other observations: -we were preforming multiple tasks -the battery power was at about 12.9 volts
|
| Sun Feb 26, 2012 3:44 pm |
|
 |
|
rkrishnan2012
Rookie
Joined: Sun Feb 27, 2011 3:41 pm Posts: 20
|
 Re: NXT Brick freezing
The most effective thing we have done to fix this was to have a strip of wire hanging from the bottom of our robot touching the ground. FIRST recommends this and it is supposed to ground the extra charge on the robot.
|
| Sun Mar 04, 2012 8:47 pm |
|
 |
|
magicode
Moderator
Joined: Tue Sep 14, 2010 9:19 pm Posts: 495
|
 Re: NXT Brick freezing
I didn't know that the robot built up charge, and that it caused problems. I have gotten some nasty static shocks cleaning up fields in the winter though.
_________________ sudo rm -rf /
|
| Sun Mar 04, 2012 10:08 pm |
|
 |
|
rkrishnan2012
Rookie
Joined: Sun Feb 27, 2011 3:41 pm Posts: 20
|
 Re: NXT Brick freezing
that fixed our problems as well with the nxt freezing...we just added a wire to the bottom.
|
| Thu Apr 19, 2012 12:09 am |
|
|