Wind Speed Sensor

userHead kotakomputer 2019-06-06 01:34:26 3244 Views3 Replies
Using Wind Speed JL-FS2 (Output 0~5V DC range 0~30m/s) on Wemos D1 Mini, I found that the documentation says:
float outvoltage = sensorValue * (5.0 / 1023.0);

But when I doing testing using Digital Voltmeter I found:
float outvoltage = sensorValue * (3.1 / 1023.0);
gives the right value.

I give JL-FS2 24V DC as written on the label (also label says 0-5V output).
Any explaination why 3.1 required rather than 5 in the formula?
So I better use 3.1 because this make nearly the Digital Voltmeter reading? If yes then I must use 30/3.1 = 9.67 as the reference for below function?

int Level = 9.67 *outvoltage; // int Level = 6*outvoltage;

2019-06-07 22:36:56 Thanks for you explaination, now I got the right value.
One more question: The label on the Sensor says 24V DC (but the your website wrote: Supply voltage DC12-24V). Can I just use 12V instead 24V?
userHeadPic kotakomputer