diy solar

diy solar

DIY Battery via Smart shunt to inverter integration (Solis etc)

What should it be?
Lifepo4 batteries are pretty good for charging without loss, so 99% is usually ok, you can just play with it to get the battery SOC accurate, but drift does happen and i haven't found a real accurate way to keep it in sync, it's a best effort.
 
Lifepo4 batteries are pretty good for charging without loss, so 99% is usually ok, you can just play with it to get the battery SOC accurate, but drift does happen and i haven't found a real accurate way to keep it in sync, it's a best effort.
That is what I figured. Thank you!
 
I set this up with a Solis inverter and it worked perfectly for a few ours and then failed (I could see the ESP was still receiving the correct data from the smart shunt but it said it was unable to communicate on the CAN bus), so I replaced the MCP2515 board thinking that it may be the fault. It then worked again for a few hours and failed again, does anyone know what the issue may be or has anyone had a similar problem?
 
I set this up with a Solis inverter and it worked perfectly for a few ours and then failed (I could see the ESP was still receiving the correct data from the smart shunt but it said it was unable to communicate on the CAN bus), so I replaced the MCP2515 board thinking that it may be the fault. It then worked again for a few hours and failed again, does anyone know what the issue may be or has anyone had a similar problem?
No idea. Mine has been working flawless for 3 weeks now since commissioned. Might need that resistor that is optional. Someone else will be along to help im sure.
 
I set this up with a Solis inverter and it worked perfectly for a few ours and then failed (I could see the ESP was still receiving the correct data from the smart shunt but it said it was unable to communicate on the CAN bus), so I replaced the MCP2515 board thinking that it may be the fault. It then worked again for a few hours and failed again, does anyone know what the issue may be or has anyone had a similar problem?
Do you have the CS wire on the correct pin on the ESP32? Only thing I can think of is either incorrect pin (GPIO2 in the code base unless modified) or loose connections. Have you tried another cable between MCP and inverter.

I’m at two months with zero issues. Getting ready to add another 10kwh battery behind it.
 
No idea. Mine has been working flawless for 3 weeks now since commissioned.

Do you have the CS wire on the correct pin on the ESP32? Only thing I can think of is either incorrect pin (GPIO2 in the code base unless modified) or loose connections. Have you tried another cable between MCP and inverter.

I’m at two months with zero issues. Getting ready to add another 10kwh battery behind it.
Just want to thank you for standing behind this awesome DIY interface and trying to help people with it. I knew you would chime in :)
 
@Josh4 also make sure PylonProtocol is disabled. It doesn’t work as expected, having it off is perfectly fine.

@ScrotusGobbleBottom did you ever get the 100%SOC leveled out? I’ll be working on mine this week to get a little more balance time with the additional batteries.
 
@ChrisG Thank you for your help, I commented out the Pylontec line and double checked the pins and it has been working for now, but I noticed on the serial monitor it still says that it is sending the Pylontec string. How do I make sure it isn't still trying to use the pylon protocol?
 
it still says that it is sending the Pylontec string
I think it will always say that. Its just a communication thing. The switch disengages the "genuine" protocol and inserts a more generic "modified" pylon tech that causes less trouble. That is the way I think it goes anyways.
 
I think it will always say that. Its just a communication thing. The switch disengages the "genuine" protocol and inserts a more generic "modified" pylon tech that causes less trouble. That is the way I think it goes anyways.
Agreed, always says it on the serial monitor, just make sure it’s disabled.

Still having the intermittent issues @Josh4?
 
Do you have the CS wire on the correct pin on the ESP32?
If the Chip Select for the MCP2515 was incorrectly configured, the CANBus wouldn't work at all.

so I replaced the MCP2515 board thinking that it may be the fault. It then worked again for a few hours and failed again, does anyone know what the issue may be or has anyone had a similar problem?
Similar yes... I have destroyed a few CANBus adapters - see below. But... can you confirm whether you touched anything when it failed, especially connecting or disconnecting batteries or swapping and earth connection, or generally fiddling with the system?

My system is largely based on Simon's code - at least on the CANBus side of things - and has been working flawlessly since 2022 :) However, I have managed to zap a few MCP2515 modules when I have done some maintenance or generally messed with the system.

This is due to the Solis having battery -ve sitting at -195V compared to AC ground, as detailed in my thread here.


The solution will be to use a galvanically isolated CANBus adapter... or be very careful to disconnect the CANBus before making other changes.

Obviously, without more info, I can't tell whether that is your issue, but IMHO would be worth considering.
 
Agreed, always says it on the serial monitor, just make sure it’s disabled.

Still having the intermittent issues @Josh4?
I am still having intermittent issues, we managed to catch the failure happening yesterday (screenshots below), it seems to fail and then try to restart but that doesn't work. Then when we go a do a hard reset by physically pushing the button on the ESP it starts working again. Do you have any idea what might be causing this?

Failure.pngRestart.png
 
If the Chip Select for the MCP2515 was incorrectly configured, the CANBus wouldn't work at all.


Similar yes... I have destroyed a few CANBus adapters - see below. But... can you confirm whether you touched anything when it failed, especially connecting or disconnecting batteries or swapping and earth connection, or generally fiddling with the system?

My system is largely based on Simon's code - at least on the CANBus side of things - and has been working flawlessly since 2022 :) However, I have managed to zap a few MCP2515 modules when I have done some maintenance or generally messed with the system.

This is due to the Solis having battery -ve sitting at -195V compared to AC ground, as detailed in my thread here.


The solution will be to use a galvanically isolated CANBus adapter... or be very careful to disconnect the CANBus before making other changes.

Obviously, without more info, I can't tell whether that is your issue, but IMHO would be worth considering.
Thanks, I do think this could be the issue, is there a good galvanic isolator CAN chip that you used that you would recommend?
 
Thanks, I do think this could be the issue, is there a good galvanic isolator CAN chip that you used that you would recommend?
I have obtained one of these...
but not yet installed it, so I can't give any feedback yet.

As I mentioned though, I have no issues when the system is left just running.
 
Last edited:
I have a very interesting discovery to share.

So I have a 6000xp, connected to a Victron smart shunt via the can converter esp32 board discussed in this thread. I have Solar Assistant reading from the 6000xp. It all has been working very well overall. I have 2 battery banks in parallel, one 400 ah, one 280 ah.

Because of this miss match in capacities, I felt like seeing what a second smart shunt could do for me. I got it simply to help me understand why there was a wild deviation in SOC on the shunt when compared to my BMS's for instance; The shunt would actually be "right" but one BMS would say 55% and the other would say 72% and the shunt would sit there in the middle and say 64% ANYWAY, that is not what this post is about.

What I discovered is that if you have 2 shunts, when you connect them with "Victron ""SMart"" Networking, the shunts "see" each other via BlueTooth. All find and dandy, but what does that do? Well, It communicates the battery voltage to your SCC . Great. But again this post is about something much better. Yes, I am being purposfully long winded here haha.

2 Shunts, networked, report the TOTAL wattage to the EG4 6000xp. Total of both shunts. I never thought this would happen. I thought I was only going to see the output of one shunt. I thought this would be just a test and have no reason to keep both shunts connected.

Or am I completely wrong in assuming the wattage comes from the shunt and not the 6000xp ?

NOTE: You only get ONE SHUNT SOC into the 6000xp. They are not averaged. But as mentioned the current is summed.
 
Last edited:
So... in the background I've been sorting out the new testing release and almost finished it.

The victron code has been replaced with the code from victron themselves, this is now spot on perfect.

All the features are working just a bug with the comms on mqtt and it will be out, I reckon Monday at the latest as I want to check it's stable although testing so far has been fine.

Once this is done the following features are on my list -

Mqtt only bms input, this will allow integration from any bms supported through esphome, and it will include multi bms support, allowing a number of bms's to be fed in to it.

Possible multi inverter support, will have to see if my idea will work.

Stay tuned!
 
Back
Top