FM80 solar charge controller datalogger

Thread Starter

nsaspook

Joined Aug 27, 2009
16,333
Time to wrap this thing up. Hardware, software and the system interactions are operational and stable.
1767984346220.png
1767984361758.png
1767984390361.png
1767984418069.png
1767984444362.png
1767999672228.png

https://github.com/nsaspook/mqtt_comedi
https://github.com/nsaspook/mqtt_comedi/blob/main/daq_bmc/daq_bmc.c
Code:
[    7.046099] spibmc spi1.1: spi link version 1.4
[    7.046128] spibmc spi1.1: BMCboard default: do_conf=1, di_conf=1, daqbmc_conf=0
[    7.046801] comedi comedi0: bmc protocol version 0.98
[    7.046816] comedi comedi0: 4 cpu(s) online for threads
[    7.046825] comedi comedi0: BMCBoard using chip select : 0x 1
[    7.046833] comedi comedi0: BMCboard device detection started
[    7.046847] comedi comedi0: Probing for PIC18Fx7Q84 DAQ device, SPI slave mode
[    7.046856] comedi comedi0: BMCboard SPI setup: spi cs 1: 8000000 Hz: mode 0x3: probing for controller device PICSL12
[    7.046866] comedi comedi0: 16 bit and less device buffers set to 16 bits
[    7.048069] comedi comedi0: Calibration data downloaded from board
[    7.049004] comedi comedi0: Calibration data downloaded from board
[    7.049013] comedi comedi0: Analog Out channels 1, Analog In channels 16 : Q84 config code 0x0
[    7.049021] comedi comedi0: PIC18F57Q84 DAQ device setup complete
[    7.049027] comedi comedi0: DISPLAY, RS232/TTL and device serial TX/RX channels 8
[    7.049033] comedi comedi0: Digital Out channels 16
[    7.049039] comedi comedi0: Digital In channels 24
[    7.049305] comedi comedi0: ao device thread start
[    7.088331] comedi comedi0: driver 'daq_bmc' has successfully auto-configured 'BMCboard'.
https://github.com/nsaspook/mqtt_comedi/blob/main/bmc/bmc_mqtt.c

Software for the Linux SPI protocol driver link for Comedi API DAQ for the solar devices, BMC control program in C using MQTT for Home Assistant devices and entities, and the firmware for the 57Q84.
Hardware PCB design files using Eagle
Matter over Thread router for IoT device control and monitoring on the Orange PI Zero 3 4G

1767985035680.png

1767985061457.png
 
Last edited:

Thread Starter

nsaspook

Joined Aug 27, 2009
16,333
Added more battery storage to the system for a total of 15KWh of energy storage. 10 for direct Solar storage and 5 for the energy buffer.
1776788980684.png
3/0 AWG battery wiring. Glad I dumpster dived that wiring long ago, it's expensive now.

Starting to use vscode a little more for the project.
1776789725527.png
1776789238746.png

Cleaning up the SPI slave code a bit to optimize processing time between master data bytes to increase throughput a bit.

Yellow: MASTER data request bytes spacing
Blue: SLAVE processing time per received data byte
1776794067273.png
1776794129179.png
1776789424887.png
1776789441246.png
Orange Pi Zero 3 4G kernel 6.1.31+

1776795507879.png
1776795524845.png
RPi Zero W kernel 6.12.75-v8+
 
Last edited:

Thread Starter

nsaspook

Joined Aug 27, 2009
16,333
First nice day since the BSS was upgraded.
1777078544510.png
Charged until the controller switched to float mode and then started feeding some of that energy into the house and the dump load battery bank.

1777078518330.png
 
Top