Arduino Forum

Using Arduino => General Electronics => Topic started by: mertdal77 on Dec 08, 2018, 04:59 pm

Title: Anemometer Connection
Post by: mertdal77 on Dec 08, 2018, 04:59 pm
Hello Friends!

I bought an Anemometer and dont know how to make a circut with breadboard. I mean I dont know how should I connect the wires to right places.  

Anemometer link (Very Similar product):

http://www.ebay.com/itm/181741789708?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT,

Manual for anemometer is attached

Please help me guys
Title: Re: Anemometer Connection
Post by: groundFungus on Dec 08, 2018, 05:19 pm
There seem to be several different types of output from the sensor (interface).  PNP, NPN, NPN with pullup and RS232.  Which interface does your sensor have?
Title: Re: Anemometer Connection
Post by: jremington on Dec 08, 2018, 05:21 pm
Please post links to the actual product (not a "very similar product") and the actual product manual.

Most people won't open an anonymous file.
Title: Re: Anemometer Connection
Post by: mertdal77 on Dec 08, 2018, 05:47 pm
There seem to be several different types of output from the sensor (interface).  PNP, NPN, NPN with pullup and RS232.  Which interface does your sensor have?
How can I determine this? Everything is Chinese about my product.
Title: Re: Anemometer Connection
Post by: mertdal77 on Dec 08, 2018, 05:56 pm
Please post links to the actual product (not a "very similar product") and the actual product manual.

Most people won't open an anonymous file.
You are right I'm sorry. Manual is completely the same, mine Chinese so I want you to see the English Version. Products are looking same too, even the color of wires are same. Mine model is SY-FS2.
Title: Re: Anemometer Connection
Post by: jremington on Dec 08, 2018, 06:06 pm
Please attach the English version of the manual to your post.
Title: Re: Anemometer Connection
Post by: mertdal77 on Dec 08, 2018, 06:18 pm
Please attach the English version of the manual to your post.
I attached it now.
Title: Re: Anemometer Connection
Post by: groundFungus on Dec 08, 2018, 06:27 pm
On pages 5 and 6 of the manual, the options are specified.  Are the boxes checked in the manual that came with your unit?
Title: Re: Anemometer Connection
Post by: terryking228 on Dec 08, 2018, 06:30 pm
Hi, Document shows many options:
---------------------( COPY )---------------------
1. pulse output type: □ NPN output

□ PNP output

□ NPN output with internal pull (4.7KΩ)

2. RS485 communication type

3. Voltage output type: □ 0-5VDC

□ 0-10VDC

4. Current Output: 4-20mA

5. Power: □ DC 5 ~ 24V

□ DC 12 ~ 24
-----------------( END COPY )----------------------

What version do you have??
Title: Re: Anemometer Connection
Post by: mertdal77 on Dec 08, 2018, 07:10 pm
Hi, Document shows many options:
---------------------( COPY )---------------------
1. pulse output type: □ NPN output

□ PNP output

□ NPN output with internal pull (4.7KΩ)

2. RS485 communication type

3. Voltage output type: □ 0-5VDC

□ 0-10VDC

4. Current Output: 4-20mA

5. Power: □ DC 5 ~ 24V

□ DC 12 ~ 24
-----------------( END COPY )----------------------

What version do you have??
I will learn it but I guess it must be Voltage Output: 0-5VDC. If we assume it is like that,
do you have any idea how to create the circut?
Title: Re: Anemometer Connection
Post by: mertdal77 on Dec 08, 2018, 08:05 pm
Features of the anemometer. 

Model: SY-FS2
Range: 0-30m/s
Output: 0-5V / 4-20mA
Required DC = 9-24VDC
Wiring: Red: +  Black: -  Yellow: Voltage Signal   Blue: Current Signal

Any ideas?
Title: Re: Anemometer Connection
Post by: Paul_KD7HB on Dec 08, 2018, 08:14 pm
Features of the anemometer. 

Model: SY-FS2
Range: 0-30m/s
Output: 0-5V / 4-20mA
Required DC = 9-24VDC
Wiring: Red: +  Black: -  Yellow: Voltage Signal   Blue: Current Signal

Any ideas?
Before you hook anything to your arduino, Apply your 9-24 volts to power the device. + voltage to red. - voltage to black. Then connect your volt meter + to the yellow wire and the meter - to the black wire.

Spin the anemometer and see if you get any voltage readings on your meter. That will be your 0-5 volts that your Arduino will be reading. If you don;t see any volts, and you have connected the wires as stated, then stop, you have more research to do.

Paul
Title: Re: Anemometer Connection
Post by: jremington on Dec 08, 2018, 10:33 pm
If you really have the 4-20mA output, connect a 220 Ohm resistor from the output to ground, and read the voltage across the resistor. It should range from about 0.9 V to 4.4V.
Title: Re: Anemometer Connection
Post by: mertdal77 on Dec 10, 2018, 02:26 pm
I have just tested my anemometer and found that it has (0-5)V output. Now, do you have any idea how should I connect my anemometer to Arduino Uno.

I am a mechanical engineer and it's my first project with this kind of principle. Please help me! 
Title: Re: Anemometer Connection
Post by: groundFungus on Dec 10, 2018, 02:33 pm
The analog inputs (pins A0 to A5) accept a 0 to 5V signal and convert that to an number between 0 and 1023 using the analogRead() function. (https://www.arduino.cc/reference/en/language/functions/analog-io/analogread/)  From there you would determine the voltage and apply a scale factor to convert to wind  speed.  Does your manual define the scale factor, maybe in volts per mile per hour or volts per kilometer per hour?

An analog to digital conversion tutorial. (https://learn.sparkfun.com/tutorials/analog-to-digital-conversion/all)
Title: Re: Anemometer Connection
Post by: mertdal77 on Dec 10, 2018, 03:06 pm
The analog inputs (pins A0 to A5) accept a 0 to 5V signal and convert that to an number between 0 and 1023 using the analogRead() function. (https://www.arduino.cc/reference/en/language/functions/analog-io/analogread/)  From there you would determine the voltage and apply a scale factor to convert to wind  speed.  Does your manual define the scale factor, maybe in volts per mile per hour or volts per kilometer per hour?

An analog to digital conversion tutorial. (https://learn.sparkfun.com/tutorials/analog-to-digital-conversion/all)
Yes sir, in order find the wind speed (m/s), I have to multiply the volt value with 6.
Title: Re: Anemometer Connection
Post by: groundFungus on Dec 10, 2018, 04:28 pm
Here is an example sketch to read the anemometer 0 to 5V output.  You can adjust the reading interval to suit.  Measure the actual analog reference voltage (5V Vcc) and enter where indicated for better accuracy.

Code: [Select]

// anemometer reading sketch for forum member.  By C. Goulding
const byte analogInPin = A0;
// measure the actual 5V supply voltage
// and enter here
const float analogReferenceVoltage = 5.00;
unsigned long windReadingInterval = 1000;  // read wind speed 1 per second
float windSpeed = 0;

void setup()
{
   Serial.begin(115200);
}

void loop()
{
   static unsigned long windReadingTimer = 0;
   
   if (millis() - windReadingTimer >= windReadingInterval)
   {
      windReadingTimer = millis();
      int adcReading = analogRead(analogInPin);
      float voltage = analogReferenceVoltage / 1023.0 * adcReading;
      windSpeed = voltage * 6.0;
      Serial.print("Wind Speed = ");
      Serial.print(windSpeed, 1);  // print wind speed with 1 decimal
      Serial.println(" kph");
   }
}


Connect as shown.  The 1K resistor adds some protection for the analog input and the capacitor will filter out higher frequency noise for a more stable reading.

(http://forum.arduino.cc/index.php?action=dlattach;topic=584019.0;attach=285350)
Title: Re: Anemometer Connection
Post by: mertdal77 on Dec 10, 2018, 05:22 pm
Here is an example sketch to read the anemometer 0 to 5V output.  You can adjust the reading interval to suit.  Measure the actual analog reference voltage (5V Vcc) and enter where indicated for better accuracy.

Code: [Select]

// anemometer reading sketch for forum member.  By C. Goulding
const byte analogInPin = A0;
// measure the actual 5V supply voltage
// and enter here
const float analogReferenceVoltage = 5.00;
unsigned long windReadingInterval = 1000;  // read wind speed 1 per second
float windSpeed = 0;

void setup()
{
   Serial.begin(115200);
}

void loop()
{
   static unsigned long windReadingTimer = 0;
   
   if (millis() - windReadingTimer >= windReadingInterval)
   {
      windReadingTimer = millis();
      int adcReading = analogRead(analogInPin);
      float voltage = analogReferenceVoltage / 1023.0 * adcReading;
      windSpeed = voltage * 6.0;
      Serial.print("Wind Speed = ");
      Serial.print(windSpeed, 1);  // print wind speed with 1 decimal
      Serial.println(" kph");
   }
}


Connect as shown.  The 1K resistor adds some protection for the analog input and the capacitor will filter out higher frequency noise for a more stable reading.

(http://forum.arduino.cc/index.php?action=dlattach;topic=584019.0;attach=285350)

I am going to try tomorrow and inform you sir, Thank you!