Looking for a pump project (rate volume displacement)

Hi all. I work with pump trucks and we have to keep track of things like pump rate in liters per minute and volume pumped. I have access to the drive shaft of the pump and can stick a magnet on it to measure rotations. I know the volume of the pump just wondering if there is a project out there or if I am reinventing the wheel. Our trucks are getting old and replacement parts like pump rate counters and sensors are getting hard to find and expensive. Also what type of magnetic sensor do you recommend?

Plenty of stuff out there , look up Reed switches , inductive pickups.

Yeah that has been most of my day so far. I can't find anything that calculates flow rate and volume based on displacement of a pump using a magnetic induction sensor on the pump shaft.

That’s understandable. Most hobbyists wouldn’t work with that setup. However, it’s doable with an Arduino UNO and possibly a Hall effect sensor.

This will be a 5V system, which isn’t directly compatible with the truck’s 12/24V power, but a buck converter can handle the voltage conversion. Make sure to use an automotive-rated converter if it will be powered by the truck.

A few questions to consider: How fast will the shaft rotate? Will it be used outdoors? What temperature range is expected?

I can give it good power. I'm not worried about that. And it will be inside the operator cab so no temperature extremes. Cooled in the summer warmed in the winter. The sensor would be outside so anywhere from -30 to +40 The shaft may be just crawling at 10 RPM or up to 400 RPM if it is just screaming.

That speed would be no problem. Check this link for starters: https://www.instructables.com/RPM-Measurement-Using-Hall-Sensor-and-Arduino/

1 Like

Why did you not buy a supply of replacements when they were cheap? Equipment maintenance is a big part of a business. Or you could buy enough, now, before the price goes even higher.
When you design your own replacement devices, will you have the capability to calibrate them? What, exactly, is wearing out on the current devices?

This equipment was old when we got it. Mostly auction stuff. Some made in germany. Some in north america. Some in china. It's a mixed bag. Displays wear out. Buttons stop working. Guys spill drinks on the console. Sometimes sensor wires get worn thru and make a short burning out the unit. All different makes and models. Buying multiple spares even if I had a time machine wouldn't be viable. Yes I can calibrate them. But the pumps don't change they are a fixed displacement. Some of the controllers that are available cost between $400 for a simple pulse counter and $1200 for a programmable logic controller. And if I can make a $5 Arduino spit out a rate why not try it?

Is it a positive-displacement pump? If not, the volume will probably vary by motor speed.

Little bit of history: about 15 years ago I was approached by someone because of an online post I made in an electronics forum. He had a business fueling up construction equipment and wanted to eliminate his employees selling diesel on the side so he asked me to design a counter that interfaced to a flowmeter to record all fuel dispenses. The fuel volume would go to a PC in the cab that monitored the stop and made sure that the volume dispensed at that location was correct.

Few years after that, I got a call from a well-known logistics firm who was piloting a system where their trucks would be fueled and have oil/fluids topped off by an automated system. They just needed me to design something to read flowmeters (and do a few other things). That's what actually prompted me to start the Cedar Lake Instruments business.

A couple weeks ago, I got a similar request for a system to read flowmeters for fuel dispense. They knew of me from the system in the previous paragraph.

Common thread: they all measure fuel dispense by measuring the actual flow, not motor movement, which would be easier.

Anyway, I think you're on the right track. The pulse counters that interface to a PC and can handle a non-desktop environment tend to be expensive simply because the volumes are so low. There just isn't a lot of need for this kind of counter -- the vast majority of counting equipment is in panel meters. As a result, the few people selling them have to charge a lot to make up for the low volume.

At least, that's my opinion, having been in the industry.

2 Likes

Yes, I know exactly how that works. My late business partner bought this tiny electronic assembly service with one customer and various old equipment that had originated at Tektronics in Beaverton, Oregon. What worked was automated thru-hole equipment made in the USA. Wave solder machine made in Germany, IR oven made in the US. Included, but not used, was a pick-and machine made in England.
I bought 45% of the company and ran the operation. Many equipment pieces were replaced, but always used. One pick-and-place machine was new. A second was refurnished. Much was purchased on EBAY and at auctions and some at yard sales!
Ended it all in November of 2019.
So, I will do all I can to help you with the project, as I know how important it is to you.

2 Likes

Yes it is a fixed displacement pump. When the speed doubles flow doubles. Just big dumb chunks of iron on a crank shaft like an engine. I can rely on motor speed. That is cool about you solving the flow problem. Yes fuel theft it a problem if certain types of people have access. I worked at a place where they yanked all the fuel cards and the boss had to come fuel up everyone at the end of the day. I was embarrassed for him.

I know exactly what you mean! I had to source a part from a damn Zamboni for one of my pumper rigs a while ago! I do appreciate the help. I've made some Arduinos do some really cool stuff and I really think they could do a lot for my job. This seems very promising

He measures the millis between pulses and gets great response time. Seems simple to throw in the displacement of the pump and just multiply it by the number of strokes.

I have his code working. I can click the button like mad and get a pump rate. I need to add displacement for volume pumped and rate of flow but the mechanics seem to be there.

@cedarlakeinstruments asked if your pump was positive displacement, the pump delivers the same volume of fluid with each rotation regardless of speed. If so, your method could work as long as NO AIR could ever enter the pump. If air got in, then a pump rotation would deliver LESS volume of fluid. You really need a flow meter separate from the pump.

That description does not fit any of the positive displacement pump descriptions. Can you be more precise?

That looks like a well-written sketch that does not use blocking code.

One could, and I probably will later, add a "happens at the same time" bit of code to synthesize the input waveform and test this more like end-to-end before it ever sees a real pump take a single stroke.

I just did this recently, exactly. I added two adjustable signal generators to a sketch designed to get two flow rate sensors behaving. I find it when I get out from uber the umbrella.

a7

1 Like

Next step, automated unit testing :slight_smile:

Here's the code in #13 with... the baud rate adjusted for the 21st century and a fake signal generator replacing the pushbutton.


Wokwi_badge UA Self Test


I can't tell if it is working, but it looks plausible. If the sketch was non-blocking, the output should match your intentions up to the point where the algorithm would fail for speed or whatever.

The white wire just connects the signal generator to input at 2. The slide fader sets the period. The fake signal generator needs to be called frequently, much more frequently than the frequency it is expected to produce. I put the call at the top of the loop, I did not confirm that this means it is being called way frequently enough,

a7

2 Likes

The cylinders have a fixed volume. They always pump the same amount of water with every stroke. The only way they ever pump less is if the pump pulls fast enough to cause cavitation which we avoid like the plague. This is a 3 cylinder reciprocating positive displacement pump.

Hey that's really cool thanks! WOKWI is really useful but I wish it had a signal generator like you just made! Thank you, I will try to wrap my head around that. It will be very helpful.

That's what drew me to it. Instead of counting pulses for a fixed time and calculating the rpm it seems to count the milliseconds between pulses and extrapolates the rpm from that. Very clever and responsive.