diy solar

diy solar

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

Overall happy to report this is working. I may start another thread on this, know some others would be interested this project with the new EG4 Lux inverters that are out.
I have a 6000XP and ordered all the stuff the other day. I'm just waiting for the esp32 that should arrive tomorrow. I wasn't sure if this would work with the XP since I couldn't find anyone or any info on how to accomplish this. I'm excited now that I see you have it up and running
 
I have a 6000XP and ordered all the stuff the other day. I'm just waiting for the esp32 that should arrive tomorrow. I wasn't sure if this would work with the XP since I couldn't find anyone or any info on how to accomplish this. I'm excited now that I see you have it up and running
Yeah. Really pumped and good luck. Just note the GPIO pins for your esp board. My batteries were at a 60ish %state of charge so I had to play with the manual soc setting Victron app. Wanted it to charge to 55.6 to get some balancing in then hit the Sync 100% Soc button in the Victron app. Charging stopped in a few seconds then started discharging. This is definitely working. I have other esp devices that send JK BMS info to Home Assistant so I can monitor the cells. I only wanted a single Shunt reporting to 6000xp, no matter how many DIY batteries are behind it.

Next step is to do a real PCB instead of the wires connecting everything.
 
Yeah. Really pumped and good luck. Just note the GPIO pins for your esp board. My batteries were at a 60ish %state of charge so I had to play with the manual soc setting Victron app. Wanted it to charge to 55.6 to get some balancing in then hit the Sync 100% Soc button in the Victron app. Charging stopped in a few seconds then started discharging. This is definitely working. I have other esp devices that send JK BMS info to Home Assistant so I can monitor the cells. I only wanted a single Shunt reporting to 6000xp, no matter how many DIY batteries are behind it.

Next step is to do a real PCB instead of the wires connecting everything.
I got all the stuff minus the resistors. They weren't on the list of stuff and I didn't see them in the original pictures in the forum, but I see them listed on a diagram. Did you have to use the resistors? Do you have any better pictures of the wiring? Or a better drawing? It's hard to see what wires are on which terminal in all the pictures I've looked at.
 
I got all the stuff minus the resistors. They weren't on the list of stuff and I didn't see them in the original pictures in the forum, but I see them listed on a diagram. Did you have to use the resistors? Do you have any better pictures of the wiring? Or a better drawing? It's hard to see what wires are on which terminal in all the pictures I've looked at.
Did you mean this diagram?...
.
esp32-gif.170217

...if so, I don't know why that was posted in this thread, it is not useful.

The potential divider shown there is if you need to convert from a 5V input signal to the 3.3V of the ESP32; that is not needed for the Victron SmartShunt as it uses 3.3V signal already.

The 4K7 pull-up resistor shown in that diagram is for connecting a temp sensor like a DS18B20 using the Dallas OneWire interface - if you are don't need to measure temperature then you don't need that resistor.
 
I didn’t use any resistor and I use an external 5v power source plugging into my ESP32 usb.
My circuit loosely follows the below diagram between ESP32 and MCP2515 but I did not change the code and CS wire goes to GPIO2 or D2 on my esp32. You need to find the pinout of your specific esp32, they are all a little different.

IMG_4816.jpeg
 
Did you mean this diagram?...
.
esp32-gif.170217

...if so, I don't know why that was posted in this thread, it is not useful.

The potential divider shown there is if you need to convert from a 5V input signal to the 3.3V of the ESP32; that is not needed for the Victron SmartShunt as it uses 3.3V signal already.

The 4K7 pull-up resistor shown in that diagram is for connecting a temp sensor like a DS18B20 using the Dallas OneWire interface - if you are don't need to measure temperature then you don't need that resistor.
Yes, it confused me after looking at everything else and reading.
 
I've been messing around trying to learn visual studio and how to edit the code and have gotten this far. It seems like I have everything flashed to the esp32 and it is communicating. But, when I hook it to the inverter, it doesn't post the values. Is there a way to check what's wrong in visual studio to see what's being reported from the victron?
1000006425.jpg
 
I've been messing around trying to learn visual studio and how to edit the code and have gotten this far. It seems like I have everything flashed to the esp32 and it is communicating. But, when I hook it to the inverter, it doesn't post the values. Is there a way to check what's wrong in visual studio to see what's being reported from the victron?
View attachment 202519
I wouldn't hook to inverter yet, make sure you're getting the expected values out of the shunt. It will have a few things like SOC, voltage, etc.
 
I got it to report the info frommthe victron, but it is still not reporting the social to the inverter. I must have something wrong between the esp32 and the can. I don't in the code where you set which pins the sck, s0 and s1 land. I tried to gonoff the diagram posted, but that didnt work. 1000006426.jpg
 
In that one diagram, who ever drew it, had the CS wire going to GPIO5. The code in CANBUS.h has it going to GPIO2. Look up the GPIO to pinout on your esp board, make sure that is correct. Might as well map all of them while you're at it.

Example, here is my board GPIO to PIN. Yours may be different, I found this one in a box.
 

Attachments

  • Image.jpeg
    Image.jpeg
    71.5 KB · Views: 8
In that one diagram, who ever drew it, had the CS wire going to GPIO5. The code in CANBUS.h has it going to GPIO2. Look up the GPIO to pinout on your esp board, make sure that is correct. Might as well map all of them while you're at it.

Example, here is my board GPIO to PIN. Yours may be different, I found this one in a box.
I got it working for a few minutes, now it's saying the recieved data is incorrect. Any ideas? Does that mean I need to add a resistor? It seems odd because it worked fine for a couple minutes.
 

Attachments

  • 20240318_204043.jpg
    20240318_204043.jpg
    460.4 KB · Views: 7
I got it working for a few minutes, now it's saying the recieved data is incorrect. Any ideas? Does that mean I need to add a resistor? It seems odd because it worked fine for a couple minutes.
No loose connections? Are you using a jumper on J1?

1710810604960.jpeg
 
Also looks like the ESP can’t access the WiFi access point.
I set it up at my house but was using it at my sister's and didn't change the wifi to her access point. Does it need a internet connection to operate? I didn't think it did.
 
No loose connections? Are you using a jumper on J1?
It looks like the 'received data' error is not getting the data from the SmartShunt correctly, rather than an issue on the CANBus side of things.
 
We’re up at our cabin now, I can try compiling and deploying with wrong WiFi, see what happens. Can’t get to this till tomorrow.
Good news Chris! I got my thingamajig doing its thing in the 6000xp!
Got my SOC, charge/discharge parameters ect all doing good.
Only interesting thing that happened was got it all hooked up, turned on grid, and as soon as I did the 6000xp said EPS overload with frowny face.
The discharge limit was at ZERO lol
I didnt even know how to change that. I read thu all the relevant post many times and no one explicit said that you can simply log into the ip address of the esp32 and change things LOL I just tried it and it worked hahah

Thats why the wifi is there.
 
Last edited:
Good news Chris! I got my thingamajig doing its thing in the 6000xp!
Got my SOC, charge/discharge parameters ect all doing good.
Only interesting thing that happened was got it all hooked up, turned on grid, and as soon as I did the 6000xp said EPS overload with frowny face.
The discharge limit was at ZERO lol
I didnt even know how to change that. I read thu all the relevant post many times and no one explicit said that you can simply log into the ip address of the esp32 and change things LOL I just tried it and it worked hahah

Thats why the wifi is there.
@ScrotusGobbleBottom Wait. I didn’t know you can log into it over WiFi and change things. How the heck do you do it??? I thought Wi-Fi was there only for getting mqqt messages sent and data to home assistant.
 
Last edited:
Back
Top