Pulse Detection
07 Jan 2023 05:17 #261153
by Askjerry
Pulse Detection was created by Askjerry
I am installing a water-cooled spindle... if it loses its cooling supply while running, the spindle can burn up. That would be bad.
I will install a hall-effect flow meter... basically, as the water passes through, the center spins and triggers a series of pulses.
My thought is that if I net this signal to a pin... let's call it COOLANT_PULSE and I then net that to a pyVCP LED... I get a blinking light indicating that all is well with the coolant system.
But then I thought... if there is a way to determine the pulse width... and react if it got too big, indicating a poor flow condition... I should be able to react to this and save the spindle... automatically.
For example, say we get 20 pulses a second for a great flow... and a nominal flow is 10 pulses per second... that means that as long as the pulse width is less than or equal to 0.10 seconds... everything if fine.
But let's say the flow gets really bad or stops... the pulse width would go to infinity (no change) on a dead pump, or at the very least, longer than 0.5 seconds for a super slow flow.
Is there a way to measure this pulse width, and tell it that if it gets longer than 0.5 seconds... and/or it just stops... we can trigger an ESTOP to save the spindle???
Sample Flow Meter: www.amazon.com/GRODIA-Connect-Food-Grade...ounter/dp/B07MY6XXYN
Thanks in advance.
Jerry
I will install a hall-effect flow meter... basically, as the water passes through, the center spins and triggers a series of pulses.
My thought is that if I net this signal to a pin... let's call it COOLANT_PULSE and I then net that to a pyVCP LED... I get a blinking light indicating that all is well with the coolant system.
But then I thought... if there is a way to determine the pulse width... and react if it got too big, indicating a poor flow condition... I should be able to react to this and save the spindle... automatically.
For example, say we get 20 pulses a second for a great flow... and a nominal flow is 10 pulses per second... that means that as long as the pulse width is less than or equal to 0.10 seconds... everything if fine.
But let's say the flow gets really bad or stops... the pulse width would go to infinity (no change) on a dead pump, or at the very least, longer than 0.5 seconds for a super slow flow.
Is there a way to measure this pulse width, and tell it that if it gets longer than 0.5 seconds... and/or it just stops... we can trigger an ESTOP to save the spindle???
Sample Flow Meter: www.amazon.com/GRODIA-Connect-Food-Grade...ounter/dp/B07MY6XXYN
Thanks in advance.
Jerry
Please Log in or Create an account to join the conversation.
07 Jan 2023 05:52 - 07 Jan 2023 05:54 #261154
by PCW
Replied by PCW on topic Pulse Detection
You can do this with the oneshot component.
You set it to retriggerable mode and a pulse width of say 0.5 seconds, and trigger it with the flowmeter output.
If the oneshot output ever becomes false (which will happen if you have longer than 0.5 seconds between pulses)
you trigger an estop.
You could also measure the frequency with the encoder component and trigger a fault
if the frequency drops below a preset threshold (using the compare component)
You set it to retriggerable mode and a pulse width of say 0.5 seconds, and trigger it with the flowmeter output.
If the oneshot output ever becomes false (which will happen if you have longer than 0.5 seconds between pulses)
you trigger an estop.
You could also measure the frequency with the encoder component and trigger a fault
if the frequency drops below a preset threshold (using the compare component)
Last edit: 07 Jan 2023 05:54 by PCW. Reason: clarify
The following user(s) said Thank You: tommylight, Askjerry
Please Log in or Create an account to join the conversation.
10 Jan 2023 13:53 #261444
by Askjerry
Replied by Askjerry on topic Pulse Detection
Excellent! I appreciate the quick feedback and I will do some experiments with this.
As for my project, I had some other thoughts as well... I can take an Atmel Tiny-13 microprocessor and program it to set a pin high for a loss of pulses, and another for a slow flow... then just monitor two simple pins. That would be an alternate method.
Then, while working on setting up the tubing for the spindle and such, I was having other issues as the water pump had seized, the vinyl tubing does not fit standard push-in connectors... and no adapter from the existing threads to a standard plumbing fixture that I could find...
I decided to order an air-cooled version and very well may stick with that for the final solution.
Having said that... I will still look into your answer as it may be helpful for other pulse events, and/or could help someone else with a flowmeter setup.
If I come up with anything, I'll post the code here.
Thanks!
As for my project, I had some other thoughts as well... I can take an Atmel Tiny-13 microprocessor and program it to set a pin high for a loss of pulses, and another for a slow flow... then just monitor two simple pins. That would be an alternate method.
Then, while working on setting up the tubing for the spindle and such, I was having other issues as the water pump had seized, the vinyl tubing does not fit standard push-in connectors... and no adapter from the existing threads to a standard plumbing fixture that I could find...
I decided to order an air-cooled version and very well may stick with that for the final solution.
Having said that... I will still look into your answer as it may be helpful for other pulse events, and/or could help someone else with a flowmeter setup.
If I come up with anything, I'll post the code here.
Thanks!
Please Log in or Create an account to join the conversation.
Time to create page: 0.065 seconds