TL;DR:
- Using LDO to drop voltage from Lipo to stable 3V
- LDO Vout can be adjusted with Voltage Divider
- Lipo from 4.2V to 3.4V, Vout = 3V
- Lipo below 3.4V, Vout = 2.3V => How to adjust Vout of LDO with Feedback voltage from Lipo
Problem:
Recently, I am doing a small project to create a Rechargeable Lipo Battery Pack for my old Gameboy. Gameboy only accepts power in range 1.8V - 3.2V (as I researched). So that, in my design, I use a LDO AP2127K-ADJ (datasheet) to drop voltage from a Lipo battery to 3V to use with it.
Vout is calculated with the formula:
$$V_{\text{OUT}} = V_{\text{REF}}\left(1 + \frac{R_1}{R_2}\right)$$ with \$V_{\text{REF}} = 0.8\text{ V}\$ (according AP2127-ADJ datasheet).
Besides that, on Gameboy machine, there is one Low Power Indicator Led which will be trigger when voltage input from power pack is below 2.3V. I want to use that LED to announce me whenever Lipo battery is at 15% capacity (Lipo at 3.4V). My idea is switch R2 to another value when Lipo reach 3.4V => Vout will be adjusted to 2.3V => Low Power Led will be triggered.
At this moment, I am thinking about using transistors as switchs like below image but don't know how to do it probally (drive Q1, Q2 so at time, only one transistor is opened and another is closed):
- Lipo from 4.2V to 3.4V, Q1 close, Q2 open => V1 = 2.96V
- Lipo below 3.4V, Q1 open, Q2 close => V1 = 2.29
Could you give me some hint/solution for my problem? Your support is greatly appreciated!