0
\$\begingroup\$

I have a 12V battery.

I want to take 3.3V from it for my ESP32 Microcontroller. I also want to take the remaining voltage (say 8.7V) for my motor driver to drive motors.

How can I achieve that without purchasing expensive components?

\$\endgroup\$
8
  • 2
    \$\begingroup\$ Just use a buck converter for 3.3V and use 12V for the motors and their controller. \$\endgroup\$ May 19 at 11:26
  • 1
    \$\begingroup\$ You must define "expensive" first, as you definitely have to add components to convert voltages. \$\endgroup\$
    – Justme
    May 19 at 11:31
  • 5
    \$\begingroup\$ @JunSeo-He no you can't. electronics.stackexchange.com/questions/106718/…. Your motor won't run and your ESP32 will fry if you try this. \$\endgroup\$
    – brhans
    May 19 at 11:33
  • 4
    \$\begingroup\$ @JunSeo-He go ahead and do that. Don't forget to simulate the orders of magnitude changes in current drawn by the motor. Come back and tell us how well the voltage divider managed to regulate the voltage with changing current drawn from its 'output' point. \$\endgroup\$
    – brhans
    May 19 at 11:43
  • 4
    \$\begingroup\$ @JunSeo-He you also don't account for how the ESP32 on the 'bottom half' of the divider would be able to control the motor driver on the 'top half' of the divider when those 2 separate circuits would have different ground reference points. In fact the 'ground' point of the motor driver would be the 'Vcc' of the ESP32... If you're convinced you're correct, please write your idea up as an actual answer so that the community can vote on it. \$\endgroup\$
    – brhans
    May 19 at 11:47

4 Answers 4

4
\$\begingroup\$

The easiest way for a hobbyist to do this is to purchase one or more buck regulator modules that use a switchmode regulator chip to reduce the voltage without much loss. Then use the 12V for the motor with PWM. You could also use a second regulator for the motor, but the rating should accommodate the maximum current the motor draws briefly when starting (eg. stall current). For example, regulators based on XLSemi's XL4016 can typically handle several amperes.

Eg. (Adafruit):

enter image description here

You can find larger modules capable of an ampere to several amperes with adjustment potentiometers on Amazon etc. Naturally you would adjust the output voltage before you connect the load.

It would be prudent to add a fuse and reverse battery protection.

You could also purchase the chips used and add inductors and so on, but this kind of chip is sensitive to layout and I doubt you'd save any money.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ +1 for this cute thingy with an integrated inductor running @2MHz \$\endgroup\$
    – devnull
    May 19 at 12:10
2
\$\begingroup\$

You can use relatively cheap components. So-called voltage regulators are quite ubiquitous.

They come in two main types. Assuming that your microcontroller does not draw much current you can use a linear regulator to get 3.3V. This is the simple low-power type.

I think the ESP32 draws short bursts of current when communicating over Wi-Fi. If it resets when transmitting, add more capacitance to stabilize the 3.3V.

For your motors you could use a switching regulator, but it's even better if you can use 12V to power your motors, for example by using PWM to decrease the average current. When you control a motor with PWM this actually makes the motor into its own switching regulator.

I cannot recommend specific parts. If you just search for e.g. "3.3V linear regulator" you will find plenty. A lot of regulators have adjustable output voltages.

\$\endgroup\$
1
\$\begingroup\$

Getting a voltage lower than the battery is simpler than a voltage greater than the battery. A voltage divider will give you a lower voltage, but the voltage will be sensitive to the load. A voltage divider with any kind of load is inefficient and wastes power.

Voltage regulators that can handle the power are more efficient. You will need to give the voltage regulators the 3.3V and 8.7V voltage reference. You can use Zener diodes for a voltage reference. You can use a potentiometer for an adjustable voltage reference. You might find voltage regulators with with the voltage reference internal. Here is a general applications note.

Switching supplies are even more efficient. Here is a tutorial.

\$\endgroup\$
1
  • \$\begingroup\$ +1 for the zener regulation. \$\endgroup\$
    – Jun Seo-He
    May 19 at 11:43
0
\$\begingroup\$

I would use two DC>DC converters to give each device their own supply, fused of course.

Trying to connect them in series will lead to voltage fluctuations if the motor load changes etc

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Specify there are "switch mode power" supplies for "efficiency" ... :-) \$\endgroup\$
    – Antonio51
    May 19 at 11:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.