• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Lamda code

Joined
Aug 25, 2021
Messages
1,302 (1.33/day)
Location
Thailand
System Name Shoebox
Processor 3600x
Motherboard Msi b550m Mortar +WiFi
Cooling Cryorig m9
Memory Crucial Ballistix c16 B-die 2x8gb
Video Card(s) Powercolor rx570 4gb
Storage WD black sn750 256gb (OS), crucial mx500 1tb(storage),Hitatchi ?? 7200rpm 500gb(Temp files)
Display(s) Samsung 65" TU7100
Case Zzaw b3
Audio Device(s) Yamaha rx-v363
Power Supply Corsair sf750
Mouse Logitech g300s
Keyboard Custom Skyloong sk64s
Software Windows 11Pro
So I'm still working on my solar project and I've gotten lost with the modbus battery settings.


// Battery settings
std::vector<uint16_t> battery_settings1 = {
0, // 9000 Battery Type 0 = User
0x0073, // 9001 Battery Cap 0x55 == 15AH
0x012C, // 9002 Temp compensation 0
0x05DC, // 9003 0x5DC == 1500 Over Voltage Disconnect Voltage 14.6
0x058C, // 9004 0x58C == 1480 Charging Limit Voltage 14.2
0x058C, // 9005 Over Voltage Reconnect Voltage 14.6
0x05BF, // 9006 Equalize Charging Voltage 14
0x05BE, // 9007 Boost Charging Voltage 14.6
0x0550, // 9008 Float Charging Voltage 13.5
0x0528, // 9009 Boost Reconnect Charging Voltage 13
0x04C4, // 900A Low Voltage Reconnect Voltage 11
0x04B0, // 900B Under Voltage Warning Reconnect Voltage 11
0x04BA, // 900c Under Volt. Warning Volt 11.5
0x04BA, // 900d Low Volt. Disconnect Volt. 11
0x04BA // 900E Discharging Limit Voltage 10.5

These are the settings I'm trying to implement during boot now I've been given someone else's code and the initial 0x0 code has been removed which confuses me as I thought this was an address within the controller.

Anyone understand any of this? Oh here's the new code but I haven't changed it to suit my battery yet.

// Battery settings
// Note: these values are examples only and apply my AGM Battery
std::vector<uint16_t> battery_settings1 = {
0, // 9000 Battery Type 0 = User
115, // 9001 Battery Capacity 115Ah
300, // 9002 Temp compensation mV/℃/3V
1500, // 9003 15.00V Over Voltage Disconnect Voltage
1480, // 9004 1480 Charging Limit Voltage 14.8
1460, // 9005 Over Voltage Reconnect Voltage 14.6
1400, // 9006 Equalize Charging Voltage 14
1460, // 9007 Boost Charging Voltage 14.6
1350, // 9008 Float Charging Voltage 13.5
1300, // 9009 Boost Reconnect Charging Voltage 13
1100, // 900A Low Voltage Reconnect Voltage 11
1100, // 900B Under Voltage Warning Reconnect Voltage 11
1150, // 900c Under Volt. Warning Volt 11.5
1100, // 900d Low Volt. Disconnect Volt. 11
1050 // 900E Discharging Limit Voltage 10.5
};

// Boost and equalization periods
std::vector<uint16_t> battery_settings3 = {
0x0000, // 906B Equalize Duration (min.) 0
117 // 906C Boost Duration (aka absorb) 117 mins
};
 

silentbogo

Moderator
Staff member
Joined
Nov 20, 2013
Messages
5,474 (1.44/day)
Location
Kyiv, Ukraine
System Name WS#1337
Processor Ryzen 7 3800X
Motherboard ASUS X570-PLUS TUF Gaming
Cooling Xigmatek Scylla 240mm AIO
Memory 4x8GB Samsung DDR4 ECC UDIMM
Video Card(s) Inno3D RTX 3070 Ti iChill
Storage ADATA Legend 2TB + ADATA SX8200 Pro 1TB
Display(s) Samsung U24E590D (4K/UHD)
Case ghetto CM Cosmos RC-1000
Audio Device(s) ALC1220
Power Supply SeaSonic SSR-550FX (80+ GOLD)
Mouse Logitech G603
Keyboard Modecom Volcano Blade (Kailh choc LP)
VR HMD Google dreamview headset(aka fancy cardboard)
Software Windows 11, Ubuntu 20.04 LTS
You should've started with "I'm working with ESPHome". Otherwise no one has a clue where this is from.
Other than that, sdt::vector is just an array of values in their config file. Both configs are identical. The only difference is that the first one uses hex values, and the other - decimal.
Just change them to whatever settings fit your setup (capacity, voltages, etc)
 
Joined
Aug 25, 2021
Messages
1,302 (1.33/day)
Location
Thailand
System Name Shoebox
Processor 3600x
Motherboard Msi b550m Mortar +WiFi
Cooling Cryorig m9
Memory Crucial Ballistix c16 B-die 2x8gb
Video Card(s) Powercolor rx570 4gb
Storage WD black sn750 256gb (OS), crucial mx500 1tb(storage),Hitatchi ?? 7200rpm 500gb(Temp files)
Display(s) Samsung 65" TU7100
Case Zzaw b3
Audio Device(s) Yamaha rx-v363
Power Supply Corsair sf750
Mouse Logitech g300s
Keyboard Custom Skyloong sk64s
Software Windows 11Pro
You should've started with "I'm working with ESPHome". Otherwise no one has a clue where this is from.
Other than that, sdt::vector is just an array of values in their config file. Both configs are identical. The only difference is that the first one uses hex values, and the other - decimal.
Just change them to whatever settings fit your setup (capacity, voltages, etc)
Ty BOGO I'll take another look then as I gave up trying to get the code working and just deleted the on boot section
 
Top