I am working on a project which checks the pressure sensor in washing machine that is ok or nok. First of all, let me explain how a pressure sensor works. It is a circuit which uses pressure as input and gives square wave with variable frequency according to the pressure as output.
If we are able to regulate the pressure in the input side and we know what the frequency is as output according to that pressure…
Is there anyone has an idea how I can process that signal? I mean how I can light on a LED in special values?
You could make a simple RC filter (resistor and capacitor) to convert the pulses to a smooth DC voltage which could be read by an analog to digital converter (ADC) on most microcontrollers like Arduinos. You could also use a small inductor in place of the RC filter to achieve the same smooth DC voltage to be read by the ADC. If the voltage is above 5v DC you would also need to add a simple voltage divider to get the max voltage down to 5V. If you are using a 3.3v microcontroller then you would need to ensure the voltage to the ADC is below 3.3v not 5v. If you are using an ESP8266 you need the voltage on the ADC to be below 1v.
You can find RC filter calculators online if you want to calculate the exact values of the resistor and capacitor required based on the output frequency of the sensor or you could simply start with something like a 100nf to 1uf capacitor and a couple of ohm resistor and then see if you get readable value at all the desired pressures.
EDIT: For the above you could eliminate the microcontroller and simply read the voltage output of the RC filter / Inductor with a volt meter. Either a dedicated voltage meter or a multimeter.
If you want to read the frequency of the pulses rather than check if it produces a range over its output you would need a microcontroller that is capable of reading its inputs at a faster rate than the sensor outputs its pulses. That would likely be something like a Teensy or an ESP8266 or Arduino DUE etc.
Here’s an example of an RC filter I found on circuitlab.
In your case your sensor is the source of the square wave labelled “V1” and you would read the voltage via a multimeter, volt meter or microcontroller at “Out”.
I do not believe an RC filter will give you what you need. A phase-locked loop is a better solution. See the circuit: CD4046. What is the frequency output of your transducer?
First of all,thanks for your attention.
I would like to share with you a datasheet belongs to pressure switch. It shows the frequency corresponding to the pressure.
Thanks in advance
Very low frequency. Let me think about it and get back to you!
Since this sensor is already digital, I would stay in the digital domain as it is likely to be a lot easier than anything analog. Basically you need to count the milliseconds between pulses which most any micro can do at a 10hz rate. It isn’t clear to me what your success criteria is (i.e. what you are trying to do) but a go/no go test would be to just look for a 9 to 10 hz square wave out if the unit has pressure as presumably a failed one won’t have any output.
I agree with Peter. Using the signal to gate a counter is very easy to do, then processing that digital result from there. You could do it with an Arduino.
If you really wanted an analog output (which I dont think you do, really), you would transform the digital result and drive it into a DAC. You could do that with an Arduino as well.
First of all, thanks for your attention Guys.
Yes, I also think staying in digital domain.
I let you know when I started to do that.
Depending on what you are trying to do, even a micro may be over kill. I’m thinking this is meant to be portable and possibly battery powered for a service person to use in the field and thus a go/no go test. In such a case a 555 timer configured as a retriggerable monostable may be what you need. Basically if has a green led if it sees a pulse within 70 to 90 msec (as it retriggers) and a red led if it doesn’t see a pulse in that time. That should use much less power than most of the mcus and is less sensitive to supply voltage when running on batteries. If you need to read the pressure value, one of the mcus reading a counter would be the thing (some of the wireless soc mcus are low power if you do need battery).
I think I know what this pressure sensor is for. As the clothes-washer’s tub is filled with water, a tube to the bottom of the tub traps air, which is pressurized in proportion to the depth of the water. When the water reaches 300mm deep (or less, depending on the washer’s load-size setting) then the computer is supposed to turn off the water-fill valves and start agitation. This fill generally takes more than 1 minute, during which time the computer is doing almost nothing but waiting. So the computer chip can easily afford to spend >50% of its attention making measurements that take 0.1 second or longer. So it makes a lot of sense to count ticks during the time from one rising edge to the next. You could even time 16 cycles for each measurement, and compare multiple successive measurements for certainty.