The power draw for marching through an entire roll, though, is too much for a set of 6 AA batteries. I bought a LEGO lithium battery pack, and an official LEGO charger. I place the battery in the NXT, connect the LEGO charger, wait maybe 15 minutes, turn on the NXT, and start the downloaded leJOS program that runs the roll motors, communicates via Bluetooth with the host, etc. [code available on request]
At first this seemed to solve my problem but lately I find that the NXT spontaneously shuts down. I've seen this with three separate lithium batteries, purchased across a span of 15 months, so it isn't just one bad hardware component or run of batteries. I am not sure whether the shutdown only occurs in the 3/4 second or so burst when the motors are active, moving from one frame on the roll to the next, or if it also occurs when the NXT and associated motors are 'just sitting there'. The NXT is slightly warm to the touch at this point.
Is it possible that, even though the power cord is connected to the NXT and drawing current from the mains, that I could exhaust the NXT battery level to the point where the unit would shut down? If that were the case, then:
- is there a way for me to monitor, with lejos, the power level of the battery?
has anyone ever heard of the NXT collapsing from overwork like this?
has anyone ever done away with the battery entirely, and just wired the LEGO charger output (or, if that's inappropriate, then output wires from some appropriate transformer) directly to the NXT power terminals?
It turns out it's a serious pain for me to have to restart the measurement in mid-stream, so I would really like to avoid this spontaneous shutdown if at all possible.
One last question. Is there any way a software failure could cause the NXT to completely shut down, instead of displaying the crash data (exception number, PC, etc.) on the LCD? Or is it always the case that software crashes leave the NXT powered on?
This is from a Subversion check-out about midway between the 0.7 and 0.8 releases -- svn rev 2413.
[added a moment later]
I should also mention I've seen this across four different NXT bricks, bought across a 6-month period, so it's not just a flakey NXT or batch of NXTs.
