Skip to content

Instantly share code, notes, and snippets.

@andersevenrud
Last active January 5, 2026 22:06
Show Gist options
  • Select an option

  • Save andersevenrud/460037c7ebf9add120d1e08302c4bc23 to your computer and use it in GitHub Desktop.

Select an option

Save andersevenrud/460037c7ebf9add120d1e08302c4bc23 to your computer and use it in GitHub Desktop.
RadiationD v1.1 CAJOE with ESPHome (Home Assistant)

RadiationD v1.1 CAJOE with ESPHome (Home Assistant)

A brief guide on how to set up a cheap and readily available radiation detector (geiger counter) in Home Assistant using ESPHome.

Materials

  • RadiationD
  • ESP32 Microcontroller (I used a WROOM)
  • Dupont Connectors
  • 10K Ohm Resistor (optional, but recommended for protection)

I got all of this fairly cheap from AliExpress.

The detector tube installed on the board varies, but they do (always) seem to come pre-calibrated. These instructions come with information on how to adjust calculation to your needs.

A basic 3D printable case can be found here: https://www.thingiverse.com/thing:5425224. There are others out there, but I just needed something really basic to cover the board and supported using the included acrylic plate.

I used some nylon standoffs to assemble everything and to keep the ESP32 in place.

20260105_204950

Wiring

The RadiationD has three pinouts:

  • GND - Ground
  • 5V - 5V Output
  • VIN - Signal output (mislabeled)

The GND and 5V outputs can be connected to GND and VIN inputs on the ESP32 board (as long as it can take 5V, some boards don't have a dedicated VIN for this).

The VINoutput (with optional resistor in between) goes to the VP (GPIO36) input on the ESP32. The VP GPIO is a pure input ADC without any internal pullups.

Note the VIN output from the RadiationD is an open-collector at 5V that is HIGH on idle and goes LOW on a count, but this will not hurt your ESP32 3.3V GPIO.

Disconnect jumper J1 (right above piezo buzzer) to disable the beeping.

Basic Diagram

RadiationD v1.1 (CAJOE)                ESP32
────────────────────────              ─────────────────────

   GND  ────────────────────────────▶  GND

   5V   ────────────────────────────▶  VIN / 5V
                                       (only if your ESP32
                                        board supports 5V on VIN)

   VIN  (signal out, mislabeled)
        │
        │
        ├───[ 10kΩ ]────────────────▶  VP / GPIO36
                                      (input-only ADC,
                                       no internal pullups)

Firmware

Depending on the tube your detecor came shipped with, you might have to adjust the divisor to calculate the final µSv/h value.

Tube model Divider (CPM per µSv/h) Notes
J315 153 Common modern tube, good sensitivity
M4011 153 Electrically similar to J305/J315
J305 153 Often grouped with J315
SBM-20 175 Very common Russian tube
SI-29BG 91 High sensitivity
LND 712 108 Pancake-style tube
LND 7317 65 Very sensitive, thin-wall
STS-5 116 Low-cost Russian tube

ESPHome

esphome:
  name: geiger-counter
  friendly_name: Geiger Counter

esp32:
  board: esp32dev
  framework:
    type: esp-idf

logger:

api:
  encryption:
    key: "A RANDOM KEY HERE"

ota:
  - platform: esphome
    password: "PASSWORD HERE"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  ap:
    ssid: "Geiger Counter Fallback Hotspot"
    password: "PASSWORD HERE"

time:
  - platform: homeassistant
    id: homeassistant_time

sensor:
  - platform: pulse_counter
    id: radiation_cpm
    pin:
      number: 36
      mode: INPUT
      inverted: true
    name: "Radiation CPM"
    unit_of_measurement: "CPM"
    accuracy_decimals: 0
    update_interval: 60s
  - platform: template
    name: "Radiation µSv/h"
    unit_of_measurement: "µSv/h"
    accuracy_decimals: 3
    update_interval: 60s
    lambda: |-
      return id(radiation_cpm).state / 153.0;
    filters:
      - sliding_window_moving_average:
          window_size: 5
          send_every: 1

binary_sensor:
  - platform: template
    name: "Radiation Alert"
    lambda: |-
      return id(radiation_cpm).state > 300;

Setup

Set up just like any other ESPHome device in Home Assistant.

Go to Settings > Devices & Services > Add Integration > ESPHome, then fill out the hostname (in this case geiger-counter.local) or the IP address and the key.

You should end up with this:

Screenshot 2026-01-05 at 20 54 23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment