|
LCC Fusion Project 1.0
LCC Automation
|
Monitors voltage and current for up to two Power-CAN Cards using ADS1115 ADCs. More...
#include <LccNodePowerMonitor.h>

Public Member Functions | |
| void | begin () |
| Initializes ADS1115 devices for each Power-CAN card and the SSD1309 console if present. More... | |
| void | update () |
| Reads and prints voltage, current, and power for all detected rails. | |
| void | print () |
| Prints voltage/current/power to Serial and to OLED (if available). | |
| String | get () |
| Returns a multi-line formatted string of all power values. | |
Private Member Functions | |
| String | _fmtRow (float v_in, float v_load, float current, float power) |
| Formats a single line for the OLED console. More... | |
Monitors voltage and current for up to two Power-CAN Cards using ADS1115 ADCs.
Monitors voltage and current from up to two Power-CAN cards using ADS1115 ADCs.
The LccNodePowerMonitor class provides automatic detection and monitoring of up to two ADS1115 ADC devices connected over I2C to measure voltage, current, and power for four power rails: 40V, 12V, 5V, and 3.3V. It continuously samples the rails, computes results, and reports the values via the serial console. Optionally, it can display the measurements on an attached OLED or emulator display for real-time visualization.
The class is designed for use with Power-CAN Cards in the LCC Fusion Project and supports:
Typical usage involves instantiating a single LccNodePowerMonitor object and calling its update method regularly in the main loop to keep readings up-to-date and outputs refreshed.
This class supports automatic detection of ADS1115 devices over I2C and reports voltage, current, and power for four rails: 40V, 12V, 5V, and 3.3V. Results are printed to Serial and optionally to an OLED or emulator display.
Each card has two ADS1115s:
Voltage dividers and differential shunt readings are used for calculations.
OLED I²C Address: 0x3C
Definition at line 71 of file LccNodePowerMonitor.h.
|
inlineprivate |
Formats a single line for the OLED console.
| v_in | Input voltage before shunt. |
| v_load | Voltage after shunt. |
| current | Calculated current. |
| power | Calculated power. |
Definition at line 206 of file LccNodePowerMonitor.h.

|
inline |
Initializes ADS1115 devices for each Power-CAN card and the SSD1309 console if present.
Attempts to connect to all four possible ADS1115 addresses. Sets gain to GAIN_ONE (±4.096V) if successful. Probes 0x3C for the SSD1309 OLED and initializes OledDisplay if found.
Definition at line 80 of file LccNodePowerMonitor.h.

