Chat
Welcome to Flux
Treat Flux like your intern. Tell it what you'd like to build and it'll get to work. You can also ask it questions, brainstorm ideas, and teach it your preferences. Learn More
Ready.
Reviews
Component | |
|---|---|
Inspect
USB LED Lamp Circuit
Controls
Properties
Availability & Pricing
| Distributor | Qty 1 | |
|---|---|---|
| Arrow | $0.01–$0.05 | |
| Digi-Key | $0.01–$0.20 | |
| LCSC | $0.01 | |
| Mouser | $0.20 | |
| Verical | $0.01–$0.02 | |
Assets
Welcome 👋
Flux helps you build PCBs faster with an AI teammate!
Create your account to collaborate, stay updated, fork your own version, and get instant answers from our AI agent.
tinoaja07
tinoaja07
tinoaja07
copilot
Image
tinoaja07
copilot
Image
tinoaja07
copilot
Image
tinoaja07
copilot
Image
tinoaja07
copilot
- Battery Monitoring: Use a voltage divider to scale down the battery voltage to a range the ESP32 can measure (0-3.6V for safety).
- Charger Control: Use a digital pin on the ESP32 to control the charge enable pin on the charger module.
- ESP32 Analog Pin: Use an appropriate pin to read the scaled battery voltage.
Important Considerations:tinoaja07
copilot
Image
-
ESP32-WROOM-32:
- Functions: Monitors the battery voltage and controls the charger.
- Connections:
- Connect the battery voltage (via a voltage divider) to an analog input on the ESP32 to read the battery level.
- Use a digital output pin to control the charger module's enable/disable function.
-
Voltage Divider:
- Purpose: Scales down the battery voltage $3V$ to $4.2V$ to a safe level $0V$ to $\sim3.3V$ for the ESP32's analog input.
- Connections: Connects between the battery and an analog input on the ESP32.
-
18650 Battery:
- Function: Powers the system and is monitored for charge/discharge levels.
-
Battery Charger Module (e.g., TP4056):
- Control: Controlled by the ESP32 to start or stop charging based on the battery level.
-
12W DC Lamp & Switch:
- Function: The main light is manually operated by the switch.
Workflow:tinoaja07
copilot
-
ESP32-WROOM-32
- Analog Input (A0): Connect to the middle of the voltage divider to read the battery voltage.
- Digital Output (D13): Connect to the control pin on the charger module to enable/disable charging.
-
Voltage Divider
- Resistors R3 and R4: Form a voltage divider to step down the battery voltage for safe analog reading.
- Connect one end of R3 to the Battery positive terminal.
- Connect the junction of R3 and R4 to the ESP32 analog input.
- Connect the other end of R4 to Ground.
-
Battery (18650)
- Connect the positive terminal to R3 (as part of the voltage divider) and to the
- Connect the negative terminal to Ground.
-
Battery Charger Module (e.g., TP4056)
- Connect the charger's input to the output of the
- Connect the charger's output to the battery.
- Connect the control pin of the charger to the ESP32 digital output.
-
12W DC Lamp
- Connect one end to the On/Off
- Connect the other end of the
-
Switch
- Connect in series between the lamp and the battery to control the power.
-
Adapter Module (220V AC to 5V DC)
- Connect its DC output to the input of the
Schematic OverviewSwitchandChargerinput.AdapterorUSB.Switch.Switchto the battery positive terminal.Charger.tinoaja07
copilot
- Maximum Battery Voltage is 4.2V.
- ESP32's maximum ADC reference voltage is approximately 3.3V.
- Let's select $ R4 = 10k , \Omega $ as a commonly used value.
Calculation for $ R3 $