Author Topic: Get speed from peristaltic pump, add magnet and hall effect?  (Read 2082 times)

0 Members and 1 Guest are viewing this topic.

Offline rhodgesTopic starter

  • Frequent Contributor
  • **
  • Posts: 359
  • Country: us
  • Available for embedded projects.
    • My public libraries, code samples, and projects for STM8.
Get speed from peristaltic pump, add magnet and hall effect?
« on: August 20, 2019, 02:16:07 pm »
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!
Currently developing embedded RISC-V. Recently STM32 and STM8. All are excellent choices. Past includes 6809, Z80, 8086, PIC, MIPS, PNX1302, and some 8748 and 6805. Check out my public code on github. https://github.com/unfrozen
 

Offline Conrad Hoffman

  • Super Contributor
  • ***
  • Posts: 2210
  • Country: us
    • The Messy Basement
Re: Get speed from peristaltic pump, add magnet and hall effect?
« Reply #1 on: August 20, 2019, 06:05:58 pm »
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
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: Get speed from peristaltic pump, add magnet and hall effect?
« Reply #2 on: August 20, 2019, 07:47:30 pm »
I think optical encoders are cheaper than magnetic counterparts and you can get them in really thin packages too  ???
 

Offline jbb

  • Super Contributor
  • ***
  • Posts: 1301
  • Country: nz
Re: Get speed from peristaltic pump, add magnet and hall effect?
« Reply #3 on: August 20, 2019, 08:34:42 pm »
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.

If 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.
 

Offline CM800

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: 00
Re: Get speed from peristaltic pump, add magnet and hall effect?
« Reply #4 on: August 20, 2019, 08:52:29 pm »
I think optical encoders are cheaper than magnetic counterparts and you can get them in really thin packages too  ???


... really? That's news to me! I'd love to find low cost optical encoders!

http://www.hobbytronics.co.uk/magnetic-encoder-kit

or 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

 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Get speed from peristaltic pump, add magnet and hall effect?
« Reply #5 on: August 20, 2019, 08:55:41 pm »
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.
 

Offline cv007

  • Frequent Contributor
  • **
  • Posts: 974
Re: Get speed from peristaltic pump, add magnet and hall effect?
« Reply #6 on: August 20, 2019, 09:32:49 pm »
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).
 

Offline DaJMasta

  • Super Contributor
  • ***
  • Posts: 2447
  • Country: us
    • medpants.com
Re: Get speed from peristaltic pump, add magnet and hall effect?
« Reply #7 on: August 20, 2019, 10:07:22 pm »
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.
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 7911
  • Country: ro
Re: Get speed from peristaltic pump, add magnet and hall effect?
« Reply #8 on: August 20, 2019, 10:21:40 pm »
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/
« Last Edit: August 20, 2019, 11:06:43 pm by RoGeorge »
 

Offline rhodgesTopic starter

  • Frequent Contributor
  • **
  • Posts: 359
  • Country: us
  • Available for embedded projects.
    • My public libraries, code samples, and projects for STM8.
Re: Get speed from peristaltic pump, add magnet and hall effect?
« Reply #9 on: August 20, 2019, 10:33:24 pm »
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.
I 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.
Currently developing embedded RISC-V. Recently STM32 and STM8. All are excellent choices. Past includes 6809, Z80, 8086, PIC, MIPS, PNX1302, and some 8748 and 6805. Check out my public code on github. https://github.com/unfrozen
 

Offline rhodgesTopic starter

  • Frequent Contributor
  • **
  • Posts: 359
  • Country: us
  • Available for embedded projects.
    • My public libraries, code samples, and projects for STM8.
Re: Get speed from peristaltic pump, add magnet and hall effect?
« Reply #10 on: August 20, 2019, 10:40:17 pm »
Do you think swapping in a stepper for the standard motor could be an option? 
No. 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!
Currently developing embedded RISC-V. Recently STM32 and STM8. All are excellent choices. Past includes 6809, Z80, 8086, PIC, MIPS, PNX1302, and some 8748 and 6805. Check out my public code on github. https://github.com/unfrozen
 

Offline cv007

  • Frequent Contributor
  • **
  • Posts: 974
Re: Get speed from peristaltic pump, add magnet and hall effect?
« Reply #11 on: August 20, 2019, 11:14:31 pm »
>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 stalling

Well, 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.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 18776
  • Country: us
  • DavidH
Re: Get speed from peristaltic pump, add magnet and hall effect?
« Reply #12 on: August 21, 2019, 01:02:05 am »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf