Jump to content

JustinSchoeman

Members
  • Content Count

    151
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Thanks
    JustinSchoeman got a reaction from PaulinNorthcliff in Sunsynk 8kw Inverter   
    Just uncheck 'microinverter' and 'smartload' (if any is checked), and check 'gen charge'.  If it is an auto start generator, you can also check 'gen signal', and it will signal the generator to start under the set conditions. (NOTE: gen signal and island mode signal use the same ATS port, so you can't use auto-start generators if you are using the ATS port for an earth-neutral bonding relay.)
  2. Like
    JustinSchoeman got a reaction from YellowTapemeasure in 6kWh of cheap storage - why does no one use it?   
    Finally got my smart thermostat running (although after dark, so no solar boost yet).
    All the bits and pieces (including reverse engineering a Geyserwise TSE to use for the thermostat) are fairly well documented in the code:
    https://github.com/justinschoeman/ModbusThermostat
    Basically performs 3 functions:
    1) turn element off when system load is too high, and only turn it on again when load is fairly low (it does rely on most inverters ability to sustain temporary overloads, as it takes about 1.5 seconds to turn off the element).
    2) act as a normal thermosts.
    3) heat the water as hot as safely possible when there is excess solar electricity available (since this is a bang-bang controller, it probes by turning the element on for a few seconds and if battery draw is too high, turn it off again).

  3. Like
    JustinSchoeman got a reaction from calypso in 6kWh of cheap storage - why does no one use it?   
    Finally got my smart thermostat running (although after dark, so no solar boost yet).
    All the bits and pieces (including reverse engineering a Geyserwise TSE to use for the thermostat) are fairly well documented in the code:
    https://github.com/justinschoeman/ModbusThermostat
    Basically performs 3 functions:
    1) turn element off when system load is too high, and only turn it on again when load is fairly low (it does rely on most inverters ability to sustain temporary overloads, as it takes about 1.5 seconds to turn off the element).
    2) act as a normal thermosts.
    3) heat the water as hot as safely possible when there is excess solar electricity available (since this is a bang-bang controller, it probes by turning the element on for a few seconds and if battery draw is too high, turn it off again).

  4. Like
    JustinSchoeman got a reaction from Richard Mackay in 6kWh of cheap storage - why does no one use it?   
    Finally got my smart thermostat running (although after dark, so no solar boost yet).
    All the bits and pieces (including reverse engineering a Geyserwise TSE to use for the thermostat) are fairly well documented in the code:
    https://github.com/justinschoeman/ModbusThermostat
    Basically performs 3 functions:
    1) turn element off when system load is too high, and only turn it on again when load is fairly low (it does rely on most inverters ability to sustain temporary overloads, as it takes about 1.5 seconds to turn off the element).
    2) act as a normal thermosts.
    3) heat the water as hot as safely possible when there is excess solar electricity available (since this is a bang-bang controller, it probes by turning the element on for a few seconds and if battery draw is too high, turn it off again).

  5. Like
    JustinSchoeman got a reaction from xmorph3u5 in software for sunsynk + pylontech combo   
    Browse back in the thread:
    https://powerforum.co.za/topic/6875-software-for-sunsynk-pylontech-combo/?do=findComment&comment=84414
  6. Thanks
    JustinSchoeman got a reaction from Bloubul7 in software for sunsynk + pylontech combo   
    It is in the manual (just note that the table is incorrect - the trace labeling in the diagram below is correct):

  7. Thanks
    JustinSchoeman got a reaction from Bloubul7 in software for sunsynk + pylontech combo   
    Not much to decoding it. Sunsynk sent me the protocol document on request and it is dead simple.  Here is the code I use for reading the inverter:
    https://github.com/justinschoeman/SmarterLoad/blob/master/tx/sunsynk.h
  8. Thanks
    JustinSchoeman got a reaction from Bloubul7 in software for sunsynk + pylontech combo   
    There were no copyright notices/restrictions in the email they sent me, so I assume it is OK to post it here:
    sunsynk_modbus.docx
  9. Like
    JustinSchoeman reacted to Vassen in 6kWh of cheap storage - why does no one use it?   
    Just an update. Managed to install the sonoff sensor into the geyserwise pocket. I cut the cable, fed through the geyserwise pocket and soldered, and used heat shrink over the join. It seems to be working fine afterwards. Will hopefully swap the element tomorrow and then need to a relay or contactor and a bigger enclosure. 
     

  10. Like
    JustinSchoeman got a reaction from Richard Mackay in 6kWh of cheap storage - why does no one use it?   
    I suppose that depends on your system... If you have a Sunsynk/Deye inverter, just connect the secondary geyser to the Smart Load output and configure the trigger parameters.
    For a more universal solution you can use a PV diverter to power the secondary geyser from the grid side of a hybrid inverter.
    Otherwise you need some sort of an automation setup to do it.
    I like the two geyser setup idea, as it increases the energy storage capacity significantly. (Although for my case I will take the cheapie option and build a smart thermostat.)
  11. Like
    JustinSchoeman got a reaction from Deon in ZA in Justin's DIY battery   
    Well, I finally twisted Jaco's arm into a non-blue install, and the results are beautiful...
    With the whole house as a dummy load, I also got a chance to properly test the battery and assorted bits.
    Load peaked at 11kW before the geyser controller managed to turn the geyser off, and then stabilised at around 8kW, with 195A draw from the batteries.  After around 10 minutes, batteries, terminals and connecting plates were all still at room temperature.  The wires connecting to the inverter were however a few degrees warmer.  Glad I did not go smaller than the 70mm^2 I eventually settled on. (I have 2x 95mm^2 wires in parallel for joining the banks - and these wires also stayed cool.)
    All in all, it has turned out to be a successful experiment so far.
    Been off grid for 15 hours so far, and hope to stay that way pretty much indefinitely.



  12. Like
    JustinSchoeman got a reaction from Gerlach in Justin's DIY battery   
    Well, I finally twisted Jaco's arm into a non-blue install, and the results are beautiful...
    With the whole house as a dummy load, I also got a chance to properly test the battery and assorted bits.
    Load peaked at 11kW before the geyser controller managed to turn the geyser off, and then stabilised at around 8kW, with 195A draw from the batteries.  After around 10 minutes, batteries, terminals and connecting plates were all still at room temperature.  The wires connecting to the inverter were however a few degrees warmer.  Glad I did not go smaller than the 70mm^2 I eventually settled on. (I have 2x 95mm^2 wires in parallel for joining the banks - and these wires also stayed cool.)
    All in all, it has turned out to be a successful experiment so far.
    Been off grid for 15 hours so far, and hope to stay that way pretty much indefinitely.



  13. Like
    JustinSchoeman got a reaction from francois in Justin's DIY battery   
    Well, I finally twisted Jaco's arm into a non-blue install, and the results are beautiful...
    With the whole house as a dummy load, I also got a chance to properly test the battery and assorted bits.
    Load peaked at 11kW before the geyser controller managed to turn the geyser off, and then stabilised at around 8kW, with 195A draw from the batteries.  After around 10 minutes, batteries, terminals and connecting plates were all still at room temperature.  The wires connecting to the inverter were however a few degrees warmer.  Glad I did not go smaller than the 70mm^2 I eventually settled on. (I have 2x 95mm^2 wires in parallel for joining the banks - and these wires also stayed cool.)
    All in all, it has turned out to be a successful experiment so far.
    Been off grid for 15 hours so far, and hope to stay that way pretty much indefinitely.



  14. Like
    JustinSchoeman got a reaction from Louisvdw in Justin's DIY battery   
    Well, I finally twisted Jaco's arm into a non-blue install, and the results are beautiful...
    With the whole house as a dummy load, I also got a chance to properly test the battery and assorted bits.
    Load peaked at 11kW before the geyser controller managed to turn the geyser off, and then stabilised at around 8kW, with 195A draw from the batteries.  After around 10 minutes, batteries, terminals and connecting plates were all still at room temperature.  The wires connecting to the inverter were however a few degrees warmer.  Glad I did not go smaller than the 70mm^2 I eventually settled on. (I have 2x 95mm^2 wires in parallel for joining the banks - and these wires also stayed cool.)
    All in all, it has turned out to be a successful experiment so far.
    Been off grid for 15 hours so far, and hope to stay that way pretty much indefinitely.



  15. Like
    JustinSchoeman got a reaction from ___ in Inverters and Batteries   
    I suspect this is the new battery you suspect to be coming?
    https://lithiumbatteriessa.co.za/collections/frontpage/products/lbsa-6kwh-48v-lifepo4-wall-mount-smart-battery-2nd-life?variant=36090380091559
  16. Like
    JustinSchoeman got a reaction from Louisvdw in Justin's DIY battery   
    Code is on github.  Still needs lots of cleanups, but some bits and pieces may be useful to others (and an extra set of eyes may help catch bugs  ) :
    https://github.com/justinschoeman/dalybms
    If anybody is going to play with this, the note in the first line is important.  Need to replace stock arduino bootloader with a recent optiboot. Otherwise the hardware watchdog causes a boot loop...
  17. Like
    JustinSchoeman got a reaction from Mad Mike in Justin's DIY battery   
    LV box is almost complete. Just need to mount PSU and clean up wiring. But at least all the essentials are working, and the inverter and battery are happily talking to each orther.

  18. Like
    JustinSchoeman got a reaction from gbyleveldt in Justin's DIY battery   
    Not sure if this is the correct protocol, but it seems you can get the details directly from the inverter:
    http://yamasun.com.tw/upload/F_20170313191367UrC8jo.PDF
    Goodwe allows 50% overload for 10s, so you have 10s to shut down extra loads before the inverter shuts down everything. So you should not really need any extra hardware to make it all work.
  19. Like
    JustinSchoeman got a reaction from ___ in Justin's DIY battery   
    Again - I have not touched the PSU board - I am using the existing PSU of an existing SANS approved geyser timer.  The PSU is poly fuse protected, and has such a low maximum current that it could never pose a fire hazard, even if you replaced my circuit board with a wire from Vcc to GND.
  20. Like
    JustinSchoeman got a reaction from ___ in Justin's DIY battery   
    It is inside the existing geyser timer switch, with the housing completely intact, so no issues there.  But those look like really nice PSUs.  Will order a bunch next time .
  21. Like
    JustinSchoeman got a reaction from ___ in Justin's DIY battery   
    I am using the stock main board for the timer.  This contains the PSU + Relay.  PSU is a 2 stage - 48V capacitive dropper for the relay coil, and from there a zener regulated linear charger for a 3.2V coin cell, which is also the main power supply for the timer board.
    Seems like quite a solid design, but draw more than 500uA and you are discharging the coin cell.
    To get the controller to really low power, it is pretty much permanently shut down. Every 8 seconds the watchdog timer wakes it up. It then turns on the radio, and powers down the uC for another 15ms.  The uC then wakes up, streams any received packets from the radio, shuts the radio down, processes the packets and then goes to sleep again.
    Transmitter obviously has to transmit repetitively for up to 8s before the receiver acks, but that is no biggie.
  22. Like
    JustinSchoeman got a reaction from PJJ in Justin's DIY battery   
    Thanks for all the tips guys.  Mostly incorporated and seems to work quite well.
    Here is a preview for anybody who wants to review it for me  :
    // HIGH VOLTAGE LOGIC if(bat_maxv > BAT_MAX_V) { // over - shut off charging... Serial.println("OVERVOLTAGE!"); trg_chg_i = 0; trg_chg_v = bat_v * 10U; trg_chg_v -= (bat_maxv - BAT_MAX_V) * 200; // retard by 200mV for each mV above target... } else if(bat_maxv > BAT_DERATE_V) { Serial.println("HIGH VOLTAGE!"); // derate voltage trg_chg_v = bat_v * 10U; trg_chg_v += 16*(BAT_MAX_V - bat_maxv); // set the target voltage = current voltage + whatever is required to make the max cell full // derate current delta = bat_maxv - BAT_DERATE_V; f = delta; f /= (float)(BAT_MAX_V - BAT_DERATE_V); // (min derate) 0 < f <= 1 (full derate) f = 1.0 - f; trg_chg_i = (float)(BAT_CHG_I * 100U) * f; } else { // restore target trg_chg_i = BAT_CHG_I*100; trg_chg_v = BAT_CHG_V; } // ramp functions if(trg_chg_i < bat_chg_i) { // going down? rapid derate delta = bat_chg_i - trg_chg_i; delta /= 2; if(delta == 0) delta = 1; bat_chg_i -= delta; } else if(trg_chg_i > bat_chg_i) { // going up? very slow bat_chg_i += 1; } if(trg_chg_v < bat_chg_v) { // going down? rapid derate delta = bat_chg_v - trg_chg_v; delta /= 2; if(delta == 0) delta = 1; bat_chg_v -= delta; } else if(trg_chg_v > bat_chg_v) { // going up? very slow bat_chg_v += 2; // 500 s per volt... 50s per unit that the inverter can notice } Serial.print("bat_chg_v: "); Serial.println(bat_chg_v); Serial.print("trg_chg_v: "); Serial.println(trg_chg_v); // LOW VOLTAGE LOGIC if(bat_minv <= BAT_MIN_V) { // any cell <= minimum? shut off discharge Serial.println("LOW VOLTAGE LIMIT!"); bat_dis_i = 0; bat_soc = 0; bat_soh = 0; lv_lockout = 1; lv_lockout_ms = millis(); } else { // otherwise wait for lockout interval then release if(lv_lockout) { Serial.println("LOW VOLTAGE LOCKOUT"); bat_dis_i = 0; bat_soc = 0; bat_soh = 0; if(millis() - lv_lockout_ms >= LV_LOCKOUT_MS) { lv_lockout = 0; } } else { bat_dis_i = BAT_DIS_I * 100U; } } Still crude and messy and requires tuning.
    Inverter hates rapid changes in charge parameters and puts battery into standby... So added ramp functions, which seem slow enough to keep the inverter happy.
    Need to tweek the current derate function to make it steeper in the early stages. Otherwise works quite well so far.
  23. Like
    JustinSchoeman got a reaction from ___ in Justin's DIY battery   
    Thanks for all the tips guys.  Mostly incorporated and seems to work quite well.
    Here is a preview for anybody who wants to review it for me  :
    // HIGH VOLTAGE LOGIC if(bat_maxv > BAT_MAX_V) { // over - shut off charging... Serial.println("OVERVOLTAGE!"); trg_chg_i = 0; trg_chg_v = bat_v * 10U; trg_chg_v -= (bat_maxv - BAT_MAX_V) * 200; // retard by 200mV for each mV above target... } else if(bat_maxv > BAT_DERATE_V) { Serial.println("HIGH VOLTAGE!"); // derate voltage trg_chg_v = bat_v * 10U; trg_chg_v += 16*(BAT_MAX_V - bat_maxv); // set the target voltage = current voltage + whatever is required to make the max cell full // derate current delta = bat_maxv - BAT_DERATE_V; f = delta; f /= (float)(BAT_MAX_V - BAT_DERATE_V); // (min derate) 0 < f <= 1 (full derate) f = 1.0 - f; trg_chg_i = (float)(BAT_CHG_I * 100U) * f; } else { // restore target trg_chg_i = BAT_CHG_I*100; trg_chg_v = BAT_CHG_V; } // ramp functions if(trg_chg_i < bat_chg_i) { // going down? rapid derate delta = bat_chg_i - trg_chg_i; delta /= 2; if(delta == 0) delta = 1; bat_chg_i -= delta; } else if(trg_chg_i > bat_chg_i) { // going up? very slow bat_chg_i += 1; } if(trg_chg_v < bat_chg_v) { // going down? rapid derate delta = bat_chg_v - trg_chg_v; delta /= 2; if(delta == 0) delta = 1; bat_chg_v -= delta; } else if(trg_chg_v > bat_chg_v) { // going up? very slow bat_chg_v += 2; // 500 s per volt... 50s per unit that the inverter can notice } Serial.print("bat_chg_v: "); Serial.println(bat_chg_v); Serial.print("trg_chg_v: "); Serial.println(trg_chg_v); // LOW VOLTAGE LOGIC if(bat_minv <= BAT_MIN_V) { // any cell <= minimum? shut off discharge Serial.println("LOW VOLTAGE LIMIT!"); bat_dis_i = 0; bat_soc = 0; bat_soh = 0; lv_lockout = 1; lv_lockout_ms = millis(); } else { // otherwise wait for lockout interval then release if(lv_lockout) { Serial.println("LOW VOLTAGE LOCKOUT"); bat_dis_i = 0; bat_soc = 0; bat_soh = 0; if(millis() - lv_lockout_ms >= LV_LOCKOUT_MS) { lv_lockout = 0; } } else { bat_dis_i = BAT_DIS_I * 100U; } } Still crude and messy and requires tuning.
    Inverter hates rapid changes in charge parameters and puts battery into standby... So added ramp functions, which seem slow enough to keep the inverter happy.
    Need to tweek the current derate function to make it steeper in the early stages. Otherwise works quite well so far.
  24. Thanks
    JustinSchoeman reacted to ___ in Justin's DIY battery   
    can1 351 [6] 14 02 50 02 C8 05 can1 355 [4] 5F 00 63 00 can1 356 [6] 77 13 A9 FE 0B 01 can1 359 [7] 00 00 00 00 04 50 4E can1 35C [2] C0 00 can1 35E [8] 50 59 4C 4F 4E 20 20 20 That's a list of all the unique stuff a Pylontech battery sends. I filtered out the duplicates so you can see just the important bits.
    359 ends in 0x50 0x4E, which is the ASCII codes for PN. That's how you identify a Pylontech (this is in their official documentation, I'm not disclosing anything secret here 🙂 ). There may be some issues around legality if you send PN without being a Pylontech battery... I mean in commercial endeavours at least.
    The 04 before the PN is the number of modules in the battery. The 4 bytes before that are the alarms and the warnings (the battery I took the dump from is showing no issues, all is zero).
    This is just about the only way in which Pylontech differs from some of the others. They use 359. The others use 35A.
    Also note that 35E spells PYLON followed by three spaces.
  25. Like
    JustinSchoeman got a reaction from ___ in Justin's DIY battery   
    Sunsynk, unfortunately...  Battery charges fine with manual configuration. Only issue is when I switch to CAN BMS mode.  It gets all the data from the BMS (as you can see on the display) but does not ever switch to charge mode.
    Just busy whipping up another Arduino board to data dump the Sunsynk (via Modbus) while the other Arduino does the CAN BMS translation...
×
×
  • Create New...