Comments (8)
Thanks a lot for your quick and precise response. About the option 1, probably I can check this with a multimeter. though I'm not sure I'll be able to solder on the tiny pin. I was thinking of something like option 2 but of course there is the pbm of powering the chip itself.
Could I use the mosfet to cut the connexion from the charger to the battery though ?
from max1704x.
Thanks ! Your feedback is very useful to me
from max1704x.
I will work on a similar circuit and provide the details if I get it working.
from max1704x.
OPTION 1: The board you are using has a TP4056X chip. Pin 8 on this chip is an Enable chip (CE). A HIGH
signal enables the chip. Pulling the pin LOW
can disable the chip. There does not appear to be any breakout for this pin but perhaps you could solder a wire to it. CAUTION: I did not see a schematic for this board. If the pin is floating (not connected to anything) this option will work. If the pin is connected to the Vcc, then grounding this pin will short out the power supply. It appears the CE pin may be internally pulled HIGH
which means it can be safely connected to GND but I cannot be 100% sure.
OPTION 2: Use an N-channel MOSFET to turn the power input on and off. This would require the ability to cut the negative connection of the input voltage which means you would not be able to use the USB port. Connect the gate of the MOSFET (G) to the I/O pin on your microcontroller, the Source pin (S) to GND and then connect the Drain pin (D) to the negative input pin on the LiPo Charging board. Connect the positive input pin of the LiPo charging board to +5V. A LOW
signal to the G pin on the MOSFET turns the board off while a HIGH
signal will turn the board on. Use something like this or equivalent (https://www.adafruit.com/product/355).
from max1704x.
When I outlined option one I was assuming the battery could supply power, however, you can cut the battery connection as well. The MOSFET is a switch between the Source and Drain that is opened and close using the Gate.
The Source on the MOSFET will stay connected to ground. Connect the negative battery terminal of your charger to ground. Then connect the Drain to the negative side of the battery. Connect the positive terminal of the battery to the positive terminal on the charger board. The MOSFET will connect/disconnect the battery to/from ground. When the Gate pin is HIGH
, the battery is connected to ground and in turn the charger. When the Gate is LOW
, it is disconnected.
Mind you, I haven't actually tested this...
from max1704x.
Hello
unfortunately I can't make this work.
I use a N-Type MOSFET (IRFZ24NPBF), for test purpose I put a button to switch the MOFSET gate from HIGH to LOW and I can see it works with a led. But When I replace the led by the battery, whether the gate is HIGH or LOW, the battery does not seem to charge (I check with a USB controler on the charger : it stays around 3mA, when charging pulls ~200-250mA - that I can see when I connect the ground of the battery directly on the ground...)
from max1704x.
that's very kind, thanks
from max1704x.
I was able to get the N-Channel MOSFET to work but found that in doing so, it interfered with the microcontrollers ability to read the MAX17043. Here is an image of the circuit with an N-Channel MOSFET.
I switched to a PNP MOSFET to connect and disconnect the power to the charger and this worked perfectly. Here are images of the circuit with an P-Channel MOSFET.
The circuit is charging (0V to the gate)
The circuit is not charging (5V to the gate)
The charger I am using has a buck converter that regulates the battery to 5V when the battery is not charging.
Here is a crude circuit diagram using the P-Channel MOSFET:
Note I just used a loose green wire to turn the MOSFET on and off. It does not need to be connected, just momentarily touch either GND or 5V.
References:
Charger => https://www.amazon.com/gp/product/B08R1MJWK3
P-Channel MOSFET -> https://www.onsemi.com/pdf/datasheet/fqp27p06-d.pdf
from max1704x.
Related Issues (15)
- Question about power consumption HOT 5
- Clone max1743 address 0x76 wrong readings HOT 7
- Aliexpress 0x32 Clone Support HOT 16
- Use Wire1 HOT 1
- Fuel Gauge at 0x32 HOT 1
- I'm having issues regarding showing the battery percentage. HOT 5
- Battery never shows more than 90% charge HOT 7
- ESP32 WEMOS LOLIN32 lite HOT 5
- Esp8266 Compilation Error HOT 1
- Why read sensor error,What do I do HOT 2
- Library should not initialize I2C subsystem itself HOT 2
- Inconsistent values HOT 6
- Add ESP32 support HOT 1
- Question. Is ok with max17040 or 17041? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from max1704x.