Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theoretical v2 with Integrated Charging Circuit (TP4056) #6

Open
dskvr opened this issue Sep 24, 2023 · 1 comment
Open

Theoretical v2 with Integrated Charging Circuit (TP4056) #6

dskvr opened this issue Sep 24, 2023 · 1 comment

Comments

@dskvr
Copy link
Contributor

dskvr commented Sep 24, 2023

Built a window sensor, everything worked well, started thinking about a v2. Here is what I came up with, take it or leave it.

Changes

  1. Adds a TP4056 (USB-C here, could also be Micro USB) for charging (~$0.27)
  2. Adds a AMS1117-3.3 3.3v voltage regulator between the battery and the ESP8266MOD (~$0.04)

Notes

  • In the case where each sensor has a charger, would obviously increase the size of the window sensor (v2.a)
  • Otherwise charging circuit could, and probably should be external. This changes the schematic. Can be achieved in two different ways, remove the battery and charge it or connect the sensor via a port and charge that way. (v2.b and v2.c respectively) In the case of v2.c, the voltage regulator should probably stay as the ESP8266MOD is rated for 3.3v and while it seems to handle 3.7v, charging could introduce higher voltage into the circuit (up to 4.2v). (v2.b).

(v2.a) ASCII Schematic

+5V
 |
[USB1]
 |
 |
[U1] TP4056
 |   |
 |   +-----> [BATT1] 3.7V Li-ion
 |         |
 |         |
[U2] AMS1117-3.3
 |   |   |
 |   |   +----||---- GND   (C1: 10uF)
 |   |   |
 |   |   +----||---- GND   (C2: 0.1uF)
 |   |
 |   |
[U3] ESP8266MOD
 |   |   |
 |   |   +----/ /---- GND   (SW1: Reed Switch)
 |   |
 |   +---------||--------- (W1: Copper Wire/Antenna)
 |
 GND

Legend:

[USB1]: USB-C for charging
[U1]: TP4056 Charger Module
[BATT1]: 3.7Vli-ion Battery
[U2]: AMS1117-3.3 Voltage Regulator
[U3]: ESP8266MOD
||: Capacitor
/ /: Reed Switch

(v2.a) Weblist

* Integrated Window Sensor and TP4056 (USB-C) Charger Circuit with ESP8266MOD powered by a 3.7V Li-ion Battery

* USB-C for charging
USB1 5V GND USB_TYPE

* TP4056 Charger Module
U1 VIN GND BAT BAT TP4056

* Connect USB 5V to TP4056 VIN
R_USB 5V U1:VIN 0

* 3.7V Li-ion Battery
BATT1 U1:BAT GND BATTERY_TYPE

* AMS1117-3.3 Voltage Regulator
U2 IN OUT GND AMS1117-3.3

* Connect Battery to AMS1117 Input
R_BATT BATT1 U2:IN 0

* Decoupling capacitors for AMS1117
C1 U2:OUT GND 10uF
C2 U2:OUT GND 0.1uF

* ESP8266MOD
U3 VCC GND EN IO15 ESP8266MOD

* Connect AMS1117 Output to ESP8266 VCC
R_VCC U2:OUT U3:VCC 0

* Connect ESP8266 EN to VCC
R_EN U3:EN U3:VCC 0

* Connect ESP8266 IO15 to GND
R_IO15 U3:IO15 GND 0

* Reed Switch
SW1 U3:GND REED_NODE REED_SWITCH

* Copper wire (antenna)
W1 U3:VCC ANTENNA_NODE WIRE

* Model Definitions (Placeholder)
.model USB_TYPE USB
.model TP4056 TP4056_TYPE
.model BATTERY_TYPE BATTERY
.model AMS1117-3.3 AMS1117_TYPE
.model ESP8266MOD ESP_TYPE
.model REED_SWITCH SWITCH
.model WIRE WIRE_TYPE

.end


@meichthys
Copy link
Owner

meichthys commented Sep 25, 2023

Hey, glad to year you were able to build one!
Thanks for your input on a v2 as well. Charging has been on my mind too - currently i just remove the batteries and just connect them via alligator clips to a rc car battery charger, but a better defined process would indeed be preferred.

My preference would be to keep the design of the box the same. I designed the battery to be easily accessible - so the workflow would be:

  • Use sensor until battery is low
  • Remove battery for recharging & replace immediately with separate charged battery (very little downtime)
  • Recharge low battery using a USB powered charging dock. I couldn't seem to find my preliminary sketches of the dock, but basically:
    • The battery would be inserted into the top of a rectangular dock which has a slot that perfectly fits the battery.
    • The dock would have wire contacts that would match up with the contacts on the battery
    • Ideally the dock would immediately start charging and would have some type of indicator light(s) that would show when the battery is fully charged.
      • One light to show when the battery is charging (simple led in the circuit that lights up when battery is charging)
      • One light that only lights up when the 3.7v threshold is reached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants