Wombat Environmental Node 1.0
An environmental node for SDI-12 and digital sensors.
Loading...
Searching...
No Matches
SolarMonitor Class Reference

Solar power monitoring handler. More...

#include <solar.h>

Collaboration diagram for SolarMonitor:

Static Public Member Functions

static void begin ()
 Setup INA219 IC to monitoring battery voltage and current. More...
 
static double get_voltage ()
 Get the voltage of the solar. More...
 
static float get_current ()
 Get the current flowing from the solar panel. More...
 
static void sleep ()
 Puts the INA219 IC in a sleep mode. More...
 
static void wakeup ()
 Wakes up the INA219 IC. More...
 

Static Private Attributes

static const uint8_t solarAddr = 0x40
 Default I2C solar address (cannot be changed without modifying PCB) More...
 

Detailed Description

Solar power monitoring handler.

A INA219 IC is used to monitor solar voltage and current. When using the Adafruit_INA219 library this IC requires a 1 ohm resistor across its positive and negative inputs.

See also
Library: https://github.com/adafruit/Adafruit_INA219
Datasheet: https://www.ti.com/lit/ds/symlink/ina219.pdf?ts=1673141206831

Member Function Documentation

◆ begin()

void SolarMonitor::begin ( )
static

Setup INA219 IC to monitoring battery voltage and current.

As the solar panel has a maximum voltage of 21V a calibration factor is set to a lower resolution.

◆ get_current()

float SolarMonitor::get_current ( )
static

Get the current flowing from the solar panel.

If the IC is not initialed this function will return -1.0.

Returns
Solar current.

◆ get_voltage()

double SolarMonitor::get_voltage ( )
static

Get the voltage of the solar.

If the IC is not initialed this function will return -1.0.

Returns
Solar voltage.

◆ sleep()

void SolarMonitor::sleep ( )
static

Puts the INA219 IC in a sleep mode.

The IC will consume around 6 uA when in sleep mode.

◆ wakeup()

void SolarMonitor::wakeup ( )
static

Wakes up the INA219 IC.

Member Data Documentation

◆ solarAddr

const uint8_t SolarMonitor::solarAddr = 0x40
staticprivate

Default I2C solar address (cannot be changed without modifying PCB)


The documentation for this class was generated from the following files: