Hello! I would like to have some inputs from folks that uses the Midnite Classic AUX1 interface to drive a generator based on SOC's levels. I've been using the Magnum Energy MS4448PAE with AGS and BMK to drive my Kohler 14RCA generator without issues when I was using Lead/Acid battery bank. Since I switched to LifePO4, the accuracy/precision of the Magnum modules aren't workable trying to start the generator when the SOC goes below 20% and stop when 30% is reached. It would repeat until the sun takes over. The system is in my cottage and is autonomous.
Up until now, I have developed my own generator manager using a Raspberry Pi (https://github.com/qcda1/MagAGS) and it works like a charm. Now, I'm selling my off-grid cottage and would like to simplify the setup for an non IT/Engineering buyer.
In looking for options, I just learned the Classic can drive a generator on SOC with the WbJR since firmware 2193. I found this in the Menu Map document I inadvertently opened on the page shoing the AUX1. I had an old user manual that didn't covered this feature.
I looked at this forum for any leads. I only found some discussions related to the time this option was in development. I couldn't find any tips in setting this up although it looks quite simple.
I experimented with the option without success. The Classic is at 2193 02/06/2018, the MNGP at 2186 11/29/2017.
The setup is for AUX1: SOC % High, Low%=93, High%=95, Delay=1.0, Hold=1.0. On Aux1, I have a relay that drive a lamp. The lamp will get on and of when the Aux option goest to Manual ON and Manual OFF. It will blink with the Toggle Test.
At night, the SOC will drop under 93% and will go up to 100% in a sunny morning. Unfortunately the state of the lamp does not change and stay off.
Am I missing something? Following are captures of the chapter about Aux1 and the menu option I have set.
Thanks for helping me.
Regards,
Daniel.
Ok. So the first test was yesterday morning at the same time I did the setup. But in the evening between 22h40 and 00h20 (the time the SOC was at 93%), the light lit. No this morning, it was cloudy so I lowered the uppper limit to 93% instead of 95%. The light went off at 93%. So it seem to work and the changes seem to be in effect after the auto reboot at midnite...
We'll see in the next few days how it goes. I set the limits from 92% to 96%.
Are you setting this up via MNGP or using the Local Status app ?
I know there were a few bugs in the Local Status app for some things in the past - not sure if that is one of them.
So if using the MNGP that is probably best for setup to test.
Larry
Good morning Larry! Yes it is configured using the MNGP. I don't use the local app. I had to remove my test lamp setup yesterday and put it back yesterday night. I also set the SOC set points to 90 and 93%. This morning, the SOC went down to 90% and the light didn't light up. I looked at the setup and realized the Delay was at 10,0. I changed to 1,0. I also changed the Aux option to manual on to test the light and it went on. Going back to the SOC setpoint, they were at 93 and 95%, the values they were at yesterday before my last change. So I put it back to 90 to 93%, put back the Aux option to SOC% Low and the light lit... I'll leave it as is for today. It is cloudy and I believe the SOC will reach 93% later today. I'm leaving the cottage for home today and will be back on the weekend.
It looks like the changes of the setpoints are not activated right away...
One thing I'll try is to find what are the register addresses that store the configuration and the AUX states. I saw that the setpoint values are not in the Register map document and when I dump the whole registers, I see that the setpoints are in place of other values in the map...
Anybody have an updated register map document that would match the latest firmware of the units?
Best regards,
Daniel.
here is a info on starting generator with Aux1
https://www.midnitesolar.com/faqList.php?faq_ID=145&parent_ID=2&faqCat_ID=51&faqCatName=Classic%20Charge%20Controller&showAnswer=true&subCatName=Aux+Inputs
Larry
Oh nice! Thanks for the tip. I'm back to the cottage and will test tomorrow morning. Will use %SOC low of 93% and %SOC high of 95% to test the cycle. Aux1 drives a lamp for testing. We'll se how it goes.
BTW, I added a little tool that helps in understanding what are the contents of the Classic's registers.
You can find it at: https://github.com/qcda1/MidniteClassic/tree/main/tools
And happy 4th of July and 250th!!!
Regards,
Daniel.
//4371 WizBangJrRawCrcAndtemp
(uint16_t*) &WizBangJrRawCrcAndtemp, // (CRC << 8) | Temp Clone of 4104
//4372 BattMonSOC (Dupe of InfoFlagsBits3 momentarily)
(unsigned short*) &BattMonSOC, //WAS WzBangJrCrcTime for test 4250
//4373 WbJrAmpHourChrg
(unsigned short*) &UNIT_Reserved, //WAS WbJrAmpHourChrg (Moving for Karl 11-9-2015)
//4374 WbJrAmpHourChrgadj
(unsigned short*) &UNIT_Reserved, //AH remaining 331 WAS WbJrAmpHourChrgadj (Karl)
//4375 WbJrAmpHourDisChrgadj
(unsigned short*) &WbJrAmpHourDisChrgadj, //WAS WbJrAmpHourDisChrgadj (Karl move)
//4376 WbJrAmpHourRemaing
(unsigned short*) &WbJrAmpHourRemaing, //NET Chrg-Dischrg 237, now 238 ah for Ryan's 220AH
//4377 WbJrAmpHourDisChrg
(unsigned short*) &WbJrAmpHourDisChrg, //WAS WbJrAmpHourDisChrg (Karl move)
//4378 BatCapacityTrefMBus
(unsigned short*) &BatCapacityTrefMBus, // BatCapacityTrefMBus
//4379 WbJrBatAhrCompPcntMBus
(unsigned short*) &WbJrBatAhrCompPcntMBus, //WAS WbJrBatAhourCompMBus
//4380 BattCapacityAhrs
(unsigned short*) &BattCapacityAhrs, //Temp Compensated Capacity (output)
//4381 DeltaBatTempC
(unsigned short*) &DeltaBatTempC, //UNIT_Reserved Temp debug
//4382 dispAvgWbJrAModbus
(unsigned short*) &dispAvgWbJrAModbus, //always positive.
//4383
(unsigned short*) &UNIT_Reserved, // 7-16-2014 (avgWbJrADenom ?) WAS FactoryEnableFlags
//4384 LAST MNGP data register sent as of 10-21-2022
(unsigned short*) &dispAvgBattemp, //UNIT_Reserved Temp debug = 1023 when unplugged dispAvgBattemp
//4385
(unsigned short*) &BATTtemperature, //UNIT_Reserved Temp debug
/* AZT -- added these WDT_LR debug registers (Moved by boB) */
//4386 DabtU32Debug05
(unsigned short*) &DabtU32Debug05, // Low WDT_LR (5D2C) (927F)
//4387 DabtU32Debug05
(uint16_t*) (((uint8_t*) &DabtU32Debug05) + 2), //High WDT_LR (9138) (CA7F)
//4388 UNIT_Reserved 4388 was last address sent from MNGP as of 10-21-2022
(unsigned short*) &UNIT_Reserved, //WAS avgWbJrADivShift 4388 Can MNGP stop sending this?
//4389 WzBangJrCurrent32Signed
(unsigned short*) &WzBangJrCurrent32Signed, //UNIT_Reserved
//4390
(unsigned short*) &lpOutReduced,
//4391
(unsigned short*) &lpOut,
//4392
(unsigned short*) &WzBngJrCrntSignedModbusIntrnl, // Temp debug
//4393 FactoryEnableFlags
(unsigned short*) &FactoryEnableFlags, //Moved from 4383
//4394 VabsUnderShootCalcDenom
(unsigned short*) &VabsUnderShootCalcDenom, //This is all @ 1-30-2014 CalcDenom 11-1-2022
//4395
(unsigned short*) &SchedTimer23, // SchedTimer23, //SchedTimer23PeakLast
//4396 SchedTimer23Peak
(unsigned short*) &SchedTimer23Peak,
//4397
(unsigned short*) &SchedTimer23PeakTIME,
//4398 FactoryVpvOffset
(unsigned short*) &FactoryVpvOffset, // 6-27-2014
//4399
(unsigned short*) &Init_app_rev_ROM, //This is all @ 2-15-2014 UNIT_Reserved 1700
//4400
(unsigned short*) (uint16_t*) (((uint8_t*) &Init_app_rev_ROM) + 2),
//4401
(unsigned short*) &Init_app_rev_EErd, //temporary test ? 1890
//4402
(unsigned short*) (uint16_t*) (((uint8_t*) &Init_app_rev_EErd) + 2),
//4403
(unsigned short*) &WbJrSaveCnt, //UNIT_Reserved TEST
//4404
(unsigned short*) &SanityPwrChkCnt, //UNIT_Reserved TEST WAS SanityPwrChkCnt
//4405 WbJrGlobalLimitIRef
(unsigned short*) &WbJrGlobalLimitIRef, //This is all 4405 @ 8-18-2014
//4406
(unsigned short*) &UNIT_Reserved, //This is all 4406 @ 12-17-2014
//4407 WbJrAmpHourChrg (Moving for Karl 11-9-2015) Adding 6 regs +2Rsrvd
(unsigned short*) &WbJrAmpHourChrg,
//4408
(unsigned short*) (uint16_t*) (((uint8_t*) &WbJrAmpHourChrg) + 2),
//4409 WbJrAmpHourDisChrgadj (Moving for Karl 11-9-2015)
(unsigned short*) &WbJrAmpHourDisChrgadj,
//4410
(unsigned short*) (uint16_t*) (((uint8_t*) &WbJrAmpHourDisChrgadj) + 2),
//4411 WbJrAmpHourChrgadj (Moving for Karl 11-9-2015)
(unsigned short*) &WbJrAmpHourChrgadj,
//4412
(unsigned short*) (uint16_t*) (((uint8_t*) &WbJrAmpHourChrgadj) + 2),
//TEST REGS BELOW HERE 2-14-2016 Duplicate of 4147
//4413 BulkLimitI
(unsigned short*) &BulkLimitI, //Line6675Mbus4413 Test 4 Karl 11-10-2015
//4414 WbJrGlblIlimitCnt100ms
(unsigned short*) &WbJrGlblIlimitCnt100ms, //Line6693Mbus4414
//4415 IbattDisplayOverRide
(unsigned short*) &IbattDisplayOverRide, //Line610Intbus4415
//4416 WbJrCurrentOverRide
(unsigned short*) &WbJrCurrentOverRide, //Line624Intbus4416 WzBangJrCrntSignedModbus
//4417 SlidingILimitRD
(unsigned short*) &SlidingILimitRD, //Line6801Mbus4417 Dup SlidingILimitRD for test
//4418 WzBangJrCrntSignedModbus
(unsigned short*) &WzBangJrCrntSignedModbus, //Line6781Mbus4418 Dup WzBangJrCrntSignedModbus for test
//4419 WbJrGlobalLimitIRef MOVED to 4405
(unsigned short*) &WbJrGlobalLimitIRef, //WbJrGlobalLimitIRef 2-1-2016
//4420 IbattDisplaySi_mbus
(unsigned short*) &IbattDisplaySi_mbus, // WbJrGlblIlimitCnt100ms
//4421 UNIT_Reserved
(unsigned short*) &InfoFlagsBits3, //UNIT_Reserved
//4422 FetTemp5AmpDerateCount
(unsigned short*) &UNIT_Reserved, //2-13-2016 DerateCount
//4423 FetTempOverRide
(unsigned short*) &FetTempOverRide, //UNIT_Reserved Degrees C
//4424 LastDerateAmp
(unsigned short*) &LastDerateAmp, //UNIT_Reserved
//4425 LegacySweepFaster Added 5-28-2019 for Ryan and Sunspec SPD cuz SPD works in Legacy
(unsigned short*) &LegacySwpFaster, //If 0, normal. If not, boost speed
//4426 DailyLoVbatt Added 6-3-2019 for me for testing
(unsigned short*) &DailyLoVbatt,
//4427 DailyLoVbattTimeS Added 6-3-2019 for me for testing
(unsigned short*) &DailyLoVbattTimeS,
//4428 WbJrEndingAmpsXeededTimerSec WAS Low battery temperature limit 8-19-2022
(unsigned short*) &WbJrEndingAmpsXeededTimerSec, //For debugging 11-1-2022
//4429
(unsigned short*) &UNIT_Reserved,
#if 0 // No more trying VbattCalTabl in or out as of 10-24-2022
// 4430 through 4441 will be Vbatt calibration 8-25-2022 VbattCalTableOut
(unsigned short*) &VbattCalTableIn +0, //4430
(unsigned short*) &VbattCalTableIn +1, //4431
(unsigned short*) &VbattCalTableIn +2, //4432
(unsigned short*) &VbattCalTableIn +3, //4433
(unsigned short*) &VbattCalTableIn +4, //4434
(unsigned short*) &VbattCalTableIn +5, //4435
(unsigned short*) &VbattCalTableOut +0, //4436
(unsigned short*) &VbattCalTableOut +1, //4437
(unsigned short*) &VbattCalTableOut +2, //4438
(unsigned short*) &VbattCalTableOut +3, //4439
(unsigned short*) &VbattCalTableOut +4, //4440
(unsigned short*) &VbattCalTableOut +5, //4441
#endif
//4430 Re-Numbering MB addresses 10-24-2022
(unsigned short*) &BattChemType4Vmm, //1,2,3,4 BattChemType4Vmm move to
//4431
(unsigned short*) &VbattForTableIn,
//4432
(unsigned short*) &VbatCalOut,
//4433
(unsigned short*) &UNIT_Reserved, //Last one 8-30-2022 WAS 4445 10-24-2022
--
??boB??
Here is a list of registers (address) around the area of the WB Jr.
3:53 PM
(unsigned short*) &DabtU32Debug04, // Low spsr 0000
// (unsigned short*) &SchedTimer15,
//4347
(uint16_t*) (((uint8_t*) &DabtU32Debug04) + 2), //High half spsr E10F
// (unsigned short*) &SchedTimer16,
//4348 UpTimeI
(unsigned short*) &UpTimeI, // WAS SchedTimer17 UpTimeI
//4349 UpTimeI high half
(uint16_t*) (((uint8_t*) &UpTimeI) + 2), // WAS SchedTimer18 UpTimeI
//4350
(unsigned short*) &SchedTimer19,
//4351
(unsigned short*) &CrcNetWrkg, //crc16( (char *) 0x8000, 32768); //all of networking
//4352
(unsigned short*) &CrcApp, //crc16( (char *) 0x10000, 150000); //all of the app
//4353
(unsigned short*) &ClearLogsCat, //ClearLogsCat 3-28-2013 (WAS SchedTimer22)
//4354
(unsigned short*) &ClearLogsCounter10ms, //WAS SchedTimer23 TEMP ClearLogsCounterms
//4355 SchedTimer23
(unsigned short*) &SchedTimer23, //SchedTimer23PeakLast
//4356 WizBangRxBufferTempSh1
(unsigned short*) &WizBangRxBufferTempSh1,
//4357
(unsigned short*) &WizBangRxBufferTempSh2,
//4358
(unsigned short*) &WizBangRxBufferTempSh3,
//4359
(unsigned short*) &WizBangRxBufferTempSh4, // WbJrCalcCRC8
//4360 WbangJrCmdS
(unsigned short*) &WbangJrCmdS, // UNIT_Reserved WbangJrCmdS ( | WbJrCalcCRC8 << 8) ?
//4361 WizBangJrRawCurrent
(unsigned short*) &WizBangJrRawCurrent, //temporarily here 9-9-2013 Raw is negated
//4362 WbJrNumeratorSS
(unsigned short*) &WbJrNumeratorSS, // zero 0 normally
//4363 EqCallTrak
(unsigned short*) &EqCallTrak, //wAS UNIT_Reserved TomC. 0x01DC (200) 72.253.151.23:3900
//4364 4365 WbJrAmpHourPAadj
(unsigned short*) &WbJrAmpHourPAadj, //WbJrAmpHourPAadj 9-20-2013
(uint16_t*) (((uint8_t*) &WbJrAmpHourPAadj) + 2), //INT 32 POSitive WB Jr. Amp-Hours
//4366 4367 WbJrAmpHourNAadj
(unsigned short*) &WbJrAmpHourNAadj, //WbJrAmpHourNAadj 9-20-2013
(uint16_t*) (((uint8_t*) &WbJrAmpHourNAadj) + 2), //INT 32 NEGative WB Jr. Amp-Hours
//4368 4369 WbJrAmpHourAadj
(unsigned short*) &WbJrAmpHourAadj, // WbangJrAmpHours32 9-9-2013
(uint16_t*) (((uint8_t*) &WbJrAmpHourAadj) + 2), // NET WB Amp-Hours (resettable at night if selected)
//4370 WzBangJrCrntSignedModbus WzBangJrCurrent32Signed (Displayed Current)
(uint16_t*) &WzBangJrCrntSignedModbus, //WAS WzBangJrCurrent32Signed Clone of 4103
//4371 WizBangJrRawCrcAndtemp
(uint16_t*) &WizBangJrRawCrcAndtemp, // (CRC << 8) | Temp Clone of 4104
//4372 BattMonSOC (Dupe of InfoFlagsBits3 momentarily)
(unsigned short*) &BattMonSOC, //WAS WzBangJrCrcTime for test 4250
//4373 WbJrAmpHourChrg
(unsigned short*) &UNIT_Reserved, //WAS WbJrAmpHourChrg (Moving for Karl 11-9-2015)
//4374 WbJrAmpHourChrgadj
(unsigned short*) &UNIT_Reserved, //AH remaining 331 WAS WbJrAmpHourChrgadj (Karl)
//4375 WbJrAmpHourDisChrgadj
(unsigned short*) &WbJrAmpHourDisChrgadj, //WAS WbJrAmpHourDisChrgadj (Karl move)
//4376 WbJrAmpHourRemaing
(unsigned short*) &WbJrAmpHourRemaing, //NET Chrg-Dischrg 237, now 238 ah for Ryan's 220AH
//4377 WbJrAmpHourDisChrg
(unsigned short*) &WbJrAmpHourDisChrg, //WAS WbJrAmpHourDisChrg (Karl move)
//4378 BatCapacityTrefMBus
(unsigned short*) &BatCapacityTrefMBus, // BatCapacityTrefMBus
//4379 WbJrBatAhrCompPcntMBus
(unsigned short*) &WbJrBatAhrCompPcntMBus, //WAS WbJrBatAhourCompMBus
//4380 BattCapacityAhrs
(unsigned short*) &BattCapacityAhrs, //Temp Compensated Capacity (output)
//4381 DeltaBatTempC
(unsigned short*) &DeltaBatTempC, //UNIT_Reserved Temp debug
//4382 dispAvgWbJrAModbus
(unsigned short*) &dispAvgWbJrAModbus, //always positive.
3:54 PM
See if you can make sense by reading any of these registers by address (Address is the number right after the //
3:54 PM
like //4381 DeltaBatTempC
3:54 PM
for instance
Oh WOW! Thanks a lot!!!
I will update my program with this information.
I'm setting up a new program to help me find the register that contain the state of the AUX1 relay. If not to hard, I'll do the same for AUX2.
Best regards,
Daniel.
So the setup seem to work. I hooked the Aux1 contact to a ESP32/Esphome to monitor Aux1's state. With the SOC%low at 93% and SOC%High at 95%, I got the following:
Image in GitHub (//github.com/qcda1/MidniteClassic/blob/main/tools/SOC_GEN.png)
We can see that the Aux1 state will close when the SOC will go below the lower limit of 93% and open when the SOC will go beyond the upper limit of 95%.
Next week, I'll connect the generator autostart to Aux1. :)
Nice graphic on the github.
Hope you get it all working well with the generator.
Larry
So this works like a charm. The generator start and stop at the programmed parameters.
The only issue is the lack of documentation on the registers for the current firmware.I was able to determine that the lower and upper limit of SOC are registers 4166 and 4172 respectively. I miss the register that contain Aux1 state... That's a bugger since I would like to add these to my Home Assistant integration module.
https://github.com/qcda1/ha_midnite_classic
Is this what you need ?
Aux1 State On 0x00004000 Aux 1 ON (aux 1 connector has V or relay is closed)
Aux2 State On 0x00008000 Aux 2 ON (aux 2 connector has V present)
https://www.midnitesolar.com/firmware/classic_register_map_Rev-C5-December-8-2013.pdf
Larry
Quite embarrassing!!! Don't know how I missed this... Brain fart??? Works like a charm. I will make a new version of ha_Midnite_Classic HA integration to include the ability to set the function of Aux1 and low and high SOC% setpoints for generator control.
Best regards,
Daniel.