LED Beacon Project - Power & Protection Questions

Hello Everyone,
I am new to MCUs and electronics in general.

I'm designing a solar-powered LED beacon. The system will incorporate four SG90 servos (two for an LED matrix and two for a solar cell), 36 WS2812B LEDs, and an ESP32-WROOM-32E with Wi-Fi connectivity. I've calculated the current draw to be approximately 800mA for a cycle of 60-seconds, powered by a 1200mAh LiPo battery.

Over the past few days, I've observed many TP4056-based battery charging circuits that include a bypass for USB power. Most of these designs use linear voltage regulators (like the RT9080 in the FireBeetle) to achieve a stable 3.3V for the system. However, as a beginner, I'm unclear on how they implement over-current, over-discharge, or system overload protection. Furthermore, I'm concerned about how these circuits handle the LiPo battery voltage dropping below 3.3V, especially considering dropout voltages that can be as high as 1.2V (e.g., LM1117). In my view, a buck-boost converter might be necessary, but none of these circuits use them?

Another challenge is programming and testing all components via USB 2.0. I need a way to limit the circuit's current draw to 500mA when connected to a USB port and to cut off the load if this threshold is exceeded. I can probably use a polyfuse but that may have a slow reaction time. I looked into some power switch options, but they were costing very high at mouser. Another option is to power the load directly via battery or USB(while programming) and power MCU and controls pins via 3.3v rail, but then again, the question of overloading the USB port arises. I plan to use a CH340C for USB programming.

With my limited knowledge of electronics and components, I am unbale to solve this problem. Could someone please suggest a schematic or components to address these issues? Given this is a test circuit and will undergo several iterations, I'd prefer cost-effective solutions.

I think you should read the forum guide in the sticky post. It tells you to post a schematic and links to the major components you are talking about.

I have never seen a TP4056 module that included a linear regulator. Please post a link to that.

I can tell you that some TP4056 modules contain extra circuits for over-discharge & over-current protection, but not all do. Look at these 2 modules:

Without over-discharge protection:


With:

Hi,
Thank you for replying. I'm sorry yes I should've posted some example schematic. Here is one for firebeetle board. They are using RT9080 to power the 3.3v rail.

https://github.com/Robert-MARKII/Document/blob/master/%5BDFR0478%5DFireBeetle%20Board-ESP32(V1.0).pdf

However, my question does not pertain any particular circuit or module. I need help in figuring out the components for my board with the given requirements. I do not plan to use any readymade modules.

That sounds like an interesting and complex project that could be a lot of fun and involve a lot of time. However, please keep in mind that we are not a free design or code-writing service. We’re more than happy to help with your design or code, but we need you to make an initial attempt. Please design and write your code, then post it along with an explanation of what’s not working properly. There is also a for hire section if you want to pay for it.

  1. Show Your Work First: Before asking for assistance, make an attempt to design or write the code yourself. Share your work along with details about what isn’t working.
  2. Provide Clear Documentation: Since we can’t see your project, share an annotated schematic (best) or a clear drawing of your setup. Pictures are welcome, but avoid using Fritzing diagrams as they are wiring diagrams, not schematics, and are not ideal for troubleshooting.
  3. Include Technical Details: If there is specific hardware involved, include links to technical information. There are often many versions of similar components, so precise details are essential.
  4. Reference Resources: For additional help, check out useful links and tutorials: Useful Links on Arduino Forum.

That bypass is called a load sharing or power path circuit. Those example circuits only implement protections for the battery. There are no such protections for the USB 5V supply coming in to the regulator through the schottky diode.

The RT9080 has a much lower dropout voltage than the LM1117. Moreover, at 3.3V a lipo battery is essentially fully discharged. But if the battery goes lower than that, the RT9080 will probably just follow the battery voltage on down. It will no longer be able to regulate, but the circuit might continue to work for a while. At some point though, the battery protection circuit will kick in, and shut things down.

I think you are right about a buck-boost, but I think they are not used because the amount of remaining battery power that's available below about 3.5V is so low that it's not worth the trouble.

Yep. And with the circuits you mention with the load sharing feature, USB might have to supply both the full operating current plus the full charge current. The charge current alone could be 1A. You could use a 2A mains-powered USB charger, but that wouldn't give you a computer connection for programming, etc. But I suspect the USB-C PD experts here will have a solution.

That sounds way too low, so measure it with your multimeter.

Each SG90 servo briefly draws the stall current (600-700 mA) every time it starts moving. Four of them starting at once will trip the overload indicator on a standard USB port, causing it to shut down, so choose a servo power supply that can provide 3 Amperes, minimum.

The ESP32+WiFi will draw another 200-300 mA when active.

What about that string of 36 LEDs? People commonly budget 50 mA per WS2812B LED.

Hi,

Thank you for replying. Yeah, it's a conundrum I was hoping to get help with in this forum.

I had initially thought of setting the charge current to < 300mA, but later I decided to drop the whole TP4056 circuitry am now planning to use BQ24074 which has inbuilt power path and is USB compliant (claims to pull a maximum of 500mA from USB). I will also add a load switch (TPS2045B) that has a short circuit current of 500mA to the USB port. So if the chip does what I think it does, it will trip the circuit beyond this limit. It is not an ideal solution, especially for simultaneous testing and programming, but I guess with my limited knowledge this the best I can do.

Hi,

Thank you for replying. Yeah I had thought of this and that is why in my programming, I will not power any two servos or a servo(s) and LED matrix simultaneously. ESP32 will not have a persistent WiFi connection either. Hence the load current of ~800mA, which still leaves a headroom for average load current.