Using one power source for Arduino and motor.

My goal is to supply power to an Arduino UNO and a 12VDC motor with only one power supply.

Take for example project 9 (motorized pinwheel) from the Arduino starter kit basic. Replace the battery with a 12vdc constant supply and use a 12V motor.

Is there a proper way to power the board from that same 12V that is powering the motor?

I have tried:
-12v into barrel jack (power supply shuts off)
-Buck converter to step down 12V into 5V and connect to Arduino Vin. ( board stays on but not enough power to run pump anymore. Measuring around 2volts at pump.)

I'm also using 4 digit display and a ph sensor on my setup so there is a load on the board.

schillaman2021:
My goal is to supply power to an Arduino UNO and a 12VDC motor with only one power supply.

You can, as far as you decouple well the 2 power lines with 2 diodes, and enough filter capacitors for each line ... also, if the motor connections are exposed, always better to solder directly at motor 2 blocking inductors, one each contact of the motor, and at least a 100n ceramic between the motor pins ... some industrial applications also adds other 2 capacitors from each pin to motor metal case, but not all ...

-12v into barrel jack (power supply shuts off)

Strange ... your 12V power supply can give enough current for all your load ? ... but anyway, is always better to not put more than 7 or 8 VDC in jack, more you use, more the onboard regulator heats (hqw much, depend from the rest of the load AND from the difference from input and output on the regulator ... ohm law), and can go in thermal protection, or also burn out ...

use one of those small DC-DC board for turn the 12v branch for the Arduino in 7V or so, and power it from jack with these 7V ... and ofcourse use a mosfet or an open-collector transistor for drive the pump from Arduino (connecting a motor on a pin of the MCU is almost sure you burn that pin)

Etemenanki,

That worked great! Used DC-DC board from 12 to 7 and into barrel jack.

Yes, I'm using mosfet to drive pump. My first iteration of this project used two separate power supplies and a relay. Thinking this is a more streamlined approach.

Thank you for your advise!

-12v into barrel jack (power supply shuts off)

What do you mean "power supply shuts off"? Do you really mean the external 12V psu? Post a link to the specs of the PSU. Hard to see how it can run a motor if it does not have enough power for a Mega! Or do you mean the Mega shuts down? That could be it's onboard regulator overheating, because it is having to supply too much current at 5V. What else is connected to the Mega?

-Buck converter to step down 12V into 5V and connect to Arduino Vin. ( board stays on but not enough power to run pump anymore. Measuring around 2volts at pump.)

You should connect that to the Mega's 5V pin, not the Vin pin. Vin requires at least 6.5V. If you adjust the buck converter to 6.5V or more and connect to Vin, that simply wastes more power as heat. But you say the pump (same as the motor you mentioned before, or something different?) sees only 2V? Sounds even more like your 12V PSU is hopelessly inadequate!

-Flycow DC Power Supply Variable, Adjustable 30V 10A Switching.
I rebuilt, got rid of buck converter and went 12V right into barrel jack and that is working! Draws about .12 with board, display and sensor. Max draw around .34 when pump is also on. This setup is where I thought started but I must have had something slightly different.
This is now WAY more effective than the relay and two supplied I had on my first rev!

I would think drawing 0.34A with 12V supply would cause the regulator to overheat. It would need to dissipate over 4W!

Why does the mega draw an extra 0.22A when the pump is on? Are you switching it with a relay? A logic level MOSFET would be smaller and require no current at all. For example stp16nf03l. Beware of MOSFET modules on eBay, many are not well designed and will get hot and run the pump at a slower speed because the voltage is reduced.

Hello,
You can use a solid state relay with a built-in optocoupler, this way you completely separate the power section from the "Arduino" section. Solid state relays take very low power from your Arduino and therefore it is very well possible, given the small load that 12V can be used to supply the Arduino.

SSR relay

Best Regards,
Johi.

this way you completely separate the power section from the "Arduino" section.

The OP wants to run both from the same power supply, so they can't be separate.

Also with SSR (or optomos, if the load is not too big), you can use both separate powers OR single power ... the only advantage using optomos or optoSSR is that you don't have to care about how to drive correctly the mosfet (their input is a led, so just need a resistor)

Only be sure to choose an SSR or optomos for DC, cause most of them are rated only for AC (triac baser SSR) and cannot be used for DC (once triggered you need to disconnect power for turn them off) ... mosfet based SSR for DC must be used if the power to switch is not AC ...

Connecting a logic level MOSFET is easy. A 10K pull-down on the Arduino pin and a 220R or 330R between the pin and the MOSFET gate. That's it.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.