How to Power 24v Pump and Arduino with 24v Power Supply

Hi All,
Longtime lurker, first time poster. I'm a chemical engineer by training, but trying my best to teach myself electronics and have been messing around with the simulators to familiarize myself with circuitry and coding.
I'm trying to fit a power supply, pump and Arduino in a tight space to control an espresso machine. The pump I need to power uses 24v as its main power, as well as 0-5v on a second terminal for pump control. I'm thinking that I can get away with using only one power supply to provide 24v power to the pump, then using a step down/buck converter to get to 9v to power the Arduino (or would 5v be better, rather than going through the barrel jack?).
For reference, the pump is an Fluid O Tech FG304, and I'm thinking of using the Mean Well RPS-120-24 power supply, as it's fairly small and reliable.
Can I connect the pump directly to the 24v power supply, then in parallel run a step down / buck converter to provide the correct amount of power to the Arduino? Any recommendations on the most efficient way to do so would be greatly appreciated.
My main concern is how to provide consistent power to the Arduino when the pump turns on and will pull 24v, 3.5 A.
I plan to use a PWM pin to provide 0-5v power to control the pump speed, via an analog potentiometer or a programmed profile.
Thank you,
Jared

There are far more 24V -> 5V DC-DC converters than 24 -> 9 so I'd go that way. You're on the right track and what you propose should work.

Or use a multiple output power supply if it costs less. This is the only reasonably-priced one I could find in stock at Digi-Key. It just meets the 3.5A output spec, so there's really no headroom.

[edit]
If you check out the surplus outfits like MPJA or BG Micro, you might find a dual output power supply for less.

Do you know for sure that the 5V pump control input will accept PWM?

Thank you both - very helpful. I was planning to use the 5v pin to power a potentiometer that will be used for manual control. Does using the Uno R3 5v pin for power in pose a problem with that? Or, can I use it for power in as well as power out? That's the part I don't quite understand yet.
I've looked into the dual voltage power supplies, but they're all so much larger than some of the single voltage ones. I can outboard the assembly if needed, but my end goal would be to get it all to fit inside the machine, where the stock pump usually sits.
Yes, I know many people have used the Arduino's PWM'd 5v signal to provide power control for the FG series of pumps I'm using. It has an integrated electronic driver and several others have used a PWM signal to control it, so I don't think it should be an issue.

From the official Arduino Uno documentation:
5V.This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don't advise it.

Thanks Jim-p, that sounds like a bad idea for a beginner! I think I'll stick with the DC power jack or VIN pin with 9v. A bit more work finding a perfect step down converter sounds like a better idea than damaging my Arduino.

You can use a cable like this to supply 5V to the USB connector:

OR this

1 Like

Our automated spam filter, Akismet, has temporarily hidden this topic.

Not sure what that's all about? Read the first post, opened a cider, came back and poof the first post is gone?

Anyway if the pump motor does allow PWM to control pump speed and you wish to use a potentiometer to control pump speed I would just connect a pot across 5.0 volts and Ground. The wiper to an analog input of your uC (Arduino). Your code will control an analog input to a PWM output. With a 24 VDC supply I would just, as suggested use a buck converter to get your 5.0 volt supply to your Arduino. I would use a logic level MOSFET to drive your pump using low side switching. Since a pump motor is involved I would likely use a flyback diode across your pump motor terminals. Just to be safe I would also likely add a few decoupling capacitors across your Arduino power input.

Ron

I think that second option will work - I could go 24 -> 5 and use that to power through the USB port. Thank you for all of the help with options!

I'm thinking of using something like this LM317 to get from 24 to 9v if I use the barrel jack:

Is that a good option, or are there 1) more compact and 2) more efficient options?

Thank you again for all of the assistance.

Actually, it seems like the LM317 is a linear regulator rather than a buck converter? Would something like these from Amazon be an ok choice?

The LM 317 is as you mention a linear regulator. Years ago they were one of my GoTo favorites. If I wanted 9 volts there was the LM78XX series like the LM7809. Today we have the option of both buck and boost converters. Very stable and run much cooler. I have used some of these in the past and for everyday hobby applications they work just fine. Just keep the output current demand below 2.0 amps. Figure at $2.50 USD each I can't roll my own circuit for that price.

You can power through the USB port or the DC Barrel Jack connector. The barrel jack you want a minimum of 7.0 volts.

Ron

Awesome - thank you Ron! I'll give those Amazon components a try to see how they'll work for my circuit. I think current draw will be very low for this leg of my circuit, and that the only high current draw will be for the 24v pump power.

Most welcome and I would just use a MOSFET (Logic Level Type) to drive the pump.

Ron

Sorry Ron, I don't quite understand this concept yet. Can you explain what you mean by logic level MOSFET to drive the pump? Would that replace one of the components that I was thinking of using? I know MOSFETs work as "electrical switches" but don't really understand where this would be used, since the Arduino can supply a PWM signal to the pump for 0-5v control.
Thank you again for all of your help,
Jared

Jared, sure we can explain that. You got it, a MOSFET can be used as a switch.

Well alrighty. We have a pump that runs on 24 VDC and you want to drive that pump at PWM for I assume speed control. Using an Arduino, for rxample an Arduino UNO the PWM out will only be 5.0 volt pulses at very limited current. Since your pump runs at a higher voltage than yout Arduino we can use a MOSFET to drive the pump. The circuit looks a little like this example:

So we use a pot on your Arduino and input a voltage. Your Arduino outputs a PWM in proportion to the pot setting. Unless of course your pump already has a speed control?

Ron

Ohhhh I see, thank you for explaining!

Actually, my pump requires constant 24v, but the PWM controller on the pump accepts 0-5v for speed control (3 wires - power, ground, and speed). So, I'm thinking of starting out with a 24v power supply, feeding that to my pump and then to the LM2596 you recommended from Amazon to power the Arduino in parallel. Then, out of one of the Arduino PWM pins, I'll output 0-5v for pump speed control based on either the pot setting, similar to how you recommended, or a pre-programmed "pressure profile" to have the pump run exactly how I want it to.

I think in theory it will work, but have some final steps to get sorted out on the electricity side of things still.

From the pump manual he needs an isolated 0-5V speed command. PWM out with a properly sized cap?

Thanks 2112 - see my reply right before yours for 24v vs. 5v speed control. Hoping to use a 24v power supply to power the pump and then a step down converter to power Arduino. Then, PWM pin from Arduino to control speed.

The manual also has a "alternate" connection setup showing a voltage divider with R2 as a pot. I probably don't need the tach output because I will use a pressure transducer to monitor actual pressure instead of pump speed. The version of the pump I got only has red, black and orange wires, anyway.

Can you elaborate on what you mean regarding the properly sized cap?

Looks like it's best to use an RLC low pass filter