Microcontroller (ESP32) and DC motor powered by the same source

Thread Starter

chiefowl1971

Joined Jan 19, 2022
4
Hello to All!

I'm new here and also very new to microcontrollers. I was planning on trying to use an ESP32 to, among other things, control the speed of 12V and higher DC motors all from the same power source. As part of planning I did some research if using a single source (~14.8 V / 3.5 A) to power both a microcontroller like the ESP32 is possible. Yet I cannot find definitive answer.

What I do know is that a similar setup exists for digital slot cars from Carrera that, from what I can tell, make use of the stm8s003f3 while also controlling the DC motor.

Is anybody willing to help me determine if running an ESP32 and a 12 and higher volt DC motor from the same power source is doable?

Thanks in advance for advice and patience.

William
 

ErnieM

Joined Apr 24, 2011
8,377
That should not be a problem. Just connect the "single source (~14.8 V / 3.5 A)" power return to the ESP return, with some sort of 5V regulator between the positives.

I built a LED controller where the LEDs need 12VDC. The only issue I ran into is the ESP draws some 200 mA, and dropping 7V with a linear regulator means burning off 1.4 watts, which can be troublesome (meaning I missed this and had to re-spin my PCB).

Best connect the return between the ESP, power, and motor at one point close to the power, so motor current doesn't upset the ESP. Put a decent cap there as well.
 

PhilTilson

Joined Nov 29, 2009
131
Yes, as ErnieM says, 'losing' 1.4 watts or more can be a nuisance. Better to use one of the small (and incredibly cheap) buck converters now available to do this, rather than a linear device.
 

Hemi

Joined Mar 17, 2012
30
Also, make sure to include a flyback diode near the motor to handle the voltage spike when you turn the motor off.
 

Thread Starter

chiefowl1971

Joined Jan 19, 2022
4
That should not be a problem. Just connect the "single source (~14.8 V / 3.5 A)" power return to the ESP return, with some sort of 5V regulator between the positives.

I built a LED controller where the LEDs need 12VDC. The only issue I ran into is the ESP draws some 200 mA, and dropping 7V with a linear regulator means burning off 1.4 watts, which can be troublesome (meaning I missed this and had to re-spin my PCB).

Best connect the return between the ESP, power, and motor at one point close to the power, so motor current doesn't upset the ESP. Put a decent cap there as well.
Thank you ErnieM for the help / input!!
 

mmcginty

Joined Feb 4, 2010
57
That should not be a problem. Just connect the "single source (~14.8 V / 3.5 A)" power return to the ESP return, with some sort of 5V regulator between the positives.one of the dev

I built a LED controller where the LEDs need 12VDC. The only issue I ran into is the ESP draws some 200 mA, and dropping 7V with a linear regulator means burning off 1.4 watts, which can be troublesome (meaning I missed this and had to re-spin my PCB).

Best connect the return between the ESP, power, and motor at one point close to the power, so motor current doesn't upset the ESP. Put a decent cap there as well.
ESP32 is a 3.3v SoC, 5v won't make it smoke but it will kill it in a short time. Maybe you used one of the dev boards with its own LDO on board? Also if you power up the WiFi radio it will briefly draw a bit more than 700 mA.
 

ErnieM

Joined Apr 24, 2011
8,377
Now I didn't say "don't use a linear regulator, use a buck." I did use a buck on the rev A board as a work around as the tiny SOT regulator was running very hot, though it ran that way for months till I snuck in a replacement (which did not cure the connection issue I was having).

Current version (with only a few days of up time) uses a LD1086DT50TR 5V linear regulator in a larger TO-263-2 package. That sits on a thermal pad some .8 in^2 in area, heat piped to the rear and another 1 in^2 pad. Very slight temperature rise as measured with my well calibrated finger tip.

Don't belittle finger tip thermometers. I worked with a guy who was accurate to ±3°C up to about 70°. If it feels slightly warm it is just fine.

Here is the buck converter I used. Overkill but I used it in other areas too.
 
Top