For the MER rovers:
- Normal sleep is commanded by the operations team, usually as a sequence (do science operations X, Y and Z, then go to sleep). More details below. The rovers can decide autonomously to go into deep sleep. When a low power fault is triggered, the rover will automatically switch to a low-power mode and stay there until its batteries have recharged to a set threshold.
There is more than one sleep mode. Pretty soon after landing, a deep sleep mode was added to reduce nighttime power usage further than the normal sleep mode. This is done by switching off at least some of the heaters. Engineers can enable/disable certain sleep modes, and I get the impression the rover has some autonomy: it decides when to use deep sleep mode based on a set of parameters (e.g. use deep sleep if certain thresholds are met, otherwise use normal sleep).
Power management is part of the daily activities for the rover's engineering team.
Sleep:
The solar powered rovers require a “sleep mode” to recharge the batteries each sol. Sleep mode includes powering off the rover avionics, including the Central Processing Unit (CPU), so the hardware must maintain the safe thermal and power states. Communication requires flight software, so the rover must reliably wake from sleep mode and initiate communication, without intervention from the operations team.
Deep sleep:
a flight software modification that would purposefully remove the batteries from the power bus at night and power off all of the devices, including the BCB and survival heaters.
... autonomously boots up the vehicle at 18:30 LST each night to pull the batteries offline. The reason the algorithm does not remove the batteries from the power bus whenever any shutdown occurs, is that the BCB hardware fault protection will put the batteries back online when it detects the bus voltage dropping as the sun sets. So the deep sleep algorithm has to wait for the sun to set low enough that no current is available from the solar arrays. The operations team can temporarily disable deep sleep mode if an early morning UHF communication window is scheduled.
BCB = Battery Control Board.
Entering and exiting sleep mode:
Shutdown refers to shutting down the CPU and the avionics. The BCB stays powered, as well as the mission clock and alarm clock. Warm-up heaters and two of the science instruments may also stay on while the rest of the rover sleeps.
During nominal operations, the operations team designs sequences that command shutdowns and include wakeup times to resume the sequence. Upon each commanded shutdown, flight software examines the desired time to resume the sequence and the time of the next communication window, and then sets the alarm clock to the earlier time.
Two triggers may wake up the rovers: Solar wakeup or the alarm clock. The BCB declares the solar wakeup after the solar array current has been greater than 2.0 amps for over 10 minutes (and at least 16 hours have passed since the last solar wakeup). The BCB responds to either wakeup signal by turning on the CPU.
Precautions: the rover is parked to maximize the amount of power the solar array can provide. In the winter, this means parking on an incline.
Not really. A dust storm maybe, but that will just trigger a move to deep sleep at some point.
Curiosity is a bit different, because its power supply is more constant. It still requires sleep modes because the RTG cannot supply as much power as the rover requires during driving, so it needs to charge its batteries regularly.