Quote:
Originally Posted by Thad House
I will check to see how low the battery voltage was getting when this was happening. I will also get the driver station logs later today. It seems like the NaVX is rebooting, because when we do the RoboRIO code restart, if we do it within 16 seconds, the navx reports its in calibration mode, just like it does on startup.
Note that this for us was not just limited to SPI. I2C had the same issue, but it happened earlier. I would guess that when it happened on I2C, it was because the pullups were being forced high by stage 1. I don't know if SPI has that same issue, but the issue seemed to happen with a much lower battery on SPI then I2C.
|
The RoboRio will remove power from the MXP connector if the unregulated VIN to the RoboRio drops below 6.3V. And it appears the RoboRio I2C/SPI busses are getting wedged with really short brownouts (though it's going to take some time to rig up some equipment so this can be characterized further).
If the navX MXP power input is removed during operation this will cause a yaw angle discontinuity - since the currently calculated yaw angle is based upon in-memory calibration coefficients.
Fortunately, the navx MXP has a USB input, and has on-board circuitry to automatically switch over to the USB input for power and a capacitor to ride-over the switching period. A comprehensive way to allow the navX MXP to continue to operate even in the face of a RobRio Stage 2 brownout is to modify a power-only USB connector (5VDC and ground leads only), and connect it to one of the VRM's 5VDC outputs. The VRM buck/boost regulator configuration allows it to provide 5VDC down to a VIN of 3.6V [per graphs in datasheet], by which time the RoboRio would have completely shutdown.
Using this approach, the navX MXP will continue to be powered even when the RoboRio VIN drops below the level where the RoboRio has completely shutdown (Stage 3).
It's possible this step alone will not resolve the issue that the RoboRio I2C/SPI circuitry is stuck after it enters Stage 2 and removes power from the MXP power rail for a brief instant. That needs more testing.
Here's the recommendation for moving ahead, please let me know your thoughts:
(a) connect the navX MXP USB (mini-b connector) to a 500mA 5VDC VRM output
(b) we'll work on reproducing the I2C/SPI bus hangs when the RoboRio reaches brownout Stage 2 for very short (e.g., 20 ms) periods of time, and forward that info to National Instruments.
(c) If (b) persists even after (a) and we can't get a resolution from NI in time, switching to the TTL UART interface is another feasible approach.