mattrude / solar-monitor

A simple solution to prevent a solar powered LoRaWAN gateway from going into brownout when the batteries drop in voltage.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Solar Monitor

A simple solution to prevent a solar powered LoRaWAN gateway from going into brownout when the batteries drop in voltages.

The Backstory

I have a solar powered Raspberry Pi + RAK2245 + RAK2013 that has a problem where when it gets cold out, the batteries don't have the Amps to power the gateway when the sun comes up. This puts the gateway into a brownout state where the cellular module disconnects and will not reconnect until the system is rebooted.

I have learned that a few minutes delay will resolve this issue, allow the batteries to charge and the system to boot correctly. This project is an attempt to automate this task.

Theory of Operation

When the voltage drops below about 3 volts, the MCP102-300E/TO will sit it's pin 2 LOW, once the voltages has stablized above 3 volts for more then 120 ms, pin 2 goes HIGH.

The PIC16F15214-I/P microcontroller reads the input from pin 2 on the MCP102-300E/TO (via pin 2 [INT] on the microcontroller) and set pin 0 LOW. When microcontroller pin 0 is LOW, the PN2222A disables the power to the output pins of the board.

Software

  • KiCad EDA - Version 6.0.2 - The Schematic & Board softare
  • MPLAB X IDE - Version 6.0.0 - Software used to build the C code
    • XC8 - Version 2.32 - The C compiler (A part of MPLAB X IDE)

Hardware (BOM)

Identifier Qty Part # Description DigiKey
U1 1 PIC16F15214-I/P Microcontroller 150-PIC16F15214-I/P-ND
Q1 1 PN2222A Transistor PN2222AFS-ND
Q2 1 MCP102-300E/TO Voltage Supervisor MCP102-300E/TO-ND
C1 1 10pF Ceramic Capacitor K100K15C0GF53L2-ND
D1 1 1N914 Diode 1N914FS-ND
RV1 1 PV36W103C01B00 10K Ohm Trimmer 490-2875-ND
SW1 1 1825910-6 Push Button - 6mm 450-1650-ND

Schematic

Schematic Rev-B

Board

The Top of the Board Board Top Rev-A

The Bottom of the Board Board Bottom Rev-A

About

A simple solution to prevent a solar powered LoRaWAN gateway from going into brownout when the batteries drop in voltage.

License:MIT License


Languages

Language:HTML 91.5%Language:Makefile 6.1%Language:C 2.4%