Skip to content

This example demonstrates a supply control module implementation, which controls power supply to a system through voltage regulator using the PIC microcontroller. Compatible PIC16F152xx family of MCUs are PIC16F15214,PIC16F15223,PIC16F15254,PIC16F15276

License

Notifications You must be signed in to change notification settings

microchip-pic-avr-examples/pic16f15245-system-power-supply-control-module-mplab-mcc

Repository files navigation

MCHP

System Power Supply Control Module using PIC16F15245 Microcontroller

Introduction

This code example demonstrates system power supply control for the Raspberry Pi based application using PIC16F15245 Control board. For more details refer section 6 “Appendix: System Power Supply Control for the Raspberry Pi Application” of application note “Using PIC16F15244 Microcontrollers for System Power Supply Control”, which provides implementation and demonstration details based on Raspberry pi board.

For PIC16F15244 Curiosity Nano kit based implementation, refer System Power Supply Control Module Emulation using PIC16F15244 Microcontroller and Process Computer Module Emulation using PIC16F15244 Microcontroller GitHub code examples.

Related Documentation

Demo Description

In this demonstration, PIC16F15245 control board is referred as supply control module which controls 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. Below figure shows the block diagram of the hardware connections for the demonstration.

Software Used

Hardware Used

  • PIC16F15244 Curiosity Nano Evaluation Kit EV09Z19A

Demo Setup:

Demo Operation:

For demonstration PIC16F15245 Control board and Raspberry Pi 4 boards are used. Raspberry Pi board is programmed using python programming language and flash the program which is attached above the code example. Flash the firmware to the PIC16F15245 control board using MPLAB PICkit 4 programmer device. Connect keyboard externally to the Raspberry pi board through USB port, to enter power down command. The following points explains about functionality of the application.

  1. Enter the I2C command using keyboard connected to the Raspberry pi board. In this code example, command consists of an ASCII characters , for example: enter command “S007200’” , character ‘S’ is for cross platform support and 7200 represents seconds or two hours of power down mode.
  2. Raspberry pi board transmits the I2C command to the PIC16F15245 control board through I2C peripheral.
  3. After transmitting the command, raspberry pi enters software shut down mode.
  4. PIC16F15245 Control board waits for 30 secs before turning OFF the voltage regulator to the Raspberry pi board.
  5. Once the waiting period is completed, PIC16F15245 control board turns OFF the voltage regulator to the Raspberry pi board and enters the sleep mode.
  6. After power down period is completed, PIC16F15245 control board wakes up from the sleep and enables the voltage regulator to the raspberry pi board.

Conclusion:

This code example presents developers with an overview of how an 8-bit microcontroller can be used to improve the power consumption of a process computer, such as an SBC. As a use case for system power supply control Raspberry Pi based reference application is demonstrated here.

About

This example demonstrates a supply control module implementation, which controls power supply to a system through voltage regulator using the PIC microcontroller. Compatible PIC16F152xx family of MCUs are PIC16F15214,PIC16F15223,PIC16F15254,PIC16F15276

Resources

License

Stars

Watchers

Forks

Packages

No packages published