I am a beginner in robotics. I am planning to drive a 12V DC motor from Raspberry Pi 2 B. I know Pi does not have that capacity to drive such a device, so I am using L293D motor driver to control the DC motor. However, the problem is the 12 V supply requirement of the DC motor.

I know I can invest and buy these high power Duracell (any other) batteries and plug them to the DC motor supply. But the drawback is, that these batteries are non-rechargeable and as a result I'll be in constant need of purchasing new ones. The rechargeable batteries are very expensive for me.

So, I found about about these Boost converters, that can convert 5V to any other higher voltage say, 12 V. XL6009 is the module I'm interested in buying. However, I wanted to know that is it recommended to use XL6009 regulators to drive 12 V DC motors?

The XL6009 module will be powered with 5V DC supply from a separate source.

Please suggest any other alternatives, if XL6009/boost regulators are not an ideal source of supply for DC motors.

XL6009 details can be found here - https://www.sunrom.com/p/step-up-dc-dc-based-on-xl6009

L293D details can be found here -http://www.ti.com/product/L293D

Motor details can be found here - https://www.amazon.in/NTL-National-Multipurpose-Brushed-Applications/dp/B01FW9IHN0/ref=sr_1_1?s=industrial&ie=UTF8&qid=1517932524&sr=1-1&keywords=12v+dc+motor&dpID=41YN%252B0n3FYL&preST=_SX342_QL70_&dpSrc=srch

  • 1
    \$\begingroup\$ FYI: Periods and commas are not supposed to have spaces in front of them. \$\endgroup\$
    – Bort
    Feb 6, 2018 at 16:09
  • \$\begingroup\$ If you're going to do more robotics/electronics projects in the future, invest in a variable DC power supply. They're cheap and an essential piece of equipment for any electronics hobbyist. If you're going to do a lot of robotics specifically, it's worth the extra cash to pick one up that can output more than the typical 5-10A (i personally use this one: amazon.com/TekPower-TP1540E-Adjustable-Switching-Digital/dp/…) \$\endgroup\$
    – Ocanath
    Jan 29, 2020 at 21:38

2 Answers 2


5V boosted to 12V means 12V/5V= 2.4 times the current.
IE: If you are drawing 1A at the 12V output, you need 2.4A at the 5V input. And that's at 100% efficiency, which we all know is not possible. That boost module states an efficiency of about 94%, but I'd still expect less.

That boost module link states a 4A input max and that the inductor can handle 3A max. I can say from experiance with those very boost modules that 3A continuous will burn them out at room temperature without heatsinks and fans. I'd say 2A is a good limit.

You did not give any details about the motor other than it is "12V"...
Your motor will have current spikes upon starting, which you may be able to get away with, as it won't be continuous.
However, the motor appears to be rated at 1.2A max. You need 2.4*1.2A= 2.88A on the 5V input. That's awfully close to the hard-limit of 3A. If we also consider the current spikes upon starting or 'power-breaking' (quickly reversing direction), the current will be higher still.

I would not feel comfortable with that boost converter for extended use. It would be less an issue if the motor were used at only partial capacity. If it is used lightly then you may be fine.

Regardless, I would recommend connecting a PTC (auto resetting fuse) inline with the input of the boost converter. They don't cost much.
PTF fuses can take a while to blow at 100-150% (seconds to minutes), so pick a rating of about 2A. That way, there is some form of protection against a stalled/"stuck" motor. They are thermal based, and will heat up (a lot) once they trip. In order for them to "reset", the current must be dropped.

PTC fuse

  • \$\begingroup\$ Oh , Im sorry , I forgot to add details about the motor . I have updated in the question . Please check . It says 0.2A max current required , but Im not sure . Please check . Thanks \$\endgroup\$ Feb 6, 2018 at 15:56
  • \$\begingroup\$ @BoudhayanDev - Did you try it? How did it go? \$\endgroup\$
    – Bort
    Feb 27, 2018 at 15:53
  • \$\begingroup\$ So, I did try the XL6009 with a power bank (5V 2A rating). I could successfully generate 12V from it and the 2 DC motors worked really well with it. However, I ran into another problem. The power bank was shutting off within every 1 min of usage. I tried extracting 12 V from 5V-1A port, but it did not matter. I don't know if the power bank has an internal module that switches it off once the current drawn from it reduces below the rated supply or it is any other problem. Nevertheless, I brought myself a $9 12V rechargeable battery and everything seems to work fine now. \$\endgroup\$ Feb 28, 2018 at 16:54
  • \$\begingroup\$ Powerbank might be waiting for some communication on usb. (some turn off also with no/light load, but thats not the case now) \$\endgroup\$
    – fifi_22
    Nov 13, 2020 at 12:15

No, using a boost converter to power a motor is not really a very wise approach.

What you probably should do is use some number of AA-size or larger NiMH cells which can be relocated to a consumer charger. If you really want to try charging in the device, use the more robust NiCd chemistry and at most C/10 charging. While there are definitely battery types on the market today with higher energy density, they add inappropriate complexity to a learning project.

You also most likely want to replace the lossy L293 with a more efficient FET based bridge.

Finally you'll need to consider the fragility of the filesystem state of your pi in the face of unexpected power loss. You may wan to give the pi its own power system; or if you're not really using the fully capability of the pi, consider instead something more in the realm of a traditional MCU, OpenWRT style Linux that can boot from a NOR flash and run from a ram disk, etc.

(Note, the question appears abandoned, but was resurfaced by the churn daemon; it's quite possible it should simply be closed)


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.