AC Solenoid Pump Control

Edit - I apologize, I don't know what I was thinking. I blame all the beer... I meant operations per minute by frequency, not Hz...

I'd like to operate the following solenoid dispensing pump. Instead of using a DC power source (which I'm comfortable with) we'd like to cut down cost and use AC power. Would it be possible to just use a set of solid state relays (such as a SainSMART 8 channel OMRON SSR board) and adjust the delay between high/and low writes of the (within minimum and maximum spec of pump ~ .25 seconds to 6 secondsthe pulse-width of a PWM signal with the Arduino to actuate the pumps at the desired flow rate? The pumps only go on and off and depending on the frequency of operation and stroke (mechanically set) you get your desired flow rate.

Power
21 Watts (115/60)
21 Watts (24DC)

Output per Stroke
100 to 1250 µl (AC)
100 to 1000 µl (DC)

Max. Priming Height
72” of H20

Max. Dispense Rate
180 ml/min (AC)
120 ml/min (DC)

Max. Stroke per Minute
120 on H2O

Minimum On-Time
250 milliseconds

Max.On-Time
1 second (AC)
6 seconds (DC)

Repeat-ability
±2%

Link to date sheet -

You can drive it with AC but you cannot PWM that device, you turn it on full and get one stroke. The output per stroke is adjusted mechanically.

SainSMART 8 channel OMRON SSR board
Load voltage range: 75 to 264VAC

So can't do 24volt.
Leo..

That would work with 110 VAC though. And you could vary the ON/OFF pulse rate with Arduino.

What is the source for your 100 Hz value? Certainly not from the datasheet.

The maximum operating frequency for that device is approximately 2.4 Hz when ac powered. The slowest PWM rate you can acheive with a 16MHz Arduino is 30Hz.

I’ll say it again. You cannot PWM that device.

You can certainly control the device with an Arduino. But not with a hardware PWM channel.

I don't believe the OP understands what PWM is, it's more than just a string of pulses at some frequency.

Outsider, you nailed it on the head. I was totally confusing PWM with modulating the pulse rate using delays in my head somehow... by 100Hz what I meant was 100 modulations per minute (blaming it on all the beers)

I edited the OP. So would something like this work? I'm assuming the SSR relays can handle switching at 2.5hz.

This code being the MAX frequency (ugh I hate myself, b) the pump could operate at. Then I would just adjust the delay to slow down the flow-rate correct?

digitalWrite(pumpPin, HIGH);
delay(250);
digitalWrite(pumpPin, LOW);
delay(250);

That’s general idea although you would want to avoid the use of the delay() function as the processor can do nothing else while the call to delay executes. Can I assume you’ll be controlling more than one pump per Arduino? Why else would want a board wth eight relays, right? With more than one pump, you will not be able to use delay() and get maximum output from more than one pump at a time.

The key to avoiding the delay() function is to use millis() to keep track of time. Have a look at the example called “blink without delay”, it’s in the IDE. Here’s some additional information to how to use millis() correctly. https://www.gammon.com.au/millis

Thank you! Yeah that makes much more sense to use millis. Hardware wise though, if I wanted to use 20vdc instead would it make sense to use a MOSFET driver with a flyback diode? It seems mechanical relays aren't designed for switching continuously and DC DC SSR relays are a bit pricey.

Yes, a mosfet is really the best way to interface with dc devices. The pump requires less than one amp at 24vdc so with the proper part, it will not need a heat sink - but the fly back diode is mandatory. Just ensure the mosfet is a logic level device so it is fully turned on with 4volts on the gate, otherwise, the device doesn’t fully turn on, causing the mosfet to overheart and the pump to behave erratically..

There are many low cost, multichannel boards out there. You’ll find several on Tindie if you like to support local effort.