diy solar

diy solar

Cal's DIY BMS

I got the CAN Bus completed and installed.

P1003552.JPG

To the right is the ESP32 processor board. Mounted on the board is the CAN Bus transceiver SN65HVD230, an opto isolator and a power mosfet that disables fridge power in case of a thermal runaway. Signal/communication wires connected to the board are:

1. INA219 (current sensor) along with a 15A shunt that measures solar current.
2. Differential opamp circuit board, that connects to a PT100 temperature sensor. The sensor measures fridge boiler temperature (about 220 C). The ESP32 ADC converts the temperature voltage to temperature.
3. There's about 20 feet of CAN bus cable connecting this board to the DIY BMS.

CAN communications are sent every 4 seconds. Fridge temperature, solar current, solar coulomb counter and fridge power status data are stored on the data logger.

There are two dc/dc converters in the photo. The upper dc/dc drops battery voltage to 5V for the ESP32 board. The smaller dc/dc drops battery voltage to 3.3V to power the differential opamp circuit.
 
Nice work!

The INA219 has worked pretty well for me in some limited shunt measurement experiments.

May I ask, how has your experience been dealing with the zero offset and scale calibration?

I had a little challenge with the zero offset with a shunt rated for a few hundred amperes. Could have been my wiring. Might be misremembering. Actually I think it was an NAU7802 which was meant for load cells, lol. Either way, curious about how the INA219 has been performing for you :)
 
I don't like the INA219. I would rather use INA226. I ran out of INA226 and had some INA219 at hand. Therefore, by default I used the INA219. The main reason not liking the 219 is that it requires a high-side shunt location. I like to keep shunts on the ground side of the circuit. That said, I was able to operate the 219 on the ground side. It just can't measure bus voltage, A voltage reading would output the voltage across the shunt. I'm not interesting in measuring the voltage at the output of the SCC, as it's just about battery voltage. I have that measurement already.

The INA219 came with a 0.1 ohm shunt soldered on the small circuit board. That only provides a 3.2A current range. I removed the 0.1 ohm shunt and replaced it with a 15A, 75 mV (5 mOhm) shunt.

I'm using the INA219_WE library. It does not fully work with the AliExpress purchased INA219. I can't program the gain. The library gain options are:

GainShunt Voltage RangeMax Current @ 0.1 ohm shunt
PG_4040 mV0.4 A
PG_8080 mV0.8 A
PG_160160 mV1.6 A
PG_320320 mV3.2 A

PG_320 is the default setting. I was unable to change the setting to PG_80 (or any other setting). Therefore I'm stuck with PG_320. Since the new shunt resistance is 20 times smaller than the 0.1 ohm shunt, I multiply the current reading by 20 to get actual current. Measurement resolution is still good enough.
 
I'm using a ZEVA BMS and had the same experience with poor shunt accuracy. It uses a TI AMC1200 shunt isolation amplifier which only connects to an 8 bit Atmega16 pin so cannot read anything below about 150mA with a 100A shunt. Would be much worse with a larger shunt.
I tried designing a better BMS using an INA229, 20 bit ADC but for some reason on the test bench it seems to either be getting damaged or shutting down. I'm using voltages well below the stated 85V limit. Very disappointing, otherwise I have a working BMS prototype that is functional in all other respects.
 
First solar data from the BMS datalogger of my 16-year old 130W, 12V Kyocera panel.

Solar I & Ah.jpg

Solar current (blue plot) has y-axis to the left while solar Ah (red plot) has y-axis to the right. x-axis is time in minutes. Shown are 4 days of operation. A couple days of rain and a couple days of semi-clouds. The Ah counter resets to zero after 20 minutes when measuring continuous zero current. The third day was best with 19.3 Ah. The panel (located on my motor home) is sloped to the north.
 
Back
Top