Inverter: Solax - dalathegreat/Battery-Emulator GitHub Wiki
[!CAUTION] Working with high voltage is dangerous. Always follow local laws and regulations regarding high voltage work. If you are unsure about the rules in your country, consult a licensed electrician for more information.
Compatible Solax inverters
- Solax X3 (all revisions)
- Solax X1 (all revisions)
â ī¸ Word of caution, CAN overvoltage â ī¸
Solax inverters can burn up CAN chips if there are differences in protective earth. Make sure the inverter and battery have a solid connection to protective earth (PE) on their casings. Also recommended to ground the communication shield wire in one end. Failure to do this will lead to the VP231 CAN transceiver chip burning up! đĨ See this diagram for more info how to connect PE
Word of caution, isolated CAN
â ī¸ This inverter does not handle a CAN connected EV battery on the same channel. If the inverter which likes to see only extended CAN frames sees standard automotive CAN frames, the inverter will enter a fault state.
This can be solved in three ways:
- You can add an isolated MCP2515 CAN channel
- You can add an isolated MCP2518 CANFD channel, and run it in classic CAN mode
- You can use the Stark CMR hardware
âšī¸ The inverter contains a 120 Ohm terminating resistor on CAN-H/L pins
âšī¸ Grounding is extremely important for Solax inverters. Make sure the battery case is connected to protective earth, and the shield part of the twisted pair CAN is connected to PE also! Failing to do this will result in CAN errors.
Compiling the software for Solax inverters
Make sure that the settings in the "USER_SETTINGS.h" file are correct. The line:
#define SOLAX_CAN //Enable this line to emulate a "SolaX Triple Power LFP" over CAN bus
Needs to be uncommented for the software to emulate the Solax protocol over CAN.
Next step is then to select the battery that you intend to use, make sure the following line is uncommented:
#define you BATTERY_TYPE_<your type of battery>
( on Dual Lilly , this will be in the board connected to the battery BMS )
After setting this up, flash the board(s)
[!IMPORTANT]
If you see a BattVoltFault fault code on the inverter, you might need to edit the CAN data content. This can happen if you use a 60S battery instead of 96S battery. Follow the steps below
- Start with checking that your battery contactors are closing, and that high voltage is present on the inverter input pins.
- If the inverter has voltage, but is still throwing the BattVoltFault error, begin with modifying the SOLAX-CAN.cpp file with a text editor, located in the
Battery-Emulator/Software/src/inverter/SOLAX-CAN.cpp
folder.
Change the #define rows at the top of the document to suit your setup
98S | 96S (default) | 75S | 56S |
---|---|---|---|
NUMBER_OF_MODULES 7 | NUMBER_OF_MODULES 0 | NUMBER_OF_MODULES 4 | NUMBER_OF_MODULES 6 |
BATTERY_TYPE 0x83 | BATTERY_TYPE 0x50 | BATTERY_TYPE 0x54 | BATTERY_TYPE 0x5B |
Feel free to experiment, and post what settings worked for your voltage range. The default values are OK for a 300-400V 96S battery.
Reverse engineering information
Some interesting findings based on dynamically changing some of the CAN values for testing:
-
The Inverter does obey the Contactor flag from the BMS (1875 byte 2) and if this is not 1 it will sit in waiting and not go into "Checking" phase and if inverter already active it will go back to "waiting" if you send 0 instead of 1 and internal contactors click (presumably open). So this could be a good initial alarm control to have less wear on the battery contactors.
-
The battery kind can be changed during normal operation and this will cause a BattVoltFault - presumably due to different voltage ranges.
-
Seems each battery kind has a different hardcoded voltage range as with 7 as number of packs only works with 0x83 (TP201)
-
Adjusting the number of packs during normal operation (from 7>6 for example) causes a BattVoltFault so seems this is being monitored constantly and not just on BMS initialisation (checking phase)
For a pack with actual voltage of 337v (21% soc) and using different Battery Kinds (1877, Byte 4)
Previously known Kinds:
- 0x50 (Blank) 6 works works - 7 does not ("About" menu has no info)
- 0x51 (BAK) 6 works
- 0x52 (REPT) 6 packs works - 5 + 7 do not
- 0x53 (SINOWATT) 6 works
- 0x54 (GOT) 3+4 works, 2, 5>10 do not work
- 0x55 (TP001) 6 works, 2>5, 7>8 do not
- 0x81 (TP200) 6 works 4/5 and 7>9 do not
- 0x82 (TP201) 6 works 4/5 and 7-9 do not
- 0x83 (TP202), 7 packs works fine and even changing it to 8 works despite being out of range (should be min 348.5v) but going lower to 6 causes battvoltfault. So it seems to prefer higher voltages than lower ones.
New Kinds Tested:
- 0x00 NA - 6 works, 0/5/7 does not
- 0x5B (TP007) 6 works 4>5 and 7>9 do not (4 was the no of packs I recorded in logs from real setup with 2 x triple batteries which reported voltage min/max of 180>262v and actual voltage of 238v at 97% SoC)
Other battery Kind ranges I checked just to see if they showed in the about menu - didnt try no of packs (sorry numbers below in Dec not HEX): 0-10 N/A 85-93: TP001>TP009 94>99: TP010 > TP015 100>128 - NA 129 - REP-T58-P1 130>139: TP201>TP210 140>160 NA
-
It doesn't seem to matter too much what voltage min/max you send on frame 1872 - if the real voltage or even voltage sent on 1873 is outside of these ranges it does not impact operation worryingly. Clearly the limits on battery kind are overriding this.
-
With battery at actual voltage at 342v inverter senses this at 336v (6v lower I dont know why). Min/Max set to 300v/399v:
-
if I send <150v it goes back to waiting (not battvoltfault)
-
if I send 151v/245v works fine
-
If you send no voltage on frame 1872 then it just stays in "Waiting" mode
-
Like others said before you dont seem to need the announce 0100a001 frame or even respond to the 1871 frame the inverter sends every 1000ms. I am sending all frames every 900ms at a non-synced interval and it plays fine.
all credits to the guys from this thread: https://secondlifestorage.com/index.php?threads/help-with-older-solax-x1-g4-firmware-ie07-batvoltfault.12493/
Connection diagram
BMS port pin 4 is CAN-H pin 5 CAN-L (for Solax X3 G4).
Troubleshooting tips
Problem | Possible fix |
---|---|
Inverter stuck in "Waiting..." | Check that high voltage is present on inverter terminals, and that polarity is right way |