7805 powering esp32 d1 mini, current limited

Thread Starter

Kubes

Joined Jan 31, 2023
7
I am adding a ESP32 (Dorhea ESP32 Mini (Amazon)) to an electric shop heater. The logic board in the heater has a 7805 regulator. There is a microcontroller and relays that control the heater elements. Of course, the main logic board is powered at the 5V rail without the heater being powered on (stand by mode). I want to power the ESP32 d1 mini from the same 5V rail. While the ESP32 tries to boot it fails, when power from the 7805. The d1 mini has a 5v to 3.3v regulator on it. The added esp32 circuit needs < 170mA to boot and around 100-60mA while running. The esp32 d1 mini boots runs fine on the bench. When powered from the 5V rail (7805) it only seems to draw 80mA even during boot, it seems like the current is limited to supply the d1 mini. I have checked continuity and I am connected to the v-out of the 7805, through 0-ohm resistors and traces.

What would be limiting the current? Or might there be other issues? Any ideas?

Thanks!!!
 

Sensacell

Joined Jun 19, 2012
3,432
The 5V comes from the existing heater power supply? have you tried an oscilloscope on the 5V power while it boots?
It might not be able to provide the current required.
 

Thread Starter

Kubes

Joined Jan 31, 2023
7
What is the "TO" package of the 7805?

The problem may even be before the regulator.
Thanks. It's a TO-220. Its input is from a 12V supply. I traced more, and it's the same 12V rail that drives the relays. So I assume there "should" be enough current. I don't quite understand the 240VAC-12VDC circuit.
The 5V comes from the existing heater power supply? have you tried an oscilloscope on the 5V power while it boots?
It might not be able to provide the current required.
Thanks. Its on PCB with the MCU, relays and PS. It seems to have a 240VAC-12V supply, then just a 7805 for the MCU. I did not connect an oscilloscope but did an amp meter and I never see more than ~70mA, Yes it seems like there is not enough current provided, but a 7805 TO-220 should be ~1.5A (way more than the 170mA I need)? I will also say that the built-in MCU does not seem to restart. When it starts it beeps and cycles the LED display, while it does this once when AC is applied, it does not recycle. I would think if I was overdrawing the power supply and current it would cause the internal MCU to restart.
 

Sensacell

Joined Jun 19, 2012
3,432
Thanks. It's a TO-220. Its input is from a 12V supply. I traced more, and it's the same 12V rail that drives the relays. So I assume there "should" be enough current. I don't quite understand the 240VAC-12VDC circuit.


Thanks. Its on PCB with the MCU, relays and PS. It seems to have a 240VAC-12V supply, then just a 7805 for the MCU. I did not connect an oscilloscope but did an amp meter and I never see more than ~70mA, Yes it seems like there is not enough current provided, but a 7805 TO-220 should be ~1.5A (way more than the 170mA I need)? I will also say that the built-in MCU does not seem to restart. When it starts it beeps and cycles the LED display, while it does this once when AC is applied, it does not recycle. I would think if I was overdrawing the power supply and current it would cause the internal MCU to restart.

The size of the regulator package will not save you from a limited amount of power available from the primary power source.
If the load demands a current greater than the source can supply, the voltage into the regulator will collapse - and so will the output voltage.

Is the power supply mains isolated?
 

Jon Chandler

Joined Jun 12, 2008
1,029
Remember – power dissipation across the regulator is a major consideration.

Pd = (Vin – Vo) × I where

Pd = power dissipated

Vin = supply voltage to the regulator

Vo = regulator output voltage

I = output current in amps

Dropping 7 volts across the regulator is significant.

The above is TRUE FOR ALL LINEAR REGULATORS.
 

tyro01

Joined May 20, 2021
87
The ESP32 generates a large inrush current when it starts up. Using an oscilloscope, check that the 5V power rail is stable. If the mainboard power up and ESP32 boot are at the same time, it would be better to add a large capacitor on the 5V line and use a supervisor to delay the ESP32 boot timing.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
18,167
Given that the heater is mains powered, and that supply and processor are part of that heater system, why expect that there is any more power available than the original design requires?? Most consumer products do not have any excess capability at all.
In addition, unless there is an isolation transformer in that 12 volt supply, the output common side may be common with the mains, which could be hard on a scope connected to any point in the system. So a small separate isolated supply able to provide adequate current for the added board to boot is the reasonable solution.
 

Thread Starter

Kubes

Joined Jan 31, 2023
7
Thanks for all the feedback. I spent some time and followed traces upstream of the 7805.

A few notes:
  1. The 12V support supply is isolated from the mains
  2. It is the 12V side that is limited. I was able to confirm this with an oscilloscope. There is about a 2V drop.

So here is part of the 12V input supply. (I'll to add another post about this later). I don't know the details on the transformer so I did not connect them on the schematic, and but this circuit is on two of the taps.

So this would limit the current to about 500mA, correct? And to @MisterBill2 point, that is probably what the MCU needs...



1675441901689.png
 

sghioto

Joined Dec 31, 2017
5,378
That 22 ohm resistor will limit the current to appx 200ma before the output of the 7805 will start to drop assuming 12 volts at the cathode of D6.
 

Thread Starter

Kubes

Joined Jan 31, 2023
7
On the power supply, I find it confusing. There is a bridge rectifier (DB107S) whose output (DC) is connected to a transformer (the secondary connected to the 7805 circuits). It does have ~360+ VDC. The input to this is 240VAC 60Hz (US mains). There is what I locked up as PWM IC (PN8147H) that is also connected to the transformer. From my learning perspective, I'd like to understand this better. I added pictures of the power supply part of the PCB

1675443521735.png
1675443678619.png
 

MisterBill2

Joined Jan 23, 2018
18,167
I am amazed that the circuit shown in post #11 even functions at all. T tried putting a resistor (220 ohms) in front of a 7815 regulator and it oscillated at about 2 megahertz and boosted the output quite a bit. So I had to add those 0.1 mFd capacitors from both the input and output to the center, common, pin next to the regulator. And remove the resistor from the input. The capacitors are quite important. For a 5 volt regulator there is a specified minimum input supply voltage that I think is either 7 volts or 8 volts. That voltage under load should be simple to monitor.
Also, the added load may then require the regulator to have a heat sink attached.
 
Top