Analog Voltage from anemometer
Moderators: grovkillen, Stuntteam, TD-er
-
- New user
- Posts: 4
- Joined: 24 Apr 2022, 15:41
Analog Voltage from anemometer
Hi,
I use ESPEasy on a D1 mini with ESP_Easy_mega_20210802_normal_ESP8266_4M1M.
I have an anemometer, it generates 0 - 2 Volt. How do I make the settings in ESPEasy so that the wind speed is displayed in m/s. 1 Volt corresponds to 25 m/s.
A0 connect to Output anemometer
GND connect to GND anemometer
Point 1: 0 = 0.000
Point 2: 1023 = 2.000
Formula
%value%*25
when I enter the above values, the result is wrong.
What am I doing wrong or where is my reasoning wrong ?
I use ESPEasy on a D1 mini with ESP_Easy_mega_20210802_normal_ESP8266_4M1M.
I have an anemometer, it generates 0 - 2 Volt. How do I make the settings in ESPEasy so that the wind speed is displayed in m/s. 1 Volt corresponds to 25 m/s.
A0 connect to Output anemometer
GND connect to GND anemometer
Point 1: 0 = 0.000
Point 2: 1023 = 2.000
Formula
%value%*25
when I enter the above values, the result is wrong.
What am I doing wrong or where is my reasoning wrong ?
Re: Analog Voltage from anemometer
What values do you get without having a formula set?
/Ton (PayPal.me)
Re: Analog Voltage from anemometer
With the ADC plugin, you can let the calibration do its work.
You don't need to use a formula then, unless you need to apply some none-linear scaling of course.
So just apply some known voltage to the input and set the calibration value according.
Most boards already have some set of resistors present to extend the measurement range of the A0 input.
The ESP8266 itself can only read up-to 1V, but with these resistors you may get upto roughly 3.6V if I'm not mistaken.
Since those resistors have some tolerances, you need to test yourself to see what value is read.
You don't need to use a formula then, unless you need to apply some none-linear scaling of course.
So just apply some known voltage to the input and set the calibration value according.
Most boards already have some set of resistors present to extend the measurement range of the A0 input.
The ESP8266 itself can only read up-to 1V, but with these resistors you may get upto roughly 3.6V if I'm not mistaken.
Since those resistors have some tolerances, you need to test yourself to see what value is read.
-
- New user
- Posts: 4
- Joined: 24 Apr 2022, 15:41
Re: Analog Voltage from anemometer
It is a wind generator and I can only estimate (weather forecast) how strong the wind is. The display is at 0.05. But it should be 8-10 factor more.
Re: Analog Voltage from anemometer
You know the anemometer outputs 1V per XX m/s
So you can put some voltage on the A0 pin (e.g. 1.00V) and then see what its reading is in the task.
Then you set this RAW reading value (e.g. "300" when you apply 1.00V) and add it as a calibration point where you enter the true wind speed as reported by the datasheet of the sensor.
So you can put some voltage on the A0 pin (e.g. 1.00V) and then see what its reading is in the task.
Then you set this RAW reading value (e.g. "300" when you apply 1.00V) and add it as a calibration point where you enter the true wind speed as reported by the datasheet of the sensor.
-
- New user
- Posts: 4
- Joined: 24 Apr 2022, 15:41
Re: Analog Voltage from anemometer
With Arduino Nano and this program part works it.
int Wind=0;
int km=0;
int Sensor = A7; //Das Anemometer soll am analogen Pin A7 angeschlossen werden. Wir nennen den Pin ab jetzt "Sensor"
int sensorwert; //Unter der Variablen "sensorwert" wird später der Spannungswert des Sensors abgespeichert.
int t=500; //Der Wert für „t“ gibt im Code die zeitlichen Abstände zwischen den einzelnen Messungen vor.
void setup()
{
Serial.begin(9600);
}
void loop()
{
sensorwert=analogRead(Sensor); //Auslesen des Sensorwertes.
delay(t); // Nach jeder Messung ist je eine kleine Pause mit der Dauer „t“ in Millisekunden.
Wind= map(sensorwert, 0, 25, 0, 1);
km=Wind*3,6;
Serial.print("Windgeschwindigkeit: ");
Serial.println(km);
}
int Wind=0;
int km=0;
int Sensor = A7; //Das Anemometer soll am analogen Pin A7 angeschlossen werden. Wir nennen den Pin ab jetzt "Sensor"
int sensorwert; //Unter der Variablen "sensorwert" wird später der Spannungswert des Sensors abgespeichert.
int t=500; //Der Wert für „t“ gibt im Code die zeitlichen Abstände zwischen den einzelnen Messungen vor.
void setup()
{
Serial.begin(9600);
}
void loop()
{
sensorwert=analogRead(Sensor); //Auslesen des Sensorwertes.
delay(t); // Nach jeder Messung ist je eine kleine Pause mit der Dauer „t“ in Millisekunden.
Wind= map(sensorwert, 0, 25, 0, 1);
km=Wind*3,6;
Serial.print("Windgeschwindigkeit: ");
Serial.println(km);
}
-
- New user
- Posts: 4
- Joined: 24 Apr 2022, 15:41
Re: Analog Voltage from anemometer
If I apply 1V from a power supply to the D1 Mini, the correct converted value is also displayed.
Conclusion: contact problems!
Thanks for the suggestions !!
Conclusion: contact problems!
Thanks for the suggestions !!
Re: Analog Voltage from anemometer
Great to hear it is solved and working
Who is online
Users browsing this forum: Google [Bot] and 0 guests