Solar Sense Firmware
The following are rough notes on the firmware workings of Solar Sense.
We have two solar sense boards. Each board does the following things:
Current sense: from hall effect sensor through ADC (entire output of the array)
ACS722 read through I2C through MCP3427
Log it
Figure out amount of power we’re getting with the array
There’s already a hardware fault for overcurrent, don’t worry about it
Relay Control: Enable / disable relay through GPIO on solenoid driver
Solar control of relay to battery (there’s other relays in the path)
If there’s ever a fault deemed to require isolation
Overtemp in array
Something really weird in MPPTs
Enable when the board is powered, if fault turn off
MPPT sense: MPPT via SPV1020 x6
Talk to it through SPI
Use a MUX to determine which to talk to
Want to read temperature, voltage and current, and fault conditions - this data is the input to the MPPTs
Fault conditions: reset - discuss faults later
Just log the data (eventually to telemetry)
Talk to hardware to determine fault levels for data
Voltage sense: coming out of MPPTs in case voltage data from MPPTs are off (bad data) - really important to know
Comes from MCP3427 x6
All connected through I2C, each has a different address, all addressable (all on same bus)
Log this voltage
Check with hardware about fault levels for voltages
Temperature sense: We have 6 thermistors going to 6 different STM ADC pins
Log this data
Have a fault threshold (ask hardware)
Only difference between two boards is that one has 5 instead of 6 MPPTs, so expected data is slightly different. Faults are the same.