SEN-15901: can not read the wind direction with 3.3 volt on a ESP32 NodeMCU development board

Hi,

I have an ESP32 NodeMCU development board. I am trying to get the Weather Meter Kit (https://www.sparkfun.com/products/15901) to work with the ESP32. But I have problems to get the right analog values for the wind direction sensor. I don’t understand if I have to drive the WindDir sensor with 3,3V or with 5V. The ESP32 can only read 3.3 V as an analog signal. But the sensor outputs very strange values with 3.3 volts, which are not correct and in certain directions does not change at all. But I thought I can run the sensor with 3,3 V or do I understand it wrong?

I tried it with a voltage divider, but the values on the ESP32 do not fit to the calculations or are a bit too far away.

Does anyone know how I use the WinDir sensor to the ESP32 correctly?

The wind direction sensor is simply a voltage divider (when wired with the 10k external resistor). The sensor should be powered from 3.3v to allow for a full range reading on the ADC.

The voltage output would be 3.3(R/R+10) where R is the value in kilohms. I would use a meter (DMM) to verify this voltage to see if it is a sensor issue or an ESP32/software question.

Just to confirm, you are wiring it up with a 10k pullup as shown in the datasheet

/mike