Skip to content

Commit 7af8ffd

Browse files
committed
Created update 1.1.2
Fixed issue where setting 8S configuration would result in a Config Error message (2022-10-20).
1 parent 4a502d2 commit 7af8ffd

7 files changed

+13
-10
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.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.
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.2, 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.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.
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.2), and the battery you want to charge (as of version 1.1.2, lithium-ion/lithium iron phosphate batteries with a 1S to 5S (2S to 4S recommended) configuration are supported, with experimental support for 2S-8S 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/LibMenu-DC4S.lc

0 Bytes
Binary file not shown.

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ Version history:
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).
1010
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).]]
11+
1.1.1: Fixed issue where some chargers' current-limiting conflicted with CV control loop (2022-10-15).
12+
1.1.2: Fixed issue where setting 8S configuration would result in a Config Error message (2022-10-20).]]
1213

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

main/lua/user/DingoCharge-Shizuku.lc

0 Bytes
Binary file not shown.

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ Version history:
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).
1010
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).]]
12-
11+
1.1.1: Fixed issue where some chargers' current-limiting conflicted with CV control loop (2022-10-15).
12+
1.1.2: Fixed issue where setting 8S configuration would result in a Config Error message (2022-10-20).]]
1313

1414
function checkConfigs()
1515
local returnStatus = false
1616
if (chargeCurrent <= 0) then
1717
screen.showDialog("Config Error",string.format("Invalid charging\ncurrent!\n\n%.3fA <= 0.000A",chargeCurrent),3000,true,color.red)
1818
elseif (chargeCurrent > 5) then
1919
screen.showDialog("Config Error",string.format("Invalid charging\ncurrent!\n\n%.3fA > 5.000A",chargeCurrent),3000,true,color.red)
20-
elseif (numCells > 7) then
21-
screen.showDialog("Config Error",string.format("Invalid cell count!\n\n%dS > 7S",numCells),3000,true,color.red)
20+
elseif (numCells > 8) then
21+
screen.showDialog("Config Error",string.format("Invalid cell count!\n\n%dS > 8S",numCells),3000,true,color.red)
2222
elseif (numCells <= 0) then
2323
screen.showDialog("Config Error",string.format("Invalid cell count!\n\n%dS <= 0S",numCells),3000,true,color.red)
2424
elseif (termCRate > 1) then

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ Version history:
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).
1010
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).]]
11+
1.1.1: Fixed issue where some chargers' current-limiting conflicted with CV control loop (2022-10-15).
12+
1.1.2: Fixed issue where setting 8S configuration would result in a Config Error message (2022-10-20).]]
1213

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

source/lua/user/DingoCharge-Shizuku.lua

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ Version history:
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).
1111
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).]]
12+
1.1.1: Fixed issue where some chargers' current-limiting conflicted with CV control loop (2022-10-15).
13+
1.1.2: Fixed issue where setting 8S configuration would result in a Config Error message (2022-10-20).]]
1314

1415

1516
scriptVer = 1.1
16-
patchVer = 1
17+
patchVer = 2
1718

1819
-- Default settings are stored in a separate file:
1920
require "lua/user/DC4S/UserDefaults-DC4S"

0 commit comments

Comments
 (0)