Go Down

Topic: "CES155" anemometer [solved] (Read 363 times) previous topic - next topic

ardv

Jun 13, 2018, 10:08 pm Last Edit: Jun 22, 2018, 10:59 am by ardv
I got a "CES155" anemometer made by Cimel, The sensor has 3 wires: Power, GND, and Output

The illustration document of the sensor says: "Counting by optical fork. The emitting diode (1) receives pulses of 50 μS at a frequency of 256 Hz. Sensor pulse height connected: 1.2 Output on phototransistor (2), Level 5V generation of pulses drawn to the mass of height ≈ 500mV"

after contacting CIMEL, they told me that i have to use synchronous detection at 256Hz. and i didn't understand how to do this. (according to them it is not obligatory to use it so as the sensor works).

they also told me that it is necessary to enter a Schmitt trigger circuit to have frank transitions. so i used MC14093bcp, i put 5v to in1A and pin-14, and in in2A i put the output of the sensor in serial with a 1kohm resistor, and in the 7th pin i put GND. (is this right?)
and with the below code i always get 0 in serial monitor.


Code: [Select]

#define sensor 2
unsigned long startMillis;  //some global variables available anywhere in the program
unsigned long currentMillis;
const unsigned long period = 1000;  //the value is a number of milliseconds
long freq = 0;
int state = 0;
int lstate = 0;

void setup() {
  Serial.begin(115200);
  pinMode(sensor, INPUT);
  startMillis = millis();  //initial start time
}

void loop() {
  currentMillis = millis();
  state = digitalRead(sensor);

 if (state != lstate) {
  freq = freq +1;
  lstate = state;
  }
   if (currentMillis - startMillis >= period)  //test whether the period has elapsed
  {
  Serial.println(freq);
  startMillis = currentMillis;
  freq = 0;
  }
  
  }


i hope that you can help.
[solved]

outsider

Seems your anemometer uses an opto "break-beam" sensor instead of the reed switch on the Davis unit, we need to know the power supply voltage and the number of pulses per m/S of wind speed, did you get an "owner's manual"?

ardv

#2
Jun 14, 2018, 08:49 am Last Edit: Jun 14, 2018, 09:03 am by ardv
Seems your anemometer uses an opto "break-beam" sensor instead of the reed switch on the Davis unit, we need to know the power supply voltage and the number of pulses per m/S of wind speed, did you get an "owner's manual"?
The only information i have is this and the picture i've attached.

Is "Comptage par fourche (fork in English) optique" the same as "opto break-beam sensor"?

In this link i find this:
"In another design, known as optoelectronic, spinning cups turn a kind of paddle wheel inside the metal canister underneath. Each time the paddle wheel rotates, it breaks a light beam and generates a pulse of current. An electronic circuit times the pulses and uses them to calculate the wind speed. The anemometers shown in our photos up above, made by Ames of Slovenia, work in roughly this way"

edit: I've added a PDF file of the sensor (and it's content is the same as in their website, but in English)

outsider

#3
Jun 14, 2018, 09:06 am Last Edit: Jun 14, 2018, 09:11 am by outsider
I guess you could call this a "fork":
https://www.amazon.com/FemiaD-Slotted-Optical-Switch-HY860H/dp/B0768SCJ9C/ref=sr_1_9?ie=UTF8&qid=1528959610&sr=8-9&keywords=IR+gap+sensor
Have you examined your anemometer closely for a data plate that might show the operating voltage? Without knowing that, I cannot make any recommendation.
Can you contact cimel?

ardv

I guess you could call this a "fork":
https://www.amazon.com/FemiaD-Slotted-Optical-Switch-HY860H/dp/B0768SCJ9C/ref=sr_1_9?ie=UTF8&qid=1528959610&sr=8-9&keywords=IR+gap+sensor
Have you examined your anemometer closely for a data plate that might show the operating voltage? Without knowing that, I cannot make any recommendation.
Can you contact cimel?
I had another sensor from CIMEL before that one, and i tried contacting them but they did not reply.
i found a PDF file in this link for an Opto-electronic wind senor that seems like the CIMEL one, and in the PDF they have mentioned that the input voltage is between 9 and 30 V.

I've attached the PDF file.

ardv

#5
Jun 14, 2018, 03:49 pm Last Edit: Jun 14, 2018, 03:58 pm by ardv
Edit2: After adding a 170 ohm resistance  (inspired from this) and with this code:
Code: [Select]

#define sensor 2
unsigned long startMillis;  //some global variables available anywhere in the program
unsigned long currentMillis;
const unsigned long period = 1000;  //the value is a number of milliseconds
long freq = 0;
int state = 0;
int lstate = 0;

void setup() {
  Serial.begin(115200);
  pinMode(sensor, INPUT);
  startMillis = millis();  //initial start time
}

void loop() {
  currentMillis = millis();
  state = digitalRead(sensor);

 if (state != lstate) {
  freq = freq +1;
  lstate = state;
  }
   if (currentMillis - startMillis >= period)  //test whether the period has elapsed
  {
  Serial.println(freq);
  startMillis = currentMillis;
  freq = 0;
  }
 
  }


I get always: 100 in Serial, even when turning the cups of the sensor.
and when i remove the resistance, i always get 0 at Serial output.

outsider

#6
Jun 15, 2018, 10:24 am Last Edit: Jun 15, 2018, 10:57 am by outsider
If you KNEW FOR SURE that it is rated for 9 to 30 VDC you might try this, it would drop 12V to 4.3, and try your program, which I hacked a bit.  :)
Code: [Select]

#define sensor 2
unsigned long startMillis;  //some global variables available anywhere in the program
unsigned long currentMillis;
const unsigned long period = 1000;  //the value is a number of milliseconds
long freq = 0;
int state = 0;
int lstate = 0;

void setup() {
  Serial.begin(115200);
  pinMode(sensor, INPUT);
  pinMode(LED_BUILTIN,OUTPUT);
  startMillis = millis();  //initial start time
}

void loop() {
  currentMillis = millis();
  state = digitalRead(sensor);
  digitalWrite(LED_BUILTIN,state);
 if (state != lstate) {
  freq = freq +1;
  lstate = state;
  }
   if (currentMillis - startMillis >= period)  //test whether the period has elapsed
  {
  Serial.println(freq);
  startMillis = currentMillis;
  freq = 0;
  }
 
}


One other thing, the anemometer MIGHT have an open collector output which would need a different circuit.

ardv

#7
Jun 16, 2018, 11:46 am Last Edit: Jun 17, 2018, 12:46 pm by ardv
i got a reply from them, they told me that i have to use a "synchronous detection at 256Hz" but i did not understand how to make this?

also they told me that it will be necessary to put another resistance in series to limit the current to approximately 3mA ,1 kohms if one working with 5V.
after adding the 1k resistance, now I'm getting strange results (attached).

and it seems that turning the the cups of the sensor doesn't affect those results.

they also told me that It will be necessary to enter a Schmitt trigger circuit to have frank transitions. and I'm not familiar using those circuits, how to choose the proper one?

ardv

#8
Jun 18, 2018, 06:56 pm Last Edit: Jun 19, 2018, 05:31 pm by ardv
I used MC14093bcp, i put 5v to in1A, and in in2A i put the output of the sensor in serial with a 1kohm resistor, and i always get 0 in serial monitor.

Edit:
I used the interruption method (with Arduino) to measure the frequency, when I put the output of the anemometer in serial with 1kohm resistance the frequency feels good (I get 2 frequencies on each 1 tour => 2 freq for 1m => number of freq in 60 sec / 2 = x m/min), but when I use the trigger Schmitt it does not work.

this is my code:

Code: [Select]
const byte ledPin = 13;
const byte interruptPin = 2;
volatile byte state = LOW;
volatile long freq = 0;

unsigned long startMillis;  //some global variables available anywhere in the program
unsigned long currentMillis;
const unsigned long period = 60000;
long windspeed;

void setup() {
  Serial.begin(115200);
  pinMode(ledPin, OUTPUT);
  pinMode(interruptPin, INPUT_PULLUP);
  attachInterrupt(digitalPinToInterrupt(interruptPin), count, CHANGE);
  startMillis = millis();
}

void loop() {
  currentMillis = millis();
  if (currentMillis - startMillis >= period)  //test whether the period has elapsed
  {
  windspeed = freq /2;
  Serial.print(windspeed);
  Serial.println(" metre/minute");
  startMillis = currentMillis;
  freq = 0;
  }

}

void count() {
  state = !state;
  freq=freq+1;
}

Go Up