Pulse_counter pin goes high

I am trying to create a pulse counter based on the ESP32 DevKit v1 board.
It worked on WeMos D1 mini.

But when I try to configure the same pulse counter on my new ESP32 board like this:

  - platform: pulse_counter
    pin: GPIO13
    name: "Radiation level"
    unit_of_measurement: 'µSv/h'
    - lambda: return x / 123.147092360319;

I don’t get any counts, the value is 0.
I tried to disconnect the source and measure the selected pin and noticed, that it is “high” (3v). Is this normal?
Each time I change pin - newly selected pulse_counter pin gets “high”. I wonder, is it wrong behavior or not?

i’ve got this board https://ru.aliexpress.com/item/33040503442.html
Maybe I specified wrong board type?

  name: indoor_air_sensor_2
  platform: ESP32
  board: esp32doit-devkit-v1

I managed to get it working by trial and error, but I don’t know why it works like this.

On WeMos D1 mini it didn’t work on pin D4 and worked on D5.

On ESP32 esp32 devkit v1 (30 pin version) I tried different pins in pulse_counter setting flashing ESP32 each time I wanted to try a new pin. Pins GPIO13, GPIO12, GPIO14, GPIO19, GPIO4… did not work, they went “high” after flashing. Lastly, I tried pin GPIO36 and it worked.

Now pulse counter works fine.
But can you please help me understand, why it works like this? What is so special in GPIO36 pin that it worked?


Thank you, @Oleksii_Zelivianskyi.

This just saved my day!

I’f I may ask you @Oleksii_Zelivianskyi - how your code looks? Are you using ESPHome or something else?

Trying to get my WeMos D1 Mini working with counter and still can’t figure it if it’s damaged or I’m doing something terribly wrong :smiley:
Tried D5 as you said and all the time I got 0.00000 as output.