Hi,
I have Young's sensor model 05103-90N for measuring wind speed and direction. It has potenciometer for direction and I successfully measure resistance and convert to appropriate wind direction.
I have issues with wind speed.
Sensor has magnet on propeller shaft who induces AC sinus wave signal for wind speed measurement. I suppose that need to connect sensor output to Arduino Uno analog input and I have some reading on it but don't know meaning of outputs. It should be number of passing magnets over coil where signal inducted. I found this logic in an sketch after many of googling. The code is bellow.
void setup() {
Serial.begin(9600);
pinMode(A5, INPUT);
}
int period = 1000; //reading every sec
unsigned long time_now = 0;
unsigned long obrtaji=0;
void loop() {
obrtaji+=analogRead(A5);
if(millis() >= time_now + period){
Serial.println(0.098*obrtaji/period);//should be wind speed
obrtaji=0;
time_now += period;
}
}
I have got integer numbers depending of rotating propeller. If there is no rotation output are zeros, in case of rotating got 3,5.. I need to set delay(1000) to see what I have got
One approach would be to measure the number of zero crossings per second (two of those per Hz). The conversion factor would be 0.049 m/s per zero crossing.
You will need some input additional circuitry, depending on which Arduino you have.
@jremington ,
I use Arduino Uno R3.
How to detect zero crossings? I answered to @kolaha that I have some numbers as output on analog (A5) but don't know meaning of that. When propeller stand I have got zeros on serial.
I suspected on low voltage on low rotations so applied logical gate to amplify signal but with same results.
The wind speed sensor would be connected between the two comparator inputs as shown below (R1/R2 bias the inputs, R3 protects the inputs from overvoltage).
But a quick internet search for "arduino uno zero crossing detector" would turn up a very large number of other approaches.
An LM393 comparator could work, but not that circuit. +input shouldn't be 'floating' (it is now), and -input should be biased (can't be grounded on a single supply).
But why not use the Arduino instead of an external circuit.
Leo..
Does R1 and R2 should be same or you select 1k from some reason? And why C1 is 0.1u? I tried digital output but not with this circuit.
If I understand well, on digital pin I need to count high logic input?