6 Appendix: System Power Supply Control for the Raspberry Pi® Application
This section demonstrates a use case of system power supply control for use with a Raspberry Pi-based reference application. The process computer functionality discussed here can also be implemented on other platforms, such as one of the Shenzhen Xunlong Orange Pi™ boards.
In the demonstration, the supply control module device will control the power consumption of the Raspberry Pi board when it needs to be put in Power-Down mode. A dedicated hardware board with a PIC16F15245 microcontroller and a MIC4684 switching regulator with enable control is used for power control of the Raspberry Pi board. The hardware also contains one MCP1702T low-dropout regulator to power the PIC16F15245 microcontroller. Figure 6-1 shows the block diagram of the hardware connections for the demonstration.
In case an immediate wake-up is needed for the Raspberry Pi board, the external trigger input is provided on the PIC16F15245 Control Board.
The application functionality is similar to the implementation based on the PIC16F15244 Curiosity Nano kit detailed in Section System Power Supply Control Emulation with the PIC16F15244 Microcontroller. The process computer implementation is switched to the Raspberry Pi board and supply control module implementation is moved to the dedicated hardware setup, a PIC16F15245 control board.
As described in section Application Overview, when it is time to shut down the Raspberry Pi board, it will send out the power-down command via an I2C communication interface to the PIC16F15245 microcontroller. The PIC16F15245 microcontroller then turns OFF the voltage regulator by controlling the Enable signal to the MIC4684. This will disconnect the Raspberry Pi board from power. After turning OFF the power, the PIC16F15245 microcontroller will go down into Low Power mode. This will save a significant amount of power for the entire system. The PIC16F15245 microcontroller will turn the power back ON again when the sleep duration has elapsed, or an external trigger is detected.