Get speed from peristaltic pump, add magnet and hall effect? - Page 1
Forum section: electronics / projects

author: rhodges
author_rank: Frequent Contributor
timestamp: August 20, 2019, 02:16:07 pm
content: I am working with small and cheap peristaltic pumps. The goal is to feed oil slowly into a burner. My PWM is working, but it is open loop. I really would like to get the pump speed.I am open to all ideas. Right now, I am thinking of adding a magnet to a pump roller with a hall effect device on the outside. In the pictures, you can see that the magnet is very small compared to the roller. I would drill a shallow hole in the roller for the magnet and trim down the post that holds the roller.Thanks!

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: August 20, 2019, 06:05:58 pm
content: Magnet and hall effect is a common way to sense. There are some rotary hall effect sensors you could put on the end of the motor shaft.https://www.allegromicro.com/en/Insights-and-Innovations/Technical-Documents/Hall-Effect-Sensor-IC-Publications/Advanced-On-Chip-Linearization-A1332-Angle-Sensor-IC

author: OM222O
author_rank: Frequent Contributor
timestamp: August 20, 2019, 07:47:30 pm
content: I think optical encoders are cheaper than magnetic counterparts and you can get them in really thin packages too

author: jbb
author_rank: Super Contributor
timestamp: August 20, 2019, 08:34:42 pm
content: Quote from: rhodges on August 20, 2019, 02:16:07 pmIf you can live with a slow update, then magnet + Hall effect sensor is simple and effective and should be quite forgiving on alignment, dust and grease. But it'll only update once a turn, so it won't allow for fast, smooth control of the pump motion. You'll be able to gradually adjust the PWM to get a constant speed over the course of a few turns.If you want to enable fast & smooth control with a response time in less than a few turns, then a higher resolution encoder is required as others have suggested.

author: CM800
author_rank: Frequent Contributor
timestamp: August 20, 2019, 08:52:29 pm
content: Quote from: OM222O on August 20, 2019, 07:47:30 pm... really? That's news to me! I'd love to find low cost optical encoders!http://www.hobbytronics.co.uk/magnetic-encoder-kitor one of the many on-axis magnetic encoder chips (a personal favourite)https://www.allegromicro.com/en/Products/Sense/Linear-and-Angular-Position/Angular-Position-Sensor-ICs.aspx

author: james_s
author_rank: Super Contributor
timestamp: August 20, 2019, 08:55:41 pm
content: You don't need an encoder, just something to give you a pulse or pulses per rotation. Hall effect, optical, shouldn't matter much either way.It's also possible to measure the speed of the motor from the back EMF.

author: cv007
author_rank: Frequent Contributor
timestamp: August 20, 2019, 09:32:49 pm
content: What you are really after is rate of flow ?Build up a table of values- pump a gallon of oil at a specific pwm or voltage. Do that for a range of rates you may need. Now you know the flow at various voltages/pwm and can probably get pretty close to the output you want via voltage/pwm over time. Once you have those values, I doubt there is anything that will change.If we are talking very low rates and need revolutions, maybe you simply then have a fixed pwm and just count pulses sent out (x pulses = y revolutions = z oil). Not sure if that would work, just a thought.I think I would at least play around with that before doing more hardware.I have a little water pump that runs at 12v/70%pwm which draws 2A and gets me 2GPM. I had done some experiments to get voltage vs rate and settled on 70% to get 2GPM. When it runs, I just keep track of time (only to the second) and the result is pretty accurate- within an ounce or two (not that it matters a great deal in this case, just nice to know). To detect when the pump is actually needed or is finished, I use adc to measure back emf between pwm pulses. With a peristaltic pump it all probably looks the same whether liquid/no liquid, so that would probably be of no use (compressing the silicone tube is probably most of the work).

author: DaJMasta
author_rank: Super Contributor
timestamp: August 20, 2019, 10:07:22 pm
content: Do you think swapping in a stepper for the standard motor could be an option? Since peristaltic pumps isolate the liquid in a relatively set quantity to pump it, you can know output flow quite well if you know revolution speed and they are much more repeatable than standard pumps... so you may be able to get away with direct control over the number of revolutions rather than a closed loop system.That said, if you're not doing high quantity... you could drill a hole in either side of the housing, shine a light through with a photodetector, and monitor the output to see the rollers going by. If you can get decent data from it, that would give you 3 points per revolution with a fairly simple optical solution, provided the analog tuning of the opto isn't too complicated.

author: RoGeorge
author_rank: Super Contributor
timestamp: August 20, 2019, 10:21:40 pm
content: The speed of a brushed DC motor can be regulated without any external sensor, by looking at the back EMF. There are many dedicated ICs for that, but can be done easily with discrete components, too. That is the analog way (without using PWM):https://www.precisionmicrodrives.com/content/ab-026-sensorless-speed-stabiliser-for-a-dc-motor/Alternatively you can read the RPM (without using any external sensors, only by looking at the back EMF), so you can implement your own digital control loop:https://www.precisionmicrodrives.com/content/ab-021-measuring-rpm-from-back-emf/

author: rhodges
author_rank: Frequent Contributor
timestamp: August 20, 2019, 10:33:24 pm
content: Quote from: cv007 on August 20, 2019, 09:32:49 pmI have already done one-minute tests on four pumps, so I have numbers on grams per minute at different PWM values.I want to detect stalling. The motor shaft just presses (firmly) against the three rollers. If it slips, I want to catch that. If the motor stalls, I want to catch that. So I want to know that the rollers are turning, and at a reasonable rate.

author: rhodges
author_rank: Frequent Contributor
timestamp: August 20, 2019, 10:40:17 pm
content: Quote from: DaJMasta on August 20, 2019, 10:07:22 pmNo. The motor shaft is matched to the rollers so that the friction is "just right".I know parts will wear out and fail, so I will have spares at all times. These pumps are less than $4 each.I appreciate your point about the flow being a function of pump speed. That is why I think this type is the best for my application. I want slow, steady, and safe failure.Thanks!

author: cv007
author_rank: Frequent Contributor
timestamp: August 20, 2019, 11:14:31 pm
content: >With a peristaltic pump it all probably looks the same whether liquid/no liquid, so that would probably be of no use>I want to detect stallingWell, then maybe measuring back emf between pulses would work for that. Stalled = no movement = no back emf = seeing supply voltage through motor. Not stalled = some back emf = less than supply voltage seen depending on rpm. Although you can't really measure the liquid load as it will look similar enough whether pumping liquid or an empty tube, I would think you can at least determine if the motor is moving at all. There probably is no middle ground- its moving or its stalled.

author: David Hess
author_rank: Super Contributor
timestamp: August 21, 2019, 01:02:05 am
content: Back EMF and current sensing can be made to work but a hall effect sensor or an optical interrupter will be simpler. Multiple magnets or blades will allow multiple pulses per revolution if desirable.