Skip to content

Commit 4a502d2

Browse files
authored
Merge pull request #7 from ginbot86/dc4s-1.1.1
Created update v1.1.1
2 parents 7bd73fd + 7c288b5 commit 4a502d2

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Lithium-ion batteries can be dangerous if mishandled or abused! The author accep
88
Follow the prompts in the program when they appear, and try to do them promptly (but don't rush yourself). Some steps require user intervention to connect/disconnect the battery and/or adapter, as the tester has no innate switching capabilities; in other words, you are manually performing the work of a relay/switch. :)
99

1010
## How does DingoCharge work?
11-
DingoCharge leverages the [USB PD PPS](https://www.belkin.com/us/support-article?articleNum=318878) protocol to control the amount of current that flows into a rechargeable battery (as of version 1.1.0, only lithium-ion chemistries are supported). By adjusting the difference between the battery's present voltage and the voltage being supplied from the adapter, the amount of current flowing into the battery can be controlled via closed-loop regulation; this provides software controlled constant-current and constant-voltage operation. The program also provides an easy-to-use interface to set up the required charging parameters (voltage, current, charge termination/cutoff, etc.), and also ensures that the requested settings are compatible with the adapter in use, as not all PD PPS adapters are equal.
11+
DingoCharge leverages the [USB PD PPS](https://www.belkin.com/us/support-article?articleNum=318878) protocol to control the amount of current that flows into a rechargeable battery (as of version 1.1.1, only lithium-ion chemistries are supported). By adjusting the difference between the battery's present voltage and the voltage being supplied from the adapter, the amount of current flowing into the battery can be controlled via closed-loop regulation; this provides software controlled constant-current and constant-voltage operation. The program also provides an easy-to-use interface to set up the required charging parameters (voltage, current, charge termination/cutoff, etc.), and also ensures that the requested settings are compatible with the adapter in use, as not all PD PPS adapters are equal.
1212

1313
The program is built around the [Lua API](https://yk-lab.org:666/index.php/2020/01/09/lua-programming-overview/) feature that is present on the Shizuku platform. The API provides the necessary functions to interact with a USB PD PPS adapter, as well as providing basic routines for the user interface.
1414

@@ -19,7 +19,7 @@ DingoCharge is meant for people with existing electronics/battery knowledge (hob
1919
DingoCharge takes advantage of existing features in hardware that you already purchased (the USB tester, USB-C to USB-C cable(s), and your USB-C PD adapter(s)). With a little bit of extra hardware (USB-C or USB-A plug to the various connections you may need to hook up the battery), you have a highly flexible battery charger for your projects.
2020

2121
## Extra hardware required
22-
The only extra hardware required is a USB power cable that connects the VBUS and ground pins to your battery, and a microUSB cable to an external 5 volt USB power source (as of version 1.1.0), and the battery you want to charge (as of version 1.1.0, lithium-ion/lithium iron phosphate batteries with a 1S to 5S (2S to 4S recommended) configuration are supported, with experimental support for 2S-7S lithium-titanate chemistries added but untested). Examples include USB-A to 5.5x2.1mm barrel jacks, XT30/XT60, Deans, SAE, Anderson Powerpole connectors, or alligator clips. If your PD adapter supports PPS with more than 3 amps of current, you will need a suitably rated 5 amp/100 watt USB-C to USB-C cable to connect the tester to the adapter.
22+
The only extra hardware required is a USB power cable that connects the VBUS and ground pins to your battery, and a microUSB cable to an external 5 volt USB power source (as of version 1.1.1), and the battery you want to charge (as of version 1.1.1, lithium-ion/lithium iron phosphate batteries with a 1S to 5S (2S to 4S recommended) configuration are supported, with experimental support for 2S-7S lithium-titanate chemistries added but untested). Examples include USB-A to 5.5x2.1mm barrel jacks, XT30/XT60, Deans, SAE, Anderson Powerpole connectors, or alligator clips. If your PD adapter supports PPS with more than 3 amps of current, you will need a suitably rated 5 amp/100 watt USB-C to USB-C cable to connect the tester to the adapter.
2323

2424
DingoCharge will only work with the USB PD adapter connected to the tester's input, and the battery on the tester's output. It will not work if the connections are reversed.
2525

main/lua/user/DC4S/UserDefaults-DC4S.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Version history:
77
Fixed issue where precharge voltage did not display (correctly) during charge. (2022-10-12).
88
Added CC fallback when in CV mode and charge current overshoots too much (2022-10-12).
99
Added an option to display system temperature in Fahrenheit (2022-10-12).
10-
Added 2.5V/cell and 8S cell configurations (2022-10-13).]]
10+
Added 2.5V/cell and 8S cell configurations (2022-10-13).
11+
1.1.1: Fixed issue where some chargers' current-limiting conflicted with CV control loop (2022-10-15).]]
1112

1213
-- I guess this is easier than trying to build a configuration file parser...
1314
-- Note: as versions are updated, this file should be replaced with one from

main/lua/user/DingoCharge-Shizuku.lc

-8 Bytes
Binary file not shown.

source/lua/user/DC4S/LibMenu-DC4S.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Version history:
77
Fixed issue where precharge voltage did not display (correctly) during charge. (2022-10-12).
88
Added CC fallback when in CV mode and charge current overshoots too much (2022-10-12).
99
Added an option to display system temperature in Fahrenheit (2022-10-12).
10-
Added 2.5V/cell and 8S cell configurations (2022-10-13).]]
10+
Added 2.5V/cell and 8S cell configurations (2022-10-13).
11+
1.1.1: Fixed issue where some chargers' current-limiting conflicted with CV control loop (2022-10-15).]]
1112

1213

1314
function checkConfigs()

source/lua/user/DC4S/UserDefaults-DC4S.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Version history:
77
Fixed issue where precharge voltage did not display (correctly) during charge. (2022-10-12).
88
Added CC fallback when in CV mode and charge current overshoots too much (2022-10-12).
99
Added an option to display system temperature in Fahrenheit (2022-10-12).
10-
Added 2.5V/cell and 8S cell configurations (2022-10-13).]]
10+
Added 2.5V/cell and 8S cell configurations (2022-10-13).
11+
1.1.1: Fixed issue where some chargers' current-limiting conflicted with CV control loop (2022-10-15).]]
1112

1213
-- I guess this is easier than trying to build a configuration file parser...
1314
-- Note: as versions are updated, this file should be replaced with one from

source/lua/user/DingoCharge-Shizuku.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ Version history:
88
Fixed issue where precharge voltage did not display (correctly) during charge. (2022-10-12).
99
Added CC fallback when in CV mode and charge current overshoots too much (2022-10-12).
1010
Added an option to display system temperature in Fahrenheit (2022-10-12).
11-
Added 2.5V/cell and 8S cell configurations (2022-10-13).]]
11+
Added 2.5V/cell and 8S cell configurations (2022-10-13).
12+
1.1.1: Fixed issue where some chargers' current-limiting conflicted with CV control loop (2022-10-15).]]
1213

1314

1415
scriptVer = 1.1
15-
patchVer = 0
16+
patchVer = 1
1617

1718
-- Default settings are stored in a separate file:
1819
require "lua/user/DC4S/UserDefaults-DC4S"
@@ -329,7 +330,6 @@ function startCharging()
329330
regLoopCurrent = termCRate * chargeCurrent
330331
regLoopVoltage = voltsPerCell * numCells
331332
setpointDeadband = cvDeadband
332-
maxCurrent = chargeCurrent -- limit overshoot during CC-CV transition, at least theoretically
333333
else
334334
regLoopCurrent = 0
335335
end

0 commit comments

Comments
 (0)