Geiger counter with HA integration?

Good success this weekend with my RH Electronics Geiger counter. The board is very simple, just producing a pulse with every count. So very easy to connect up to an Arduino, ESP8266, etc. and then just count the pulses and publish via MQTT. I happened to use an STM32 since I already had one sitting on a breadboard with a W5500 Ethernet module already wired up. Connected the Geiger counter impulse line to pin A0, attached an interrupt, and just counted every time there was a pulse. Every 15 seconds multiplied by 4 to get a CPM (based on the example Arduino code on RH Electronics site), did the conversion to uSv (example code) then published via MQTT.


Nice. Sounds like an ideal task for esphome.


Yes, looks like both esphome and TASMOTA support pulse counters. TASMOTA has a few more configuration options for pulse counters which may make it a little better for this.

I’m going to eventually roll this into an environmental sensor. Right now have a ESP8266 and BMP280 running TASMOTA for outdoor climate. Going to move the BMP280 to this sensor, might as well leave the STM32, and power it via POE. I like everything that doesn’t move around to be wired.

1 Like

I am very interested if there is a direct ESPhome integration. I guess it’s a simple pulse compter ?

1 Like

I’ve never used ESPHome as I prefer stuff to be wired via Ethernet (because of reliability, longevity, and have to power it with a wire anyway) but here is my best guess at an ESPHome config for CPM:

  - platform: pulse_counter
    pin: (whatever)
    name: "Radiation CPM"
    count_mode: rising_edge
    update_interval: 60
    unit_of_measurement: CPM

And with a CPM measurement you can calculate dose rates in your automation.

Or change the update_interval to a lower value and multiply in the automation to get the measurement more often.


I just set it up with ESPHome and it was very easy!

Very basic code and wiring.

This is the relevant code part of the ESPHome device, an ESP8266:

  - platform: pulse_counter
    pin: GPIO4
    name: "Geiger Counter"
    update_interval: 15s

EDIT: I fixed the code. I realized that ESPhome calculates correctly the pulse/minute when changing the update_interval from default value.


Thanks a lot :)… It will helps me


I can’t get this to work on my ESP32, as the counter does not increase with the impulses from the sensor.

Did you set any count_mode parameter latter on?


The solution for ESP8266 (GPIO14) and ESP32 (GPIO36): Pulse_counter pin goes high

1 Like

How you convert CPM to uSv ?

You can find an example on the website at

The Arduino Code by Brian Gauger" link has the simplest method of just multiplying it by a “magic number” conversion factor:

For the SBM-20 used in the RH Electronics kit, multiply the CPM by 0.0057.

For different tubes, usually a Google will turn up the magic number. Or you have to go hunting for the tube datasheet.

Anyone has this working with Wemos D1 Mini? I’m still trying to figure out if I have faulty kit or doing something completely wrong :slight_smile:

What is the problem you are having?

Keep in mind that most of the Geiger kits output a 5V pulse.

ESP8266 isn’t 5V tolerant on most I/O pins.

What pin are you using?

What firmware?

Have you verified the Geiger counter works by itself with a speaker or scope on the output?

Thanks for followup @AaronCake.
I tried to get it working with Wemos D1 mini - it is producing ticking sound and LED is blinking too.
No matter what pin I’m using (tried D4 and D5 ) I get strange results. Even with some blinking, it’s giving very low rates - mostly 0, and maximum is 0,00x.
I did use J305 multipliers 0.00812037037037 (tried even 123.147092360319)

The problem is that even when it registers something (led + sound) I get 0 - that can be dozen of ticks a minute and still 0.

Also, I’m using 4 decimal spaces - still getting 0.

EDIT: Forgot to say - I’m using ESPHome for testing. Also counter receives power from ESP board, not independently.

I’ve never used ESPHome so I can’t say how that would need to be set up.

However, if you replace the Geiger counter with a button, momentary switch connected to VCC (or just a wire you can tap), do you get any counts when you press the button or tap the wire?

Did you guys see my post about a Geiger counter?

I also can provide a ready-to-use example on integration of the GGreg20_V3 (SBM20 tube) ionizing radiation detector module into the HA using ESPHome under ESP8266 or ESP32.
It is also simple to convert those sample yaml-code to support any simmilar tubes tunning a convertion coef.

1 Like

There’s another version on sale through Banggood now - one with an oled display. Has anybody integrated this with HA?

i bought one, needed some mods to get it working. put esphome on it. works a treat.


that is just some grafics with the duration of the data?