ni.com is currently experiencing unexpected issues.
Some services may be unavailable at this time.
09-06-2025 08:08 PM
Hi Everyone,
I'm working on a system that uses solenoid valves to control fluids. However I don't have a direct feedback from the valve to determine if it's open or closed.
Here's what I need help with:
Solenoid valves do this fun thing where the current briefly drops when they start moving.
We're already measuring the current of the valve to determine the response time when reviewing the data.
Is there a way for me to pattern match the current waveform and output a Boolean if it does roughly match a specified waveform? I'm not planning on doing it constantly but maybe just for 100ms after the output has turned on.
If that's not possible how else would you do it? maybe monitor the current drop as the current is increasing?
I also have no idea how I would monitor the valve closing as the current would just go straight to 0A when the relay opens so if you have any ideas on that let me know.
Thank you
09-06-2025 09:20 PM
If the solenoid position state is important get a solenoid with position feedback, it would be cheaper and more reliable that adding a current acquisition system that can identify the correct current waveform, which might change over time and with load.
Not that I would ever do this but as a technical question on for how I would go about pattern matching as far as I can see there are a couple of options:
1- if you can accurately repeat the acquisition, then could put a limits waveform around the acquired signal and test.
2- differentiate the signal, but only after a low pass filter (because differentiating noise adds a lot more noise) and look for a positive signal followed by a negative signal then a positive signal. You probably just need to test at the 3 current change locations.
09-06-2025 09:27 PM
Thank you for your answer.
I would like to use a solenoid valve with position feedback but unfortunately that's not possible in this scenario.
This is not essential, it's more of a nice to have.
I'll look a bit more into the limits waveform and see if I can make something work.
Thank you for your reply.
09-07-2025 05:42 AM
These two examples demonstrate how to limit test waveforms.
Your challenge is to define the limit waveforms to properly categorize passing and failing samples.