commit ce473057599a9243b042b7cc6521891998f07eb9 Author: Dustin Brunner Date: Sat Jun 11 15:59:08 2022 +0200 Version 1 diff --git a/QC2_adapter_board_ATTiny.fzz b/QC2_adapter_board_ATTiny.fzz new file mode 100644 index 0000000..1270fa9 Binary files /dev/null and b/QC2_adapter_board_ATTiny.fzz differ diff --git a/QC2_adapter_board_ATTiny_Code/QC2_adapter_board_ATTiny_Code.ino b/QC2_adapter_board_ATTiny_Code/QC2_adapter_board_ATTiny_Code.ino new file mode 100644 index 0000000..00dbd97 --- /dev/null +++ b/QC2_adapter_board_ATTiny_Code/QC2_adapter_board_ATTiny_Code.ino @@ -0,0 +1,89 @@ +/* + ATTiny 13 Quick Charge 2.0 Powerbank Adapter Board + Author: dustinbrun + licensed under CC BY 4.0 + + Version 03.2022 +*/ + +const int J1 = 4; +const int Dp_2k2 = 0; +const int Dp_10k = 1; +const int Dn_10k = 2; +const int load = 3; + +bool active_9V = 0; + +void setup() +{ + delay(500); + + pinMode(load, OUTPUT); + pinMode(J1, INPUT_PULLUP); + + blink_load(2, 100); + + // Quickcharge Init + pinMode(Dn_10k, INPUT); + pinMode(Dp_2k2, INPUT); + pinMode(Dp_10k, OUTPUT); + digitalWrite(Dp_10k, HIGH); + delay(2000); + pinMode(Dn_10k, OUTPUT); + digitalWrite(Dn_10k, LOW); + delay(500); + // End of Quickcharge Init + + digitalWrite(load, HIGH); + delay(500); + + if (digitalRead(J1) == LOW) //Jumper is set, Output 9V + { + // Quickcharge set 9V + pinMode(Dp_2k2, OUTPUT); + digitalWrite(Dp_2k2, HIGH); + digitalWrite(Dn_10k, HIGH); + // End of Quickcharge set 9V + + blink_load(2, 500); + active_9V = true; + } + else //Jumper is not set, Output 12V + { + // Quickcharge set 12V + pinMode(Dp_2k2, OUTPUT); + digitalWrite(Dp_2k2, LOW); + digitalWrite(Dn_10k, HIGH); + // End of Quickcharge set 12V + + blink_load(1, 500); + active_9V = false; + } +} + +void loop() +{ + delay(3000); + + if (active_9V) + { + blink_load(2, 1000); + } + else + { + blink_load(1, 1000); + } + +} + + +void blink_load(int x, int delaytime) +{ + for (int i = 0; i < x ; i++) + { + digitalWrite(load, HIGH); + delay(delaytime); + digitalWrite(load, LOW); + delay(delaytime); + } +} diff --git a/QC2_adapter_board_ATTiny_Leiterplatte.png b/QC2_adapter_board_ATTiny_Leiterplatte.png new file mode 100644 index 0000000..bccfea8 Binary files /dev/null and b/QC2_adapter_board_ATTiny_Leiterplatte.png differ diff --git a/QC2_adapter_board_ATTiny_Schaltplan.png b/QC2_adapter_board_ATTiny_Schaltplan.png new file mode 100644 index 0000000..0b37de6 Binary files /dev/null and b/QC2_adapter_board_ATTiny_Schaltplan.png differ diff --git a/README.html b/README.html new file mode 100644 index 0000000..e32fb67 --- /dev/null +++ b/README.html @@ -0,0 +1,280 @@ + + + + + + + README + + + + +

ATTiny13 +Quick Charge 2.0 Powerbank Adapter Board

+

A small adapter board which emulates a Quick Charge 2.0 (also +compatible with Quick Charge 3.0) compatible device to force a power +supply or a power bank to output higher voltages. Additionally this +board generates a base load to prevent power banks from switching off +automatically, if there is not enough load on the output.

+

+

+

Quick Charge 2.0 +specification

+

To trigger the Quick Charge feature a special init routine must be +run through. I have tried this routine from different sources (which are +linked down below) but all of them did not work with all my Quick Charge +power supplies. So I tried to create my own routine, which was inspired +by the instructions given in the TPS61088 datasheet (Page 6+7). This +routine works just fine with all my Quick Charge power supplies.

+

After this initialization the output Voltage can be configured by +applying different voltage levels to the USB data lines D+ and D-:

+

+

Voltage Levels:

+ + + + + + + + + + + + + + + + + + + + + + + + + +
D+D-output voltage
0,6V0,0V5V (default)
3,3V0,6V9V
0,6V0,6V12V
+

With this board the output voltage can be configured BEFORE startup +using a jumper. The output configuration is shown by the LED attached in +parallel to the load resistors: - Jumper is set during startup: output +9V, LED flashes 2 times each cycle - Jumper is not set during startup: +output 12V, LED flashes 1 time each cycle

+

Hardware

+

Schematic

+

+

PCB Layout

+

+

ATtiny-Pinout

+


(Source: +https://cdn.sparkfun.com/assets/f/8/f/d/9/52713d5b757b7fc0658b4567.png)

+

Software

+

Program the ATtiny

+

1. Upload +ArduinoISP sketch to the Arduino

+

You can find it in the Examples folder of the Arduino-IDE

+

2. wiring

+

I use a Arduino Nano to program the ATtiny, but also a Arduino UNO +will do fine. Hook up the ATtiny like it is shown in the schematic:

+

+

The capacitor is important because it prevents the Arduino from +resetting itself while programming the ATtiny.

+

3. Download ATtiny13 +support for the IDE

+

Add the URL +http://drazzy.com/package_drazzy.com_index.json to the +Additional Boards Manager URLs in the IDE Preferences. After that open +the Boards-Manager, search for “DIY Attiny” and install it. Now you +should find the Attiny13 and some other Attiny Boards in the Board +menu.

+

4. Uploading

+

Open the code in the Arduino IDE and select the Attiny13 as the +Board. Select the following settings: +

+

It is important to set “Arduino as ISP” (NOT Arduino +ISP) as the programmer.

+

After that Press Burn Bootloader to make sure +that these Settings are applied.

+

Now you can upload the code by simply pressing +Upload.

+

Sources

+ +


+

I hope you like this project!

+
+

+This work by Dustin Brunner +is licensed under +CC +BY +4.0 +

+

Creative Commons Lizenzvertrag
Dieses +Werk von Dustin Brunner ist lizenziert unter +einer +Creative +Commons Namensnennung 4.0 International Lizenz.

+ + diff --git a/README.md b/README.md new file mode 100644 index 0000000..ff9ae5a --- /dev/null +++ b/README.md @@ -0,0 +1,84 @@ +# ATTiny13 Quick Charge 2.0 Powerbank Adapter Board +A small adapter board which emulates a Quick Charge 2.0 (also compatible with Quick Charge 3.0) compatible device to force a power supply or a power bank to output higher voltages. Additionally this board generates a base load to prevent power banks from switching off automatically, if there is not enough load on the output. + + + + +# Quick Charge 2.0 specification +To trigger the Quick Charge feature a special init routine must be run through. I have tried this routine from different sources (which are linked down below) but all of them did not work with all my Quick Charge power supplies. So I tried to create my own routine, which was inspired by the instructions given in the TPS61088 datasheet (Page 6+7). This routine works just fine with all my Quick Charge power supplies. + +After this initialization the output Voltage can be configured by applying different voltage levels to the USB data lines D+ and D-: + + + +## Voltage Levels: +| D+ | D- | output voltage | +| -------- | -------- | -------- | +| 0,6V | 0,0V | 5V (default) | +| 3,3V | 0,6V | 9V | +| 0,6V | 0,6V | 12V | + +With this board the output voltage can be configured BEFORE startup using a jumper. The output configuration is shown by the LED attached in parallel to the load resistors: +- Jumper is set during startup: output 9V, LED flashes 2 times each cycle +- Jumper is not set during startup: output 12V, LED flashes 1 time each cycle + +# Hardware +## Schematic + + +## PCB Layout + + + +## ATtiny-Pinout + +
(Source: https://cdn.sparkfun.com/assets/f/8/f/d/9/52713d5b757b7fc0658b4567.png) + + + +# Software + +## Program the ATtiny +### 1. Upload `ArduinoISP` sketch to the Arduino + You can find it in the Examples folder of the Arduino-IDE + +### 2. wiring + I use a Arduino Nano to program the ATtiny, but also a Arduino UNO will do fine. Hook up the ATtiny like it is shown in the schematic: + + + + The capacitor is important because it prevents the Arduino from resetting itself while programming the ATtiny. + +### 3. Download ATtiny13 support for the IDE + Add the URL `http://drazzy.com/package_drazzy.com_index.json` to the Additional Boards Manager URLs in the IDE Preferences. After that open the Boards-Manager, search for "DIY Attiny" and install it. Now you should find the Attiny13 and some other Attiny Boards in the Board menu. + +### 4. Uploading + Open the code in the Arduino IDE and select the Attiny13 as the Board. + Select the following settings: +
+ + It is important to set "Arduino as ISP" (**NOT Arduino ISP**) as the programmer. + + **After that Press `Burn Bootloader` to make sure that these Settings are applied.** + + Now you can upload the code by simply pressing **Upload**. + + + +# Sources +- For the init routine: TPS61088 datasheet (Page 6+7) https://www.ti.com/lit/ug/tidu917/tidu917.pdf +- Voltages levels to configure the output: https://www.mouser.com/datasheet/2/328/chiphy_family_datasheet-269468.pdf +- USB pinout: https://www.electroschematics.com/wp-content/uploads/2010/01/usb-pinout.jpg +- other tested init routine + schematic inspiration: https://create.arduino.cc/projecthub/PSoC_Rocks/hacking-qualcomm-quick-charge-qc-2-0-3-0-with-attiny85-b7627d +- other tested init routine: https://github.com/septillion-git/QC2Control + + + +
+ +### I hope you like this project! + +
+

This work by Dustin Brunner is licensed under CC BY 4.0

+ +Creative Commons Lizenzvertrag
Dieses Werk von Dustin Brunner ist lizenziert unter einer Creative Commons Namensnennung 4.0 International Lizenz. \ No newline at end of file diff --git a/pictures/Program_ATtiny_Steckplatine.png b/pictures/Program_ATtiny_Steckplatine.png new file mode 100644 index 0000000..92e220e Binary files /dev/null and b/pictures/Program_ATtiny_Steckplatine.png differ diff --git a/pictures/QC2_adapter_board_ATTiny_back.jpg b/pictures/QC2_adapter_board_ATTiny_back.jpg new file mode 100644 index 0000000..a64ddfc Binary files /dev/null and b/pictures/QC2_adapter_board_ATTiny_back.jpg differ diff --git a/pictures/QC2_adapter_board_ATTiny_front.jpg b/pictures/QC2_adapter_board_ATTiny_front.jpg new file mode 100644 index 0000000..d76a4fe Binary files /dev/null and b/pictures/QC2_adapter_board_ATTiny_front.jpg differ diff --git a/pictures/attiny-pinout.png b/pictures/attiny-pinout.png new file mode 100644 index 0000000..a4725b9 Binary files /dev/null and b/pictures/attiny-pinout.png differ diff --git a/pictures/ide_settings.png b/pictures/ide_settings.png new file mode 100644 index 0000000..706f7df Binary files /dev/null and b/pictures/ide_settings.png differ diff --git a/pictures/usb-pinout.webp b/pictures/usb-pinout.webp new file mode 100644 index 0000000..36d849b Binary files /dev/null and b/pictures/usb-pinout.webp differ