Calibrating the SEN0170 windsensor

userHead tor_95_3 2020-11-12 00:21:18 1893 Views4 Replies
Im using arduino version 1.8.13. Im using a 9.6 volt battery. Im using the example code given on the website.
Its seems like the windsensor is not calibrated , because the voltage values goes from 0V and up to 5V and down to 0V again, over and over. Its doing this while the windsensor is standing still or spinning.
I appreciate all the help i can get.
Code: Select all

Connect the voltage signal wire to Arduino analog interface:
Yellow Cable<---->A0

 void setup()

 void loop()
   int sensorValue = analogRead(A0);
   float outvoltage = sensorValue * (5.0 / 1023.0);
   Serial.print("outvoltage = ");
   int Level = 6*outvoltage;//The level of wind speed is proportional to the output voltage.
   Serial.print("wind speed is ");
   Serial.println(" level now");
2020-11-16 19:21:37 I hooked the ground to the arduino aswell, now it works! userHeadPic tor_95_3
2020-11-16 19:00:19 3. I tested the battery, its showed 10 V.
I was talking to a teacher. He said the Arduino needed a ground from the the windsensor to compare the signal from the windsensor. But in the connection diagram on the website, the only wire from the windsensor to the Arduino is the volt.
userHeadPic tor_95_3
2020-11-16 00:56:51 1. It happend the first time i used it.
2. I dont think i understood the question. I use the voltage output, to check the windspeed.
3. Its a rechargeable battery. I charged it, so its should be at full power.
4. I got help by an experience teacher to check my soldering. So it shouldnt be a problem.
5. Im not sure what you ment. Check the windsensor with a 12V battery?
userHeadPic tor_95_3