COSMIC RAYDETECTOR MANUAL Model
JAEN

MANUAL

Cosmic Ray Detector Manual

From unboxing to your first measurement, then data analysis, troubleshooting and assembly, all in one place. Pick your model, OWAN (v1) or OHASHI (v2), and the page shows only the steps for it.

Covers OWAN (v1) and OHASHI (v2) (v2.1 is not ready yet and is not included) · Edition of 2026-10-24 (revision history)
Original with photos: the Google Doc "検出器マニュアル" (in Japanese)

In trouble? (09 Troubleshooting)What to tell us when you ask for helpGlossary

The v1 case: a tall box with a window for the display and a small round hole on the top face
The OWAN sticker: a bowl on a young-grass green ground

v1OWAN A tall box

On the top face you will find a small window for the display and a small round hole. The microcontroller is an Arduino Nano and the USB port is Mini-B.

The v2 (OHASHI) case: a nearly cubic box with a window for the display and two round holes on a side face, and a green lid
The OHASHI sticker: chopsticks on an unbleached kraft ground

v2OHASHI A nearly cubic box

On a side face there is a window for the display and two round holes (for the button and the LED). The microcontroller is an Arduino Nano ESP32 and the USB port is Type-C.

Contents
  1. 01 Quickstart
  2. 02 Models and how it works
  3. 03 Connect to a PC
  4. 04 Measure
  5. 05 Coincidence
  6. 06 Data and analysis
  7. 07 FAQ
  8. 08 Firmware
  9. 09 Troubleshooting
  10. 10 Assembly

01Quickstart

The steps from receiving the detector to your first successful measurement. Follow them in order and see cosmic rays being detected for yourself.

  • The detector and a USB cable: use a cable that carries data (a charge-only cable will not work). For v1 it is usually Type-A to Mini-B. For v2 the detector end is Type-C.
  • A PC: Windows, macOS, Linux or a Chromebook. The browser must be Chrome or Edge (Firefox and Safari do not support the USB connection).
  • An internet connection: needed to open the measurement app page.
  • v1 On Windows, permission to install the CH341 driver (steps).
  • v2 Optional: a FAT32 microSD card if you want to record without a PC, and a PC with Bluetooth if you want to connect over Bluetooth.
  • A place for it: a stable spot where the detector can sit undisturbed while it measures. Leave it there for at least 5 minutes for the first measurement.
  1. Identify the modelby the box shape
  2. Unpackunit and cable
  3. Connect to a PCUSB cable (a driver on Windows)
  4. Measure in the app5 min in Chrome or Edge
  5. Save.csv or .dat
  6. Checklook at rate and ADC
  1. Identify your model

    Tell OWAN (v1) from OHASHI (v2). If there is a sticker on top of the box, a bowl on a young-grass green ground is OWAN and chopsticks on an unbleached kraft ground is OHASHI. Without a sticker, go by the shape of the box (see the photos above, or 02 Models and how it works). The "Both / v1 / v2" switch at the top right keeps only the instructions for your model.

  2. Unpack and check the contents

    The box contains:

    • The cosmic ray detector itself
    • A USB cable (for v1 it is usually Type-A to Mini-B) (for v2 the detector end is USB Type-C)

    With an assembly kit you also have to bond the scintillator to the SiPM and make it light-tight. See 10 Assembly.

  3. Connect to a PC

    • v1 On Windows, install the CH341 driver first (03 Connect to a PC). macOS, Linux and Chromebooks normally need nothing.
    • v2 No driver is needed. Just plug it in and it appears as a COM (serial) port.
    • Connect the detector to the PC with the supplied USB cable. If the display shows information, the unit is powered. Some units have no display; just go on to the next step.
    • A charge-only cable cannot carry data. If the PC does not see the detector, try another cable.
  4. Measure for 5 minutes in the web app

    Use Chrome or Edge on the PC (Firefox and Safari do not support USB serial connections).

    • v2 Open https://accel-kitchen.com/app/cosmicray-monitor/. The first screen asks for your model: choose v2, press "Connect with USB", pick the detector's port and confirm.
    • v1 Open https://accel-kitchen.com/app/cosmicray-monitor/v1. Press "Connect by USB" and choose the detector's port (for example COM3 or /dev/tty.usbserial-XXXX).
    • After a moment the measurement starts and the graphs begin to move. Leave it running for 5 minutes.
    • If the port does not appear in the list, replug the USB cable or try another USB port. If it still does not appear, check the driver (v1 on Windows).
  5. Save the data

    • v2 Start auto-save with "Choose a folder", or press "Save .dat" / "Save .csv" to put everything on screen into one file.
    • v1 Press "Save as .csv" (or "Save as .dat") and the file is downloaded to the PC. If you choose a save folder first, the data can also be appended to a file automatically.
    • Open the saved file in a text editor or Excel and check that it contains data. The meaning of each column is in 06 Data and analysis.
  6. Check that it works properly

    These values are a guide. If yours are far off, see 09 Troubleshooting.

    Guide for the plastic scintillator version (5 × 5 × 1 cm)
    ItemNormal range
    Count rateabout 0.5–2.0 cnt/s
    Events in 5 minutesabout 150–600 events
    v1 ADC distributionOut of 0–1023, most values are about 20–200, with an occasional large value above 300
    v2 ADC distribution0–4095. Ambient gamma rays dominate from just above the threshold up to a few hundred, and the cosmic-ray hump appears around 1000

    If you are inside these ranges, the detector is working properly. You have detected cosmic rays. If you are outside them, use the next table to get an idea of what is wrong.

    Judging from the rate (plastic version, 5 × 5 × 1 cm)
    RateVerdictWhat to do
    0.5–2.0 cnt/sNormalGo ahead and measure
    0.3–0.5, 2.0–3.0 cnt/sWithin the acceptable rangeGo ahead and measure. If you are concerned, check the light-shielding and the connector
    0.1–0.3, 3–10 cnt/sUnclearRestart the detector and measure again. If nothing changes, check the light-shielding (if the rate is high) or the connector (if it is low)
    Below 0.1 cnt/sToo lowThe threshold is too high, or a connector has come loose (09 Troubleshooting)
    Above 10 cnt/sToo highPoor light-shielding is very likely (09 Troubleshooting)

    This guide was checked on the v1. The v2 sets its threshold a little differently, so it may be off (the v2 values will be reviewed once they have been measured).

    The CsI scintillator version (a 1 cm cube) has a much smaller area, so its rate is lower: about one cosmic ray per minute. This table does not apply to it.

  7. What to do next

    Once the first measurement works, get the big picture of the research activity. (These pages are in Japanese.)

    If anything is unclear, ask on Discord at any time. There is also a weekly office hour.

02Models and how it works

This is a radiation detector that can count gamma rays, beta rays, cosmic-ray muons and more.

How detection works

When a particle passes through the scintillator, the scintillator glows faintly. A SiPM (silicon photomultiplier) turns that light into an electrical signal, and the circuit on the board amplifies it. The microcontroller reads the height of the signal (the ADC value), shows it on the display and sends it to the PC. A larger ADC value means the particle deposited more energy in the scintillator.

  1. Particlemuons, gamma rays, etc.
  2. Scintillatorglows when hit
  3. SiPMlight to electricity
  4. Amplifiermakes it bigger
  5. Peak holdkeeps the peak height
  6. Microcontrollerturns it into a number (ADC)
  7. Display and storagescreen, USB, Bluetooth, microSD

If you would like to learn about cosmic rays and detectors from the basics first, read the course material "The basics of cosmic rays and detectors" (in Japanese).

How the signal changes along the way

Between the particle and the number, the shape of the signal changes twice. The amplifier turns the SiPM's tiny signal into a larger, short pulse, and then the peak hold keeps the height of that pulse for a short while. While it is held, the microcontroller reads the height. That is the ADC value.

Amplifier output Peak-hold output (A0) threshold peak is held ← this height is the ADC value Trigger Read ADC Reset
Schematic (the time axis is not to scale)

The "trigger" is the moment the peak-hold output rises above the threshold. The ADC is read next, and finally the circuit is reset to be ready for the next pulse. How the reset works differs by model. v1 simply waits until the signal has decayed below Res.v2 forces a reset with a short pulse (about 20 µs) from the microcontroller's D8 pin.

Names and stickers

v1 is called OWAN (a rice bowl) and v2 is called OHASHI (chopsticks). The sticker that goes on top of the box draws that tool inside a round crest, with particles falling toward it. If there is a sticker, its picture and ground color tell you the model.

The OWAN sticker. Inside a round crest, a steaming bowl catches falling particles. Below: the name OWAN, Cosmic Ray Detector v1, and the Accel Kitchen logo

v1 A tall box

OWANbowl

Online Watcher of Ambient Natural radiation

A bowl on a young-grass green ground. The steaming bowl catches the particles as they fall.

The OHASHI sticker. Inside a round crest, a pair of chopsticks picks up one falling particle. Below: the name OHASHI, Cosmic Ray Detector v2, and the Accel Kitchen logo

v2 A nearly cubic box

OHASHIchopsticks

Online Hands-on Analyzer of Scintillation Hits, Individually

Chopsticks on an unbleached kraft ground. The chopsticks pick up a single falling particle.

The drawing and letters are in sumi (ink black); the initials and the seal at lower right are in shu (vermilion). The Accel Kitchen logo runs along the bottom edge. The sticker goes on top of the box (the lid).

How v1 and v2 differ

Itemv1v2
NameOWAN (bowl)OHASHI (chopsticks)
StickerA bowl. Young-grass green groundChopsticks. Unbleached kraft ground
Box shapeTall. A display window and a small round hole on the top faceNearly cubic. A display window and two round holes on a side face
MicrocontrollerArduino Nano (ATmega328P)Arduino Nano ESP32 (ESP32-S3)
USB portMini-BType-C
USB driverCH341 driver needed on Windows onlyNot needed
Signal resolution (ADC)10 bit (0–1023)12 bit (0–4095)
Environment sensorTemperature (TMP36)Temperature, humidity and pressure (BME280)
CommunicationUSB serial (9600 bps)USB serial (9600 bps) and Bluetooth LE
Recording on the unitNone (saved on the PC)Can log to a microSD card automatically
CoincidenceTwo units. One cable links a Master and a Slave1 OUT and 3 IN. Reads up to 3 external detectors at once
Display and alertsOLED and LEDOLED, LED and buzzer (a vibration motor can be added)
Time unitmilliseconds (ms)microseconds (µs)
Measurement app…/cosmicray-monitor/v1…/cosmicray-monitor/

Do not use the v1 app or v1 sketch with a v2 board. The columns of the output shift by one and cannot be read correctly.

There are also units in which a v1 board has an Arduino Nano ESP32 swapped in. Their screen and wiring are v1's, and their communication is close to v2's. These units run a different sketch from the v1's. Their ADC is 12 bit (0–4095), their output has 7 columns including a Mode column, and they differ from the v1 in how the threshold is chosen, how settings are saved, the length of a command (up to 47 characters) and how coincidence works. Do not apply this manual's v1 numbers and steps to these units as they are (08 Firmware).

Parts of the v2

Photo of the v2 seen from the front and above. A scintillator wrapped in black tape sits on the board with the OLED standing in front. Four jacks are on the left, and an LED and a button on the right 1 2 3 4 5 6 7
  1. OLED display: shows the count (Cnt), the rate (Rate) and more.
  2. LED: flashes every time a particle is detected.
  3. RESET button: restarts the detector.
  4. Jacks: four of them, OUT and IN1 to IN3. They connect external detectors.
  5. Scintillator and SiPM: the block wrapped in black tape. It is wrapped so that no light gets in.
  6. Test points: GND1 and TP1 to TP4. This is where you put an oscilloscope probe. TP2 is the amplified signal and TP3 is the peak-hold signal. TP4 is near the trimmer.
  7. Standoffs (spacers): they lift the board and leave room underneath for the Nano ESP32.

The front view (a photo of a prototype).

The back of the v2 readout board with the scintillator removed. The Arduino Nano ESP32, the microSD slot, a blue trimmer and the standoffs are visible 1 2 3 4 5
  1. Arduino Nano ESP32: the microcontroller with the USB Type-C port. It plugs into the sockets on the back of the board.
  2. microSD slot: put in a FAT32 microSD card and the detector can log by itself.
  3. Gain trimmer (blue): changes the gain of the amplifier.
  4. Standoffs (spacers): they hold the board up off the floor.
  5. Jacks: lined up along the edge of the board.

The back of the board (with the scintillator removed).

The vibration motor is a part you add later. If you connect it directly to the microcontroller pin (A7), the current is too large and damages the microcontroller. Connect A7 → 1 kΩ → an NPN transistor (such as a 2N3904 or S8050) or an N-channel MOSFET (2N7002), and put a diode (1N4148) in parallel with the motor. Do not connect it to D13 (it is shared with the microSD signal, and the log gets corrupted). Noise from the motor can also cause false counts.

Diagram of how the v1 is built: a scintillator that glows when a particle hits it, a SiPM that turns the light into an electrical signal, and a board with an Arduino Nano that processes the signal, stacked on top of one another
How the v1 is built (illustration)When a particle (radiation) passes through, the scintillator glows and the SiPM turns the light into an electrical signal. The board underneath (an Arduino Nano) processes the signal and sends it to the PC. The labels in the picture are in Japanese: 放射線 = radiation, 光 = light, 電気信号 = electrical signal, シンチレーター = scintillator, 光センサー = light sensor (the SiPM), 電子基板 = electronics board, パソコン = PC.

What comes with it, and handling

  • The detector itself
  • A USB cable

Do not touch the board directly while measuring. Do not power the detector in a bright place with the light-shielding tape removed. If outside light gets in, it cannot measure correctly.

Specifications at a glance

ItemDetails
ScintillatorPlastic, 50 × 50 × 10 mm ("5 × 5 × 1 cm"), is standard. A CsI version, a 1 cm cube, is also available
v2 Light sensorSiPM (onsemi MICROFC-60035, 6 mm square), mounted on a 40 mm square board
v2 SiPM voltageAbout 29 V (stepped up on the board from the 5 V of the USB)
Signal size (ADC)v1: 10 bit (0–1023)v2: 12 bit (0–4095)
Time unitv1: millisecondsv2: microseconds
CommunicationUSB serial (9600 bps). Bluetooth LE can also be used
Data recordingv1: saved on the PCv2: saved on the PC, or logged to a microSD card (FAT32)
PowerPowered from USB (5 V)

For your safety

  • Soldering (assembly kit): work in a well-ventilated place and keep clear of the tip of the soldering iron. Take care not to get burned; safety glasses give extra peace of mind. Wash your hands afterwards.
  • While powered: do not touch the board or the area around the SiPM. On the v2, about 29 V is applied to the SiPM. Unplug the USB cable before you reconnect any boards.
  • Light: do not power the detector in a bright place with the light-shielding tape removed.
  • Static electricity: before you touch the parts on the board, touch something metal to discharge yourself. Hold the board by its edges.
  • Radiation sources: to measure only cosmic rays and ambient radiation you do not need a source. If you use a source such as the Cs-137 or Co-60 in the analysis examples, follow the rules of your school or supervisor and handle it under the guidance of someone who is authorized.

03Connect to a PC

Connect the USB cable so that the PC can find the detector.

The big picture

Detector v1 USB Browser on PC Chrome or Edge Measurement app File .csv / .dat Windows needs the CH341 driver
The v1 connects over USB only. On Windows a driver is needed.
Detector v2 Browser on PC Chrome or Edge Measurement app USB Bluetooth Phone BLE terminal app Bluetooth File .csv / .dat microSD Logs without a PC
The v2 can use Bluetooth as well as USB. Log to a microSD card and you do not need a PC at all.

USB serial driver

The v1 talks to the PC through a USB-to-serial converter (a CH341-type chip), and some operating systems need a driver for it. The v2's Arduino Nano ESP32 speaks USB directly, so no driver is needed.

OSv1v2
WindowsThe CH341 driver must be installedNot needed
macOSUsually not needed. If the detector is not recognized, install the CH341 driver for macOSNot needed
LinuxNot needed (it is in the kernel)Not needed
ChromebookNot needed (Chrome's Web Serial API works as it is)
v1Windows: install the CH341 driver
  1. Download CH341SER.zip.
  2. Right-click the downloaded CH341SER.zip and choose "Extract All". Note where the files are extracted to.
    The right-click menu on CH341SER.zip, with a red arrow pointing at Extract All
    Choose "Extract All" in the right-click menu (the Windows menu here is in Japanese: すべて展開 = Extract All).
  3. Run SETUP.EXE in the CH341SER folder that was created.
    The contents of the extracted folder, with a red arrow pointing at SETUP.EXE
    Run SETUP.EXE (the red arrow) in the folder.
  4. Press INSTALL in the window that appears, and the installation starts.
    The DriverSetup window, showing the INSTALL, UNINSTALL and HELP buttons and CH341SER.INF
    Press INSTALL in this window.
  • If INSTALL gives an error, run UNINSTALL first and then INSTALL again.
  • After the installation, restarting the PC is the safest course.
macOS: check the port

After connecting the detector over USB, run this command in Terminal.

ls /dev/tty.*
  • v1 If a port such as /dev/tty.usbserial-XXXX or /dev/tty.wchusbserial-XXXX appears, the detector is recognized. If not, install the CH341 driver for macOS.
  • v2 If a port such as /dev/cu.usbmodem… appears, the detector is recognized.
Linux: check the port

After connecting the detector, run this command in a terminal.

dmesg | grep tty

If something like /dev/ttyUSB0 /dev/ttyACM0 appears, the detector is recognized. If the web app cannot open the port, add your user to the dialout group.

sudo usermod -a -G dialout $USER

The change takes effect after you log out and log in again.

Connect the USB cable

Connect the detector to the PC with the supplied USB cable. The display on the detector shows information like this. Units without a display show nothing.

The v1 screen (an example). The numbers match the table below.
The v2 screen (an example). The numbers match the table below.
Photo of the v1 OLED with the items annotated: Slave or Master, total count, elapsed time, rate, trigger threshold and clear threshold
The v1 screen (a real photo)The labels written on the photo are in Japanese: 総カウント数 = total count, 測定時間 = elapsed time, レート = rate. As the English labels say, Sig is the trigger threshold and Res is the clear threshold.
The v1 screen
DisplayMeaning
1Accel Kitchen :Master / :SlaveThe role when two units are used for coincidence measurement. A single unit shows :Master (05 Coincidence)
2Cnt:The total number of events detected since power-on
3T:The time elapsed since power-on (hours:minutes:seconds)
4Rate:The measured rate (per second) and its statistical uncertainty (±). It is divided by the time with the dead time (the time during which it could not count) subtracted
5SigThe threshold that starts a trigger (an ADC value). A signal above it is counted as an event
5ResThe threshold for starting the next measurement. Once the ADC value falls below it, the detector waits for the next event
The v2 screen
DisplayMeaning
1Cnt:The total number of events detected since power-on
2T:The time elapsed since power-on (hours:minutes:seconds)
3Rate:The measured rate (per second) and its statistical uncertainty (±). It is divided by the time with the dead time (the time during which it could not count) subtracted
4Thr:The signal threshold (0–4095). A signal above it is counted as an event
5Duty:The PWM value (0–255) that sets the comparator threshold. It is used in Digital / Dual mode
6Temperature, humidity, pressureValues from the BME280, updated every 2 seconds. They do not appear if the sensor is not found

The threshold is set automatically every time you power on. The v1 measures the noise on A0 for about 0.1 second right after startup and adds 20 (Sig) and 15 (Res) to the minimum. The v2 measures the noise on A0 for about 1 second (100 samples) right after startup and adds a margin (initially 50) to the maximum.

Power it on in its normal, assembled (light-tight) state. Do not move or touch the detector during the first second or so after startup (about 0.1 second on the v1), while it is measuring the noise. If outside light gets in at startup, or the noise is large, the threshold ends up too high and nothing is detected (09 Troubleshooting).

From power-on to counting

  1. Power onplug in the USB cable
  2. Measure the noiseabout 0.1 s (10 samples)about 1 s (100 samples)
  3. Threshold is setminimum + 20 (Sig)maximum + 50 (Thr)
  4. Logo and settings shownabout 2 s
  5. Counting startsCnt goes up

04Measure

Use the web app to turn the detector's data into graphs and save it on the PC.

Open the web app in Chrome or Edge on a PC (a Chromium-based browser). Firefox and Safari do not support the USB connection (the Web Serial API).

Measure with a v2

  1. Open the app and choose your model

    Open https://accel-kitchen.com/app/cosmicray-monitor/. The first screen asks which model you have. Compare your detector's box with the pictures and choose v2. The browser remembers your choice, so next time you start at the connection screen. The app can show English (switch at the top right).

  2. Connect with USB

    Press "Connect with USB", choose the detector's port in the browser's list and press "Connect". When the bar at the top changes to "Connected · USB", you are done. The graphs grow every time a cosmic ray arrives.

  3. Measure and save

    For a first try, measure for about 5 minutes. For saving, "Choose a folder" (auto-save) is recommended. Incoming data is appended to <detector name>_<date>.dat. To put what is on screen into a single file, press "Save .dat" or "Save .csv" under "Download".

The model chooser screen

Scroll the screenshot sideways →

The model chooser screen of the measurement app. Three cards stand side by side: v1, v2 and v2.1 (coming soon). Each has a picture of the box and a description of how to recognize it 1 2 3
  1. v1: a tall box. A small window for the display and a small round hole on the top face. This opens the page for the v1.
  2. v2: a nearly cubic box. A window for the display and two round holes on a side face. This is the app proper.
  3. v2.1: a flat box with posts at the four corners. Its screen is still being prepared and you cannot choose it yet.

The browser remembers the model you chose. To choose again, press "Choose another model" at the top of the connection screen.

The first screen of the app (connect)

Scroll the screenshot sideways →

The connection screen of the measurement app, with three cards: Connect with USB, Connect with Bluetooth and Try the demo 1 2 3 4
  1. Connect with USB: one cable. The most reliable way.
  2. Connect with Bluetooth: wireless. In "Detector name", enter the detector's Bluetooth name (initially CosmicRay).
  3. Try the demo: no detector needed. Synthetic data drives every feature.
  4. Choose the folder first: pick the save folder before you connect.

The screen while measuring

Scroll the screenshot sideways →

The measuring screen of the app. At the top are the total events, the average count rate and the elapsed time. On the left is the energy spectrum histogram, on the right the count rate over time, and the save settings are in the right-hand panel 1 2 3 4 5 6 7 8 9 10
  1. Connection status: "Connected" and the detector's name. The dot flashes each time an event arrives.
  2. Pause recording: incoming events are not recorded (the detector keeps counting).
  3. Disconnect: the data stays on screen.
  4. Oscilloscope: shows the signal waveform (it does not count while you look).
  5. Advanced settings: the threshold, switches for the detector's functions and more.
  6. Total events, average count rate, elapsed time: the rate is divided by the time with the dead time subtracted.
  7. Energy spectrum (ADC histogram): the number of events per signal size. The low hump on the left is ambient gamma rays; the hump on the right (around ADC 1000) is cosmic rays.
  8. Count rate over time: how the rate changes.
  9. Temperature, humidity, pressure, external detectors, average ADC, dead time, trigger
  10. Save: choose a folder and auto-save starts. The format and notes are set here too.

This is the demo (synthetic data). The numbers are not a real measurement.

Measure with a v1

  1. Open the app and connect

    Open https://accel-kitchen.com/app/cosmicray-monitor/v1 and press "Connect by USB". Choose the serial port (such as COMx) and the measurement starts by itself after a moment.

  2. Check that the graph moves

    Check that graphs appear and that Cnt: on the detector's screen keeps going up.

  3. Save

    When the measurement is finished, press "Save as .csv" or "Save as .dat" to download the data to the PC (if you choose a save folder first, the data is appended automatically). A .dat file is tab-separated, and lines that start with # are the header and notes. A .csv file is comma-separated, and its first line is the header. Open it in a text editor and check that it contains data.

    A saved data file opened in a text editor. Numbers such as the date and ADC value line up, one event per line
    A saved file opened in an editor. It was saved by an older version of the measurement app, so its columns are not in the same order as the tables in 06 Data and analysis. Just check that each line is one event.

The first screen of the v1 page (connect)

Scroll the screenshot sideways →

The connection screen of the measurement app for the v1. Three cards stand side by side: Connect by USB (with the connection options open), Connect by Bluetooth and Try the demo 1 2 3 4
  1. Connect by USB: one cable. The most reliable way.
  2. Connection options: the baud rate (normally 9600) and the board type (normally "Detect automatically").
  3. Connect by Bluetooth: wireless. Only the ESP32-S3 version of the detector can use it.
  4. Try the demo: no detector needed. Synthetic data lets you try every feature.

The v1 page while measuring

Scroll the screenshot sideways →

The measuring screen of the measurement app for the v1. At the top are the total events, the average count rate and the elapsed time. On the left is the energy distribution histogram, on the right the count rate over time, and the save settings are in the right-hand panel 1 2 3 4 5 6 7
  1. Total events, average count rate, elapsed time: the rate is divided by the time with the dead time subtracted.
  2. Energy distribution (ADC histogram): the number of events per signal size. You can change the bin width and switch to a log scale.
  3. Count rate over time: how the rate changes.
  4. Board: the connected detector (such as Arduino Nano). To its left are the average temperature and the average dead time.
  5. Mode: "Single (Master)" means one unit is measuring alone. For coincidence you choose Slave (05 Coincidence).
  6. Choose a save folder: auto-save starts from here.
  7. Save as .csv: puts the data on screen into a single file ("Save as .dat" is just above it).

This is the demo (synthetic data). The numbers are not a real measurement.

How to save

Everything is in the panel on the right of the measurement app (on a narrow screen, the "Save" button at the bottom right). Once you choose a folder, auto-save starts from there. Use auto-save for long measurements (the screen keeps at most 1 million events).

The Save panel of the measurement app. Choose a folder, Format, Notes, the Download buttons Save .dat and Save .csv, and Clear data and start over are stacked vertically 1 2 3 4 5
  1. Choose a folder: auto-save starts from here.
  2. Format: .dat, .csv or both.
  3. Notes: place, orientation, conditions and so on. They are written at the top of each file, with # at the start of each line.
  4. Download: puts the data on screen into a single file.
  5. Clear data and start over: also sends RESET to the detector and returns the event number and the time to 0. Files you have already saved are not deleted.

This is the v2 screen. On the v1 page the buttons read "Choose a save folder" and "Save as .dat" / "Save as .csv", and there is also a "File name prefix" field. On the v1 page, "Clear data and start over" clears only the data on screen (it does not send RESET to the detector). On the v1 page, the notes are written to the .dat file only.

  • If the browser asks for permission to write, choose "Edit files" (the exact wording depends on the browser).
  • Incoming data is appended to <detector name>_<date>.dat. A new file starts when the date changes, and when a file gets very large it is split into _02, _03… The first half of the name is the detector's Bluetooth name, so if you give each unit its own name, the files are separated per unit too (FAQ).
  • On the v1 page, "File name prefix" sets the beginning of the file name.
  • A file saved with the "Download" buttons is named <name>_<YYYY-MM-DD_HH-MM-SS>.dat (the time you started measuring).
  • If you try to close the tab while there is data that has not been written yet, the browser asks you to confirm.

Watch the waveform with the oscilloscope

Press "Oscilloscope" in the bar at the top to see the waveform of the signal coming from the detector. Use it to check that a signal is arriving and that the threshold is right. On the v2 one point is shown every 12 µs. The v1 page has it too. The detector returns to counting by itself if no command arrives for 60 seconds, but the v1 page sends a keepalive every 15 seconds while it is open, so the detector does not return. On a v1 detector one point is shown every 6.5 µs on the Arduino Nano and every 12 µs on the ESP32-S3 version. At 9600 bps the Arduino Nano can send only about 2 waveforms per second. While it is open, all counting stops, including coincidence counting.

While it is open, the detector does not count cosmic rays. The time it stood still is subtracted as dead time, so the average count rate stays correct. Return with "Close and resume counting" (or Esc). The v2 page closes it automatically after 10 minutes without any operation. The v1 page does not close it automatically, so always press "Close and resume counting" when you have finished looking.

The "Open the oscilloscope?" confirmation. It says that counting stops while it is open, and that the paused time is subtracted as dead time
When you press the button, this confirmation comes first. Press "Open" and the screen switches to the oscilloscope view. If you tick "Don't ask again", it opens without the confirmation from next time on.

The oscilloscope screen

Scroll the screenshot sideways →

The oscilloscope screen. On a light background, many waveforms that rise and then fall slowly are overlaid, with a red dashed threshold line and a handle at its right end. At the top are the Triggered / Free-run switch, input fields and control buttons; numbers such as Peak ADC are along the bottom 1 2 3 4 5 6 7 8 9 10 11 12
  1. Counting paused: the time the oscilloscope is open.
  2. Triggered / Free-run: capture when the signal crosses the threshold (default), or keep capturing.
  3. Rate limit [/s]: the number of waveforms sent per second (1–20, initially 3). Use fewer over Bluetooth.
  4. Re-arm (threshold −): how far below the threshold the signal must fall before the next waveform can be captured (initially 5).
  5. Persistence: how many earlier waveforms stay faintly overlaid.
  6. Fit the vertical axis: off by default (this screenshot was taken with it on).
  7. Pause: freezes the current waveform so you can look at it slowly.
  8. Clear: removes the overlaid waveforms.
  9. Save .wfm: saves the waveform you can see to a file.
  10. Waveform: the newest one is the dark line. The red dashed line is the threshold. Drag the handle at its right end up or down, and the position where you let go is set on the detector (after a power cycle it returns to the auto-calibrated value). This is the threshold actually used for counting. You can also move it with the ↑ and ↓ keys (Shift for 10, PageUp / PageDown for 100). The teal dashed line is the re-arm level and moves with the threshold.
  11. Peak ADC, number of waveforms and so on: numbers for the waveforms you can see now.
  12. Close and resume counting

This is the demo (synthetic data).

What you see is not the raw amplified pulse but the output of the peak-hold circuit. It rises, stops at the peak, falls slowly and is then reset. To see the raw pulse, put an oscilloscope probe on the board's test point (TP2) (10 Assembly).

How it captures (Triggered / Free-run) and re-arm

  • Triggered (default): a waveform is captured only when A0 crosses the threshold. After one is captured, the next one waits until A0 has fallen back to the re-arm level or below.
  • Re-arm: the level is "threshold − the value in the box" (initially 5; if the threshold is 120, the level is 115). It is drawn as a teal dashed line and moves with the threshold line when you drag it. If you empty the box and leave it, it returns to the default of 5.
  • Free-run: without waiting for a trigger, it keeps capturing the newest window of 161 points at the interval set by the rate limit. Use it to look at the baseline or the noise, or to look for small signals that never reach the threshold. The vertical trigger line disappears and the horizontal axis becomes "time within the window".

If no waveform appears when you open it: in Triggered mode, nothing appears unless the A0 baseline drops below the re-arm level. Put the threshold well above the baseline, and keep the re-arm value smaller than the baseline's fluctuation. To just check, switch to Free-run and you will see the baseline.

The v1 page's oscilloscope has the same Triggered / Free-run switch and "Re-arm (threshold −)". On a v1 detector it works once you have re-flashed the updated sketch.

Advanced settings

Press "Advanced settings" in the bar at the top and a panel opens from the right. The table of contents at the top of the panel jumps to each section. You can change the board's settings only while a detector is connected. The "Board: …" lines show the values the detector is using now (the "Advanced settings" of the v1 page has "Thresholds and mode", "ESP32-S3 settings", "Connection" and "Help").

Trigger and thresholds

The "Trigger and thresholds" section of Advanced settings. The trigger mode switch, the signal threshold with Auto-calibrate, and the comparator threshold with Auto PWM are stacked vertically 1 2 3 4 5
  1. Trigger mode: Analog, Digital or Dual. At power-on it is always Analog.
  2. Signal threshold (0–4095): used in Analog and Dual. Even if you set it by hand, it goes back to the auto-calibrated value when you power the detector off and on again.
  3. Auto-calibrate: measures the noise for about 1 second (100 samples) and sets the threshold to its maximum plus the margin (initially 50). Press it with no light getting in. If you change the margin, the new value is saved.
  4. Comparator threshold (PWM duty, 0–255): used in Digital and Dual.
  5. Auto PWM: moves the threshold and settles where the noise triggers no more than the target number of times (about 8 seconds). Run it once after you switch to Digital or Dual.

If the threshold is too low, noise gets counted too; if it is too high, small signals are missed. When in doubt, stay in Analog and use auto-calibration.

The "Detector features" section of Advanced settings. Switches for Log to microSD, Read external detectors, OLED screen, Buzzer and Vibration motor
Detector featuresSwitch the microSD log, reading the external detectors, the OLED, the buzzer and the vibration motor on or off. Switching off what you do not use reduces the time it cannot count (dead time). The settings stay in the detector.
The "Sound and vibration" section of Advanced settings. The buzzer's minimum and maximum frequency and length, the vibration's minimum and maximum length, and a test button for each
Sound and vibrationThe bigger the signal, the higher the pitch and the longer the vibration (logarithmic). Set the lowest and highest frequency, the length of the beep and the length of the vibration, then check them with "Play test" and "Vibrate test". The sound does not get in the way of counting.
The "Connection" section of Advanced settings. Information about the connected detector, a field for the Bluetooth name, and the USB baud rate choice
ConnectionWhich detector is connected, the Bluetooth name (1–19 characters; press "Rename and restart" and the detector restarts by itself after about 1 second) and the USB baud rate (normally 9600).

Besides these there are "Display" (how often the graphs are redrawn: 1 s, 3 s, 10 s or manual), "Server upload" and "Help".

Other features of the app

FeatureWhat it does
Analysis (plotter)Open it with "Analysis" in the bar at the top (the v2 page has it; the v1 page does not have this button). It loads a saved .dat / .csv (including a .dat saved on the v1 page, and a microSD log) and makes histograms, zenith angle distributions and energy calibrations. No detector is needed. The file is read only inside this PC and is not sent anywhere (06 Data and analysis).
Sending to a serverOn the v2 page, from "Server upload" in Advanced settings you can send the events you measure to the observation server. The official record is the auto-save on this PC; the upload is a copy. In the server's current format, the humidity, pressure and external-detector columns (Dig1–3, Ana1–3) are not sent.
DemoNo detector is needed; synthetic data lets you try every feature. During the demo a striped band appears at the top, and DEMO_ is added to the names of saved files.
v2 When Bluetooth dropsIf the link drops without you pressing "Disconnect", the app reconnects by itself. It starts at 1 second and doubles the interval each time (30 seconds at most, with no limit on the number of tries), and the bar at the top blinks and counts down "attempt N in M s" (N is the number of the attempt and M is the seconds to wait). Auto-save keeps writing to the same file.
How to open the pageBluetooth does not work on a page opened with file://. Open it over https:// or http://localhost.

For details that are not in this chapter (all the commands, the file formats, the pin map), see the measurement app's manual.

While you measure

  • Do not touch the board directly while measuring.
  • Make sure the USB cable is not coming loose and the PC does not go to sleep. Either one can leave gaps in the data.
  • How long to measure, and the settings for an overnight run, are in 07 FAQ.

v2Measuring without a PC

  • Log to a microSD card: insert a FAT32 microSD card and power on, and every event is written, one line at a time, to a file such as LOG0001.TXT (SD logging is on by default). It suits long measurements outdoors or where a PC is hard to bring.
  • Connect over Bluetooth: the detector's Bluetooth name is CosmicRay by default. You can connect from the measurement app, or use a generic BLE terminal app on a smartphone (Bluefruit Connect on iOS; Serial Bluetooth Terminal or nRF Connect on Android) in UART mode to see the lines and send commands.

05Coincidence

Stack two detectors and pick out only the events in which both respond at almost the same time.

What is a coincidence measurement?

Stack two detectors one above the other and record only the events in which both respond at almost the same time. Noise that arises inside a scintillator, and natural radiation such as gamma rays, reaches only one of them. That lets you pick out efficiently the cosmic-ray muons that pass through both detectors.

Detector A Detector B Muon Gamma ray Muon: passes A and B → both light up → recorded Gamma ray or noise: only one unit → not recorded
The idea when two units are stacked (schematic)

For an overview and an example of the connections, see also the explainer video (in Japanese).

If one unit measures about 1 cnt/s, the rate drops sharply in a coincidence measurement (it depends on the distance between the detectors and their area). To collect enough events you have to measure much longer than with a single unit. The rate is often around 0.01–0.1 cnt/s, so it can take several hours.

v1Link a Master and a Slave

Master records all of its own events Slave records only coincident events coincidence line 3.5 mm cable USB power only (no PC needed) PC Web app (v1)
Take the data from the Slave. The Master's job is to tell the Slave, over the line, that it has responded.

The current way

  1. Link the two detectors with the supplied coincidence cable.
  2. Connect the unit that will be the Slave to the PC over USB. Power the other one (the Master) from USB too. It does not need to be connected to the PC.
  3. In the measurement web app (the v1 page), open "Advanced settings" → "Thresholds and mode", choose "Slave (coincidence)" and press "Set".
  4. Check that the Slave's screen shows :Slave and the Master's screen shows :Master, and then start measuring (on an Arduino Nano, the Slave lights its LED for about 3 seconds, until the logo display has finished).
The old way (for old versions of the app that cannot switch to Slave)
  1. Link the two detectors with the supplied coincidence cable.
  2. Connect the Slave unit to the PC over USB.
  3. Press the reset buttons of both units at the same time and release them. Within 1 second of releasing, press the Slave's reset button once more.
  4. Check in the web app that it is measuring as the Slave.
How it works (what the firmware does)
Master signal Line (D6) Slave signal about 20 µs Read Slave reads the line ~10 µs after its own signal; HIGH → record
Timing of the Master and the Slave (schematic)
  • When its own signal rises above the threshold, the Master drives the coincidence line HIGH for about 20 µs to tell the Slave.
  • When its own signal rises above the threshold, the Slave waits about 10 µs and then reads the line. If it is HIGH, the Slave decides "coincidence" and records the event. If it is LOW, it does not.
  • So the Master's data holds every event the Master saw, while the Slave's data holds only the coincident ones. To collect coincidence data, connect the Slave to the PC.
  • The roles are decided by the state of the line at power-on. A single unit starts as a Master, because a resistor on the board pulls the line LOW. The Master holds the line HIGH for about 2 seconds right after it starts, so a detector that starts during that time becomes the Slave. If you choose Slave in the web app, you can switch roles without worrying about this order.

v2Connect OUT and IN

The v2 has no Master or Slave. Every time the detector responds, it sends a short pulse of 100 µs or more out of the OUT jack. After waiting about 50 µs it reads the state of IN1 to IN3 and writes it in the Dig1 to Dig3 columns of the log. Every event stays in the one unit's log, and you pick out the coincident ones afterwards using the Dig columns.

The width that counts as a coincidence (how much the other unit's signal may be offset in time) is about ±50 µs, calculated from the code (it is not a measured value). Accidental coincidences (separate particles that happen to overlap) become more frequent as the rate goes up.

Detector A Detector B OUTIN1IN2IN3 OUTIN1IN2IN3 A's OUT → B's IN1, B's OUT → A's IN1
With two 3.5 mm cables, both logs get a coincidence mark (Dig1 = 1).
A signal A OUT B signal B OUT A reads B reads OUT ≈ 100 µs
Timing (schematic). Each unit reads the other's OUT about 50 µs later.
  1. Stack the two detectors one above the other.
  2. With 4-pole 3.5 mm cables, connect A's OUT to B's IN1 and B's OUT to A's IN1. One direction alone also works; in that case only the log on the IN side gets the mark.
  3. On both detectors, check that reading the external detectors (EXT) is on. It is on by default. If you turn it off, not only the reading but also the OUT pulse stops, and the other unit can no longer see this one.
  4. After measuring, select the rows in the log where Dig1 is 1 and only the events in which the other unit also responded remain. With up to three units, IN2 and IN3 work the same way.

Before you connect the output of a device that runs at 5 V (such as a v1) to a v2 IN, check the output voltage (3.3 V or 5 V) against the circuit diagram. If 5 V goes in as it is, the microcontroller may be damaged.

06Data and analysis

What is inside the saved files, and how to begin analyzing them.

What the data contains

The detector outputs one line every time an event occurs: a row of numbers separated by spaces.

v1The line the detector outputs

### Event Time[ms] ADC[0-1023] SiPM[mV] Deadtime[ms] Temp[C]

Below this header come the numbers in the same order, one line per event, separated by spaces.

  • Eventwhich event it is
  • Time[ms]elapsed time (ms)
  • ADC[0-1023]signal strength
  • SiPM[mV]signal size (voltage)
  • Deadtime[ms]total time it could not count
  • Temp[C]temperature
ColumnMeaning
EventA running number that goes up by 1 every time the detector responds
Time[ms]Time elapsed since power-on (milliseconds)
ADC[0-1023]The analog value read from the SiPM. It shows the strength of the signal (minimum 0, maximum 1023)
SiPM[mV]The size of the SiPM signal calculated from the ADC value (millivolts)
Deadtime[ms]The total time during which it could not count (milliseconds). Processing times shorter than 1 millisecond are rounded down, so this is mostly the time spent rewriting the display and the time the oscilloscope was open
Temp[C]Temperature (°C), updated every 2 seconds

A file saved by the measurement app (.dat is tab-separated, .csv is comma-separated) has the PC's time (PC_Timestamp) in the 2nd column and an extra Mode column at the end (0 is Master, 1 is Slave). So from the 3rd column on, everything sits one column to the right of the line above.

v2The line the detector outputs

### Event Time[us] ADC[0-4095] Deadtime[us] Temp[C] Hum[%] Press[hPa] Dig1 Dig2 Dig3 Ana1 Ana2 Ana3
42 18732450 1940 1203000 24.3 48.2 1013.2 1 0 1 2448 112 2804

How to read one line (the colors show the kind of column).

  • Event42which event it is
  • Time[us]18732450elapsed time (µs)
  • ADC1940signal strength
  • Deadtime[us]1203000total time it could not count
  • Temp[C]24.3temperature
  • Hum[%]48.2humidity
  • Press[hPa]1013.2pressure
  • Dig11ext. 1 also responded
  • Dig20ext. 2 did not
  • Dig31ext. 3 also responded
  • Ana12448ext. 1 signal strength
  • Ana2112ext. 2 signal strength
  • Ana32804ext. 3 signal strength
ColumnMeaning
EventThe event number (1, 2, 3… counting from power-on or from the last RESET)
Time[us]Time since power-on (or the last RESET), in microseconds
ADC[0-4095]The peak-hold value of this detector. It shows the strength of the signal (0–4095). It is a value read once after the trigger, not the measured peak itself
Deadtime[us]The total time it could not count, in microseconds
Temp[C] / Hum[%] / Press[hPa]Temperature, humidity and pressure from the BME280, updated every 2 seconds. nan if there is no sensor
Dig1 to Dig3The digital inputs of external detectors 1 to 3 (0 or 1). A 1 means the other unit was also responding at that moment
Ana1 to Ana3The analog inputs of external detectors 1 to 3 (0–4095)

A file saved by the measurement app has the PC's time (PC_Timestamp, UTC) in the 2nd column. So from the 3rd column on, everything sits one column to the right of the line above. .dat is tab-separated, .csv is comma-separated, and lines that start with # are notes and headers.

The log on the microSD card (LOG0001.TXT and so on) has a different form. It has no PC-time column (it has 13 columns), and between the event lines there are startup messages (such as SD: ready and MODE:ANALOG) and replies to commands. A new file is made every time the detector starts. The measurement app's analysis page reads it as it is. To read it with Python, select only the lines that have 13 items (see the code below).

How to work out the count rate

Divide by the time with the dead time (the time it could not count) subtracted. Do not divide the number of lines you received by the elapsed time.

Elapsed time (Time) counting counting counting counting Live time: the time spent counting Dead time: the time it could not count
The elapsed time is made of live time and dead time.

Dead time includes the time spent processing one event, rewriting the display, having the oscilloscope open and so on. On the v1, processing times shorter than 1 millisecond are rounded down, so it is mostly the time spent rewriting the display and the oscilloscope time. The rate is the number of events divided by the live time.

rate [events/s] = (last Event − first Event) ÷ ((last Time − first Time) − (last Deadtime − first Deadtime))

Time and Deadtime are in milliseconds for the v1 and microseconds for the v2. Make the units match before you calculate. On the v2, if Event, Time or Deadtime goes down because of a RESET or a restart, start a new segment there and add the segments together.

How to read a histogram

A histogram (an energy distribution) counts your data by signal size (ADC value) and plots the result. With a plastic scintillator, a gamma-ray hump on the weak-light side and a cosmic-ray hump on the strong-light side separate clearly.

Spectrum taken with a plastic scintillator. A gamma-ray hump on the weak-light side and a cosmic-ray hump on the strong-light side are clearly separate
Spectrum of a plastic scintillatorThe horizontal axis is the strength of the light (= the energy deposited) and the vertical axis is the number of counts. Blue is gamma rays and pink is the cosmic-ray hump.
The analysis page of the measurement app. It loads a saved file and shows the histogram with the event count, mean, median and standard deviation
An example of the analysis pageSynthetic data made as if a Cs-137 source were present (the screenshot is in Japanese; the page has an English mode). Load a saved file and you can see the histogram, the mean and the standard deviation (the measurement app's manual).

Besides "ADC histogram", the analysis page has two more tabs. Zenith angle (the zenith angle distribution): enter the count rates you measured with the detector tilted in steps of 15°, and it fits them with cosnθ. Energy calibration builds a formula that converts the ADC value to keV from the peaks of a source's known gamma rays. If one file holds several measurements (separated by a RESET or a restart), the analysis page splits them apart and adds them together.

The "Zenith angle" tab of the analysis page (in Japanese). A table of count rate by angle and a graph fitted with cos to the power n
Zenith angleSynthetic data. (The screen is in Japanese.)
The "Energy calibration" tab of the analysis page (in Japanese). A table for choosing the source's peaks and a straight-line graph relating ADC to keV
Energy calibrationAn example of a linear formula using the two Co-60 peaks. Synthetic data. (The screen is in Japanese.)

v2Read it with Python

import pandas as pd

cols = ["event", "pc_time", "time_us", "adc", "deadtime_us",
        "temp", "hum", "press", "dig1", "dig2", "dig3", "ana1", "ana2", "ana3"]
df = pd.read_csv("CosmicRay_2026-10-22.dat", sep="\t", comment="#", names=cols)

live_s = (df.time_us.iloc[-1] - df.time_us.iloc[0] - (df.deadtime_us.iloc[-1] - df.deadtime_us.iloc[0])) / 1e6
rate = (df.event.iloc[-1] - df.event.iloc[0]) / live_s
print(f"{rate:.2f} cnt/s")

If you saved a .csv, it has a header row, so pd.read_csv("yourfile.csv", comment="#") reads it (you do not need sep or names).

Change the file name to match the file you saved.

The microSD log has no PC-time column and has other lines mixed in, so read it by selecting only the lines that have 13 items, like this.

import pandas as pd

cols = ["event", "time_us", "adc", "deadtime_us", "temp", "hum", "press",
        "dig1", "dig2", "dig3", "ana1", "ana2", "ana3"]
rows = [l.split() for l in open("LOG0001.TXT") if not l.startswith("#")]
rows = [r for r in rows if len(r) == 13 and r[0].isdigit()]
df = pd.DataFrame(rows, columns=cols).apply(pd.to_numeric, errors="coerce")

v1Read it with Python

import pandas as pd

# when you saved a .csv (comma-separated, with a header row)
df = pd.read_csv("data.csv", comment="#")

# when you saved a .dat (a # header and tab-separated)
cols = ["event", "pc_time", "time_ms", "adc", "sipm_mV", "deadtime_ms", "temp", "mode"]
df = pd.read_csv("data.dat", sep="\t", comment="#", names=cols)

Change the file name to match the file you saved.

Analyze it in Google Colaboratory

Google Colaboratory is a free service that runs Python in your browser. You do not need to install Python on your PC; a Google account is all you need. In the exercises you analyze sample files and try out various kinds of cosmic-ray analysis. If you work through them while measuring for yourself, you will see how to apply them to your own research. The exercises are written in Japanese.

Copy a notebook to your own Google Drive

  1. Open an exercise link in your browser. You must be signed in with a Google account to work. If you see Sign in at the top right, sign in with your own account.
    A notebook open in Google Colaboratory, with a table of contents on the left and chapter headings on the right
    A notebook opened in Colab (a dark-theme screen, shown in Japanese).
  2. From the File menu at the top left, choose Save a copy in Drive. The notebook is copied to your own Drive and you can edit it freely.
  3. The structure of the data files and how to analyze them are explained inside the notebook. Try different things.

Basic Colab operations

  • Run a cell: press the ▶ button to the left of the cell, or press Shift + Enter.
  • Top to bottom: run the cells in order from the top. Running only a cell in the middle may give an error.
  • If you get an error: first try "Runtime" → "Restart runtime", then run the cells again from the top.
  • Loading data: to use data on Google Drive you first have to mount (connect) the Drive. Follow the instructions in the notebook.

You can ask a generative AI such as ChatGPT to help with your analysis code. For example, asking it to "write code that makes a histogram with Plotly" is a good use. But always read the code it gives you and understand what it does before you use it. If you paste it in without understanding, you will not be able to fix it when an error appears, or to interpret the result. It is also a good idea to ask the AI to explain what each line does.

The column order and units of the exercises' sample data may differ from your own data. Check the columns of your data against the tables above before you load it.

07FAQ

If something is unclear or you are stuck while working on your research, look here first.

SETUP

The PC does not recognize the detector when I plug in the USB cable

Check the following in order.

  • Cable: a charge-only cable cannot carry data. Try another cable.
  • USB port: try another USB port.
  • Driver: v1 on Windows, check that the CH341 driver is installed (steps).
  • Restart the PC: after installing a driver, try restarting the PC.

If that does not solve it, ask a mentor on Discord.

I press "Connect" in the web app but no port is shown
  • Are you using a Chrome-based browser (Google Chrome, Microsoft Edge, Brave and so on)? Firefox and Safari do not support the Web Serial API.
  • Is the detector connected over USB?
  • v1 On Windows, is the driver installed?
  • Is another application (the Arduino IDE's serial monitor, or another browser tab with the app open) using the port? Close it and try again.
The ADC values are all 0 (or all at the maximum)
  • When they are all 0: the connector between the detector's upper board (the SiPM board) and the lower board (the readout board) may have come loose. Open the case and check.
  • When they are all at the maximum (1023 for the v1, 4095 for the v2): not enough light-shielding, so outside light may be reaching the SiPM. Reinforce it with aluminum tape or black vinyl tape.
My rate is below 0.5 cnt/s (or above 2.0 cnt/s) and I am not sure it is normal
  • The normal rate depends on the kind of detector and the size of the scintillator. First restart the detector (unplug and replug the USB cable; on the v2 the RESET button also works).
  • With the plastic scintillator version (5 × 5 × 1 cm), anything from about 0.3 to 3.0 cnt/s can be regarded as normal operation (a table of guide values for judging the rate is in 01 Quickstart).
  • If the rate is far above 10 cnt/s, the light-shielding is very likely poor.
  • If the rate is below 0.1 cnt/s, the threshold may be too high. If restarting does not fix it, ask a mentor.
  • The CsI scintillator version (a 1 cm cube) has a small area, so its rate is low to begin with. The numbers above do not apply.
Can I use a Chromebook?

Yes. A Chromebook supports the Web Serial API of Chrome-based browsers, so you can measure straight from the measurement app without installing a driver.

MEASURING

How many minutes should I measure?

It depends on the purpose. As a guide:

  • Checking that it works: about 5 minutes is enough.
  • Comparing two conditions: at least 400 events (a relative uncertainty of 5 % or less) in each condition is a guide. At 1 cnt/s that is about 7 minutes, but it is better to allow some margin and measure for 15–20 minutes.
  • Coincidence measurement: the rate is low (about 0.01–0.1 cnt/s), so it can take several hours.

For details, see the course material "Poisson statistics and ±√N" (in Japanese). It also explains why 400 events give a relative error of 5 %.

I want to measure overnight, but my PC goes to sleep

Turn off sleep in the PC's power settings.

  • Windows: in "Settings" → "System" → "Power & battery" → "Screen and sleep", set the time before sleep to "Never".
  • macOS: in "System Settings" → "Displays" → "Advanced", prevent sleep.
  • Laptops: measure with the laptop plugged in. On battery power it may sleep or switch off.

If "USB selective suspend" is enabled in the PC's USB power management, power to the USB port may be cut off. We recommend disabling it.

Coincidence measurement with two units does not work

v1 Check the following.

  • Connection: are the two units linked by the coincidence cable?
  • Roles: does the Slave's screen show :Slave and the Master's screen show :Master? If not, choose Slave again in the app.
  • Which unit goes to the PC: the coincidence data comes from the serial output of the Slave. The unit you connect to the PC, and the port you choose in the app, are the Slave's.
  • How to power on: the roles are decided when the units are powered on. Power on the Slave within about 2 seconds of the Master starting (if you miss it, press the Slave's reset button). If you choose Slave in the app, you do not need to worry about this order.

v2 Check the following.

  • Connection: are A's OUT and B's IN1 (and the other direction too) linked by a cable?
  • External inputs: on both detectors, is EXT (reading the external detectors) switched on? A detector with it off cannot be seen by the other unit.
  • Which column to look at: the coincident events are the rows of the log where Dig1 is 1.

For more detail, see 05 Coincidence.

I want to measure outdoors. How do I power it?

The detector runs on power from the USB cable. Outdoors you can use the following.

  • A power bank and a laptop: the most common method.
  • A power bank alone: you can check the operation on the detector's screen, but to record data you need a PC.a PC or logging to the microSD card.

A note about power banks: some power banks have a "low-power mode" or "auto-off" that switches the output off by itself when a low-power device is connected. The detector draws very little, so the power may cut out partway through a measurement. Test it for a short time beforehand to be sure it does not switch off. It is safer to choose a power bank whose low-power mode can be disabled, or that has an always-on mode.

v2 Measuring without a PC: the v2 can log to a microSD card by itself. Insert a FAT32 microSD card and power on (04 Measure).

v1 Measuring without a PC: the v1 has no SD card, so it needs a PC to record data. To record without a PC, use a v2, which can log to a microSD card.

When you measure outdoors, check beforehand whether you need permission for the place.

The data broke off during measurement
  • Check that the USB cable has not come loose.
  • Check that the PC did not go to sleep.

DETECTOR SETTINGS

What changes when I restart the detector (RESET button, unplugging and replugging USB, power-cycling)?

When it restarts, the detector starts over from the beginning.

  • What goes back to 0: the event number, the elapsed time and the dead time. The USB and Bluetooth connections are also dropped for a moment.
  • What is measured again: the signal threshold. At every startup the detector measures the noise for about 1 second and sets it again, so a value you set by hand is lost. Start it with no light getting in and without moving it. The trigger mode also always starts as ANALOG. The oscilloscope settings (rate limit, capture mode and re-arm) also go back to their initial values.
  • What becomes new: the microSD log is written to a new file (such as LOG0002.TXT) at every startup.
  • What stays: the comparator's PWM value (Duty), the auto-calibration margin, the on/off state of the features (microSD, external detectors, OLED, buzzer, vibration), the sound and vibration settings and the Bluetooth name.

When you change the Bluetooth name and save it, the detector also restarts by itself after about 1 second.

I use several detectors. How do I tell them apart?

Give each unit its own Bluetooth name. The name is used in the Bluetooth list and also at the beginning of the saved file names, so the files are separated per unit too.

  1. In the measurement app, open "Advanced settings" → "Connection" and enter a new name in "Bluetooth name" (1–19 letters, digits and symbols; upper and lower case are distinguished). Only letters, digits, - and _ are kept in the file name; every other character becomes _ ("Lab 1" becomes Lab_1).
  2. Press "Rename and restart". The detector restarts by itself after about 1 second (the connection drops for a moment).
  3. When you connect over Bluetooth, enter the same name in "Detector name" and only your own detector appears in the list.

If you reconnect to a different detector, the notice "A different detector is connected" appears. The rate, elapsed time and counts on the screen still include the previous detector, so press "Clear data and start over" when you want a clean measurement.

Nothing is being logged to the microSD card
  • Has the card been formatted as FAT32?
  • Insert the card before you power the detector on. A card inserted after startup is not used until you switch the microSD log off and on again in the app's "Advanced settings" → "Detector features".
  • Is logging to the microSD turned on in "Detector features"? (It is on by default.)
  • If the startup messages (the app's receive log) include SD: ready and SD: logging to /LOG0001.TXT, logging has started. If SD: init failed appears, check the card's format, its insertion and the wiring.
  • If a write fails, logging stops there. In that case too, switch the microSD log off and on again.
  • A new file is made at every startup, and also when you switch the microSD log from off back to on (LOG0001.TXT, LOG0002.TXT…). The PC's time is not recorded, so note down for yourself the time you started measuring.

Glossary

OWAN / OHASHI
The names of the detectors: v1 is OWAN (a bowl) and v2 is OHASHI (chopsticks). The sticker on top of the box carries the name and the picture.
Scintillator
A material that glows faintly when a particle passes through. In this manual it is a block of plastic or CsI.
SiPM
Silicon photomultiplier. A component that turns very faint light into an electrical signal.
Muon
A particle made when a cosmic ray hits the atmosphere. It is the main component of the cosmic rays that reach the ground.
ADC
The height of the signal turned into a number: 0–1023 on the v1, 0–4095 on the v2. The larger it is, the more energy was deposited.
Peak hold
A circuit that keeps the height of a pulse's peak for a short while. While it does, the microcontroller reads the height.
Threshold (trigger)
The line that says "count signals from this size upward as particles". When a signal crosses it, that is the trigger.
Dead time / live time
The time it could not count and the time it was counting. The rate is divided by the live time.
Count rate (cnt/s)
The number of events counted per second.
Coincidence
A way of measuring that keeps only the events in which two or more detectors respond at almost the same time.
Histogram
A bar chart made by counting the data by signal size. Also called an energy distribution.
Web Serial API
The mechanism by which a browser opens a USB serial port. Chrome and Edge support it.
BLE (Bluetooth LE)
Low-energy Bluetooth. The v2 uses it to connect to the measurement app.
Firmware / sketch
The program that runs inside the detector's microcontroller. In Arduino, a program is called a "sketch".

08Firmware

"Firmware" is the program that runs inside the detector's microcontroller. How the signal is read, how the threshold is chosen and the format of the output data are all decided by it.

For everyday measuring (measure with the web app and save the data), you do not need to read this chapter. You do not need to install the Arduino IDE either.

Read it when:

  • you want to know exactly what each column of the output data is → 06 Data and analysis
  • you want to know how the threshold and the rate work, or what causes a fault → "Threshold"
  • you want to rewrite or update the detector's program → "How to flash it"

Which sketch to flash

UnitMicrocontrollerSketch
v1 standardArduino Nano (Mini-B)COSMICRAY_DETECTOR_v1.ino
v2Arduino Nano ESP32 (Type-C)COSMICRAY_DETECTOR_ESP32-S3-Nano-v2.ino
v1 with a Nano ESP32 swapped inArduino Nano ESP32 (Type-C)COSMICRAY_DETECTOR_ESP32-S3-Nano.ino (there is no public link yet; if you need it, ask a mentor or write to info@accel-kitchen.com)

The measurement app supports the v2 sketch in this table (the end of the measurement app's manual also lists it as the "supported firmware").

The oscilloscope's "Triggered" / "Free-run" switch and "Re-arm" need a sketch dated 2026-10-23 or later. An older sketch still counts, but these two settings have no effect (with an old sketch the v1 page shows "This firmware does not support the oscilloscope."). Check that the sketch you flash is the new version.

How to flash it

Common preparation

  1. Install the Arduino IDE: get it from the Arduino download page (Arduino IDE 2.x).
  2. Install the libraries: open "Sketch" → "Include Library" → "Manage Libraries…" in the menu, then search for and install the following.
UnitLibraries to install
v1 Arduino NanoAdafruit SSD1306 (1.0.1 or later), Adafruit GFX Library (1.0.2 or later), TimerOne (1.1.0 or later)
v2Adafruit SSD1306, Adafruit GFX Library, Adafruit BME280 Library, Adafruit Unified Sensor
BLE, Preferences and SD come with the ESP32 Arduino core
v1 with a Nano ESP32Adafruit SSD1306, Adafruit GFX Library
v1Flash an Arduino Nano (the older Mini-B type)
  1. Board: choose "Tools" → "Board" → "Arduino Nano".
  2. Processor: choose "ATmega328P (Old Bootloader)" (this works in most cases). If flashing fails, also try "ATmega328P".
  3. Port: from "Tools" → "Port", choose the COM port the detector is connected to.
  4. Upload: run "Sketch" → "Upload".
v2Flash an Arduino Nano ESP32 (the newer Type-C type)
  1. Install the ESP32 board package: open "Tools" → "Board" → "Boards Manager", search for esp32 (Espressif Systems) and install it. Core 3.x is required.
  2. Board: in "Tools" → "Board", choose Arduino Nano ESP32. ESP32S3 Dev Module also works. The sketch specifies pins by GPIO number. If in doubt, ESP32S3 Dev Module is the safe choice. If you choose Arduino Nano ESP32, set "Pin Numbering" under "Tools" to "By GPIO number" (this comes from the explanation in the sketch's comments; it has not yet been checked on a real unit). Non-official clone boards may fail to flash.
  3. USB CDC On Boot: set "Tools" → "USB CDC On Boot" to Enabled. If this is wrong, nothing appears on the serial port.
  4. Enter boot mode: double-click the unit's reset button and check that the port number changes (it has entered boot mode). If it will not enter, press RESET briefly while holding BOOT on the board.
  5. Port: from "Tools" → "Port", choose the port the detector is connected to (COMxx on Windows, /dev/cu.usbmodem… on a Mac).
  6. Upload: run "Sketch" → "Upload".
  7. Open the serial monitor (9600 baud). When Booting v2... appears, you are done.

Close the measurement app while flashing (the two would fight over the port).

v1A v1 board with a Nano ESP32 swapped in (for advanced users)

The board, USB CDC On Boot, boot mode and port are chosen as for the v2 (Core 3.x). If USB CDC On Boot is Disabled you can still flash it, but the serial output goes to the D0 / D1 pins instead of USB, so nothing reaches the PC's serial monitor or the measurement app.

This unit runs a sketch that is different from the v1's (COSMICRAY_DETECTOR_ESP32-S3-Nano.ino), and it differs from the v1 in the following ways. The ADC is 12 bit (0–4095). The output has 7 columns including a Mode column. The threshold is "the noise maximum + 60", and Res is Sig − 20. Of the settings, the margin, the difference from Res, the coincidence method and window, how the pulse height is taken, the OLED and the Bluetooth name are saved (the signal threshold is measured again at every startup). A command can be up to 47 characters. Coincidence works in a different way and uses commands such as SET_COINC and SET_WINDOW. The v1 numbers and commands in this chapter do not apply to it as they are. At startup, diagnostics of the board, the pins and I²C (lines that begin with ###) are printed on the serial port. If the OLED shows nothing, the command I2CSCAN checks the connection.

The v1 board was designed for an Arduino Nano that runs at 5 V, and the amplifier output is wired to the microcontroller's A0 with no voltage divider. The ESP32-S3's inputs only tolerate 3.3 V, so without a divider between A0 and GND, or a clamp to 3.3 V, you may damage the microcontroller. The same goes for the coincidence line (D6). When you connect it to a 5 V v1, put in a level shifter. If you make a 3.3 V ESP32 the Master and connect a 5 V v1 as the Slave, the output reaches only about 2.8 V and the Slave may not be able to read it.

Threshold

The threshold is the line that says "count signals from this size upward as particles". If it is too low, noise is counted; if it is too high, small signals are missed. Either way, it is set automatically every time you power on.

weak Signal size (ADC value) strong noise gamma rays cosmic rays 1 2 3 1 Too low: noise gets counted too 2 Good: noise is removed, signals are counted 3 Too high: small signals are not counted
How the height of the threshold changes things (schematic)

With a high threshold like ③, small gamma rays are no longer counted. Decide according to what you want to count. When in doubt, use the automatically chosen value.

v1Sig and Res

  • Right after startup, the detector reads A0 10 times (every 10 ms, about 0.1 second) and takes the minimum. Sig = minimum + 20 and Res = minimum + 15.
  • When A0 goes above Sig, the event is recorded. While the peak-hold circuit is holding the signal the detector waits, and once A0 drops below Res it accepts the next event.
  • To change them by hand, use the command SET_THRESH:<sig>,<rst> (rst must be smaller than sig, and sig at most 1023).

v2The signal threshold and the comparator threshold

  • Signal threshold (Thr on the OLED): right after startup, the detector reads A0 100 times (every 10 ms, about 1 second) and sets the maximum + a margin (initially 50). For example, if the noise is 12 to 44, the threshold is 94. You can change the margin with AUTO_THRESH:<margin> or SET_AUTO_MARGIN; the value you set is saved and is used at the next startup too. The threshold itself goes back to this auto-calibrated value the next time you power on, even if you set it by hand.
  • Trigger mode: the default ANALOG compares the peak-hold value on A0 with the threshold in software. DIGITAL triggers on an interrupt from the external comparator's output and does not use the signal threshold. DUAL decides with the comparator and then also compares the signal size with the signal threshold, discarding it if it is smaller. At power-on it always starts in ANALOG.
  • Comparator threshold (Duty on the OLED): made from the PWM value (0–255) on D2. It is used only in DIGITAL and DUAL, and AUTO_PWM adjusts it automatically (about 7–8 seconds). Run it once after you switch to DIGITAL or DUAL.
  • When in doubt, keep using ANALOG. To set the threshold again, run AUTO_THRESH with no light getting in.

Commands

You can read and write the settings by sending commands to the detector. The buttons of the measurement app send these commands behind the scenes. To send them by hand, use the Arduino IDE's serial monitor (9600 baud, line ending LF or CR) or the app's "Advanced settings". One line is one command, and at most 31 characters for the v1.47 characters for the v2.

v1 commands
CommandWhat it doesResponse
SET_MODE:0 / SET_MODE:10 is Master, 1 is SlaveMODE:0 / MODE:1
GET_MODERead the current roleMODE:0 / MODE:1
SET_THRESH:<sig>,<rst>Set Sig and ResTHRESH:<sig>,<rst>
GET_THRESHRead the current thresholdsTHRESH:<sig>,<rst>
AUTO_THRESHMeasure the noise again and set the thresholds automaticallyTHRESH:<sig>,<rst>
SET_SCOPE:ON / OFF, GET_SCOPEOscilloscope (waveform display). It does not count while ONSCOPE:ON / SCOPE:OFF
SET_SCOPE_RATE:<1–20> / GET_SCOPE_RATEThe maximum number of waveforms sent (per second)SCOPE_RATE:<n>
SET_SCOPE_TRIG:NORMAL / FREE, GET_SCOPE_TRIGHow the oscilloscope captures. NORMAL captures only when the threshold is crossed, and FREE keeps capturing without a trigger (initially NORMAL)SCOPE_TRIG:NORMAL / SCOPE_TRIG:FREE
SET_SCOPE_REARM:<0–1023>, GET_SCOPE_REARMAfter one waveform has been captured, the next is not captured until A0 falls back to "threshold − this value" or below (initially 5)SCOPE_REARM:<n>

v1 The v1's settings are not saved. After a power cycle the thresholds go back to being set automatically. The oscilloscope settings (rate limit, capture mode and re-arm) are not saved either, and go back to their initial values after a power cycle. If no command arrives for 60 seconds, the oscilloscope turns itself OFF and counting resumes (but the v1 page sends a keepalive every 15 seconds while it is open, so this does not happen there).

Main v2 commands
CommandWhat it doesResponse
GET_THRESHRead the signal threshold and the PWM valueTHRESH:<sig> DUTY:<duty>
SET_THRESH:<0–4095>Set the signal threshold (it goes back to the auto-calibrated value the next time you power on)THRESH:…
AUTO_THRESH / AUTO_THRESH:<margin>Measure the noise for about 1 second and set it automatically. Run it with no light getting in. If you add <margin>, it changes the margin (and saves it) and then runsTHRESH:…
GET_MODE / SET_MODE:ANALOG|DIGITAL|DUALTrigger modeMODE:ANALOG and so on
SET_PWM:<0–255> / GET_PWM / AUTO_PWMThe comparator threshold (for Digital and Dual)PWM:<duty>
SET_SCOPE:ON / OFFOscilloscope. It does not count while ON (that time counts as dead time). If the state does not change it returns nothing, so check with GET_SCOPESCOPE:ON / SCOPE:OFF
SET_SD / SET_EXT / SET_OLED / SET_BUZZER / SET_VIB :ON|OFFSwitch the microSD, external detectors, OLED, buzzer and vibration on or off (saved)SD:ON and so on
SET_BEEP:<min_hz>,<max_hz>,<ms> / BEEP_TESTThe pitch and length of the buzzer (the bigger the signal, the higher the note)BEEP:500,4000,25
SET_AUTO_MARGIN:<n> / GET_AUTO_MARGINThe margin for auto-calibration (saved)AUTO_MARGIN:<n>
SET_VIB_MS:<min>,<max> / VIB_TESTThe length of the vibration (1–500 ms, min < max) and a test vibrationVIBMS:<min>,<max>
SET_SCOPE_RATE:<1–20> / GET_SCOPE_RATEThe maximum number of waveforms the oscilloscope sends (per second, initially 3; not saved)SCOPE_RATE:<n>
SET_SCOPE_TRIG:NORMAL / FREE / GET_SCOPE_TRIGHow the oscilloscope captures (initially NORMAL; not saved). FREE keeps capturing the newest window without a triggerSCOPE_TRIG:NORMAL / SCOPE_TRIG:FREE
SET_SCOPE_REARM:<0–4095> / GET_SCOPE_REARMAfter one waveform has been captured, the next is not captured until A0 falls back to "threshold − this value" or below (initially 5; not saved)SCOPE_REARM:<n>
SET_BLENAME:<name> / GET_BTADDRChange the Bluetooth name (when you save it, the detector restarts by itself after about 1 second) / read the board's addressBLENAME:… / BTADDR:…
RESETReset the event number, the elapsed time and the dead time to 0RESET:OK

v2 Settings that stay: the PWM value, the auto-calibration margin, the on/off state of the features, the buzzer and vibration settings and the Bluetooth name. Settings decided again at every startup: the signal threshold (auto-calibration) and the trigger mode (always ANALOG). The oscilloscope settings (rate limit 3, capture mode Triggered, re-arm 5) also go back to their initial values at every startup. While a command is running the detector does not count, and that time goes into the dead time (auto-calibration takes about 1 second and AUTO_PWM about 7–8 seconds). Commands are case-sensitive, and a line that is too long (more than 47 characters) is discarded. The list of all commands and the pin map are in the appendices of the measurement app's manual.

09Troubleshooting

Find the cause and the remedy from the symptom. If it does not get solved, ask a mentor on Discord.

First, find your symptom

  • The rate is too high (above 10 cnt/s)CAUSEOutside light is getting inREMEDYReinforce the light-shielding. Look for gaps in the tape.
  • The rate is too low (below 0.1 cnt/s on the plastic version)CAUSEThe threshold is too highREMEDYRestart with no light getting in (unplug and replug the USB cable).
  • ADC stays at 0CAUSEThe connector to the upper board (the SiPM board) has come looseREMEDYOpen the case and reconnect it.
  • ADC stays at the maximumCAUSENot enough light-shieldingREMEDYReinforce it with aluminum or black tape.
  • The data breaks off, or event numbers jumpCAUSEThe USB cable, or the PC went to sleepREMEDYReplug the cable. Turn off sleep.
  • The port cannot be foundREMEDYTry the checklist below, from the top.

When the port cannot be found

  1. USB cableIs it a cable that carries data, not a charge-only one? Try another cable.
  2. USB portTry plugging it into another USB port.
  3. Driver (v1 on Windows)Is the CH341 driver installed? After installing it, restart the PC (steps).
  4. BrowserAre you using Chrome or Edge? Firefox and Safari show no list of ports.
  5. Other applicationsIs the Arduino IDE's serial monitor, or another browser tab with the app open, using the port? Close it and try again.
  6. Ask a mentorTell them on Discord about the symptom and what you have tried so far.

Hardware problems

SymptomCauseRemedy
v1 Sig is 1023 and nothing is detectedThe connector between the upper and lower boards has come looseOpen the case and check; if it has come loose, reconnect it
v2 Thr is stuck at 4095 and nothing is detectedThe noise measured at startup was too large. The connector to the SiPM board may have come loose, or there may not be enough light-shieldingOpen the case, check the connector and the light-shielding, and then restart
v1 Sig is 100 or moreOutside light is getting in, or there is noiseRedo the light-shielding. Check that the board is not touching anything outside
v2 Thr is far above 100 (several hundred or more)Outside light is getting in, or there is noise (the threshold is the startup noise + 50)Redo the light-shielding and restart (the RESET button, or unplug and replug USB)
The rate is abnormally high (above 10 cnt/s)Poor light-shielding lets outside light reach the SiPMReinforce the light-shielding with aluminum tape or similar. Check that the tape has no gaps
v2 The rate is abnormally high (the light-shielding is good)The threshold (Thr or Duty) is too low. The peak-hold reset line (D8) is not working. Noise is on the comparator output (D0)Redo AUTO_THRESH or AUTO_PWM. Check the wiring and the ground on the board
The rate is extremely low (below 0.1 cnt/s on the plastic version)The threshold is too high, or the signal is weakRestart the detector (the threshold is set automatically at startup). If it does not improve, ask a mentor
The OLED shows nothingA poor I²C connection, or a faulty displayOpen the case and check the display's connector. On the v2, check in the app's "Detector features" that the OLED is on. The OLED address is 0x3C (the shipped firmware is fixed to 0x3C, and a display at 0x3D will not show anything). If it does not improve, ask a mentor
In coincidence measurement the Slave (or the receiving unit) does not respondA poor cable connection or contact. The roles are wrongCheck :Master / :Slave on the screens and replug the cable. Choose Slave again in the app.Check how OUT and IN1 are connected, and that EXT is on.
v1 The temperature is an abnormal valueA model without a temperature sensor, or a poor contactCheck the model. Leave the temperature column out of the analysis
v2 Temperature, humidity and pressure stay -- (or nan)The BME280 has not been foundCheck the I²C address (0x76 or 0x77) and the wiring (SDA = A4, SCL = A5). A BMP280 (temperature and pressure only) gives no humidity
v2 Dig1 to Dig3 stay 0 (or 1)Reading the external detectors is off, or the output voltage (3.3 V or 5 V) does not matchIn the app's "Detector features", check that reading the external detectors is on for both detectors. Check the output voltage of the external detector and whether a pull-up or pull-down is needed, against the circuit diagram
v2 Nothing appears on the serial port (Booting does not appear)The board setting, or a different baud rateCheck that the board is Arduino Nano ESP32, USB CDC On Boot is Enabled and the baud rate is 9600, then flash again. Pressing RESET while holding BOOT puts it in flashing mode
v2 Nothing is logged to the microSD cardThe card's format (it is not FAT32). The card was inserted after startup. Logging to the microSD is offInsert a card formatted as FAT32 before you power on. In the app's "Detector features", check that logging to the microSD is on (steps)

Software problems

SymptomCauseRemedy
No port is shown in the web appThe driver is not installed. A bad cable. A browser other than Chrome or EdgeOn Windows with a v1, check the driver. Try another USB port and cable. Open the app in Chrome or Edge
"Could not open the serial port" appearsAnother application is using the portClose the Arduino IDE's serial monitor and any other browser tab with the app open, then try again
v2 The detector does not appear in the Bluetooth listThe name does not match. A power or distance problem. It is connected to something elseCheck that "Detector name" in the app is the same as the detector's name (CosmicRay by default; the match is case-sensitive). Check that it is not connected to another smartphone or PC. If the link drops after connecting, the app reconnects by itself (the interval starts at 1 second and doubles, up to 30 seconds; auto-save continues in the same file)
No waveform appears when I open the oscilloscopeIn Triggered mode, the A0 baseline does not fall below the re-arm level (threshold − re-arm value). The threshold is too high. An old sketchMove the threshold line well above the baseline, and make the re-arm value smaller than the baseline's fluctuation. To just check, switch to "Free-run" (how it captures). If "Triggered" / "Free-run" has no effect, flash a sketch dated 2026-10-23 or later
I cannot find the saved fileIt went to a different download folderOpen the location from the browser's download history. Check the save location setting
Google Colab gives an errorIt is not connected to a runtime. The cells were run in the wrong orderTry "Runtime" → "Run all" at the top of the screen. If that does not help, choose "Restart runtime" and run the cells from the top in order
The data has gaps (the event numbers jump partway)An unstable USB connection. The PC went to sleepReplug the cable. For long measurements, turn off the PC's sleep setting
The data suddenly stops during a measurementThe USB cable came out. The PC went to sleepCheck the cable connection. Turn off sleep in the PC's power settings

What to tell us when you ask for help

If it does not get solved, ask a mentor on Discord (info@accel-kitchen.com also works). If you can write down the following, we can answer faster.

  • Model: v1 or v2. The shape of the box and the text shown on the detector's screen.
  • PC: the OS (Windows, macOS and so on) and the kind of browser.
  • Symptom: what happened at which step. The wording of the error or a photo of the screen.
  • What you tried: swapping the cable or the USB port, restarting, the driver and so on.
  • Data: the saved file (if you have one). Where and under what conditions you measured.

10Assembly

How to assemble the assembly kit. If you received a finished unit, you do not need to read this.

There is an assembly video (part of it is out of date): YouTube

The photos for the steps come from the original Google Doc. See also "検出器組み立て方法" (how to assemble the detector) there (in Japanese).

Before you start soldering, read "For your safety" in "02 Models and how it works". Unplug the USB cable before you reconnect any boards.

The assembly sequence

  1. Scintillatorwrap → grease → shield
  2. Displaysolder it upright
  3. Main boardlow parts first; the Arduino from the corners
  4. Join the boardsscrew them together
  5. Check with a scopeTP1 to TP3
  6. Flash and finishsketch → case
  1. Scintillatorwrap → grease → shield
  2. Sockets, etc.solder by hand
  3. Stack the boardswith spacers
  4. Nano and OLEDplug into sockets
  5. Check it worksOLED and app
  6. FirmwareArduino IDE
  7. Caseprint and assemble
The contents of the assembly kit: a black case, boards, an OLED, an Arduino Nano, pin headers, a USB cable and more, with COSMICRAY DETECTOR ASSEMBLY KIT printed on the box
An example of the contents of the (v1) assembly kit.

The scintillator and the SiPM board (v1 and v2)

Shielding tape 2 layers or more Aluminum foil shiny side in; open window Scintillator Optical grease SiPM SiPM board Spacers, 6-pin header stick out of the tape
Schematic of the stacking order (the thicknesses are not to scale. In reality the shielding tape is wound all the way round)
  1. Wrap the scintillator in aluminum foil

    Wrap the whole thing with the shinier side of the foil on the inside. Leave the middle of one face open so the SiPM can sit against it (it is a good idea to leave the opening wider than in the photo).

    Two scintillators wrapped in aluminum foil. The one on the left has a square window in the middle of one face
    Left: the side the SiPM will touch (with the window open). Right: the opposite face.
  2. Attach the connector and spacers to the SiPM board

    Solder the 6-pin connector to the board, then screw on the spacers.

    Two SiPM boards. The left shows the side with the SiPM; the right shows the side with the 6-pin connector and two spacers fitted
    Left: the side with the SiPM. Right: the side with the 6-pin connector and spacers fitted.
  3. Put optical grease on the SiPM

    Spread grease on the light-receiving surface of the SiPM and press it against the window you opened in the scintillator's wrapping.

    A scintillator with a window open next to a SiPM board. The SiPM's light-receiving surface is visible
    The scintillator with its window open (left) and the SiPM board (right).
  4. Wind the light-shielding tape

    Wind light-shielding tape all the way round to finish. Wind it so that every part has 2 layers or more. Leave the spacers and the 6-pin terminals sticking out. After winding the tape, poke holes for them with a screwdriver or similar.

    A scintillator block wound in black light-shielding tape, and a SiPM board with its spacers and terminals sticking out
    Wound in shielding tape. On the SiPM board side (right), the spacers and the 6-pin terminals stick out.

The v1 main board

The display

Solder it so that it stands vertical when seen from the side.

A hand holding the pins upright against the board, and an OLED module
Stand the pins upright against the board and solder them (left). On the right is the OLED module.

The main board

Solder it following the finished picture (the photo below).

The finished v1 main board. On a green board are fitted an Arduino Nano, a white BNC connector, a jack, an LED, a reset switch, a temperature sensor, a 2 × 3-pin socket, a 4-pin socket for the OLED and test points 1 2 3 4 5 6 7 8 9 10
  1. Arduino Nano: plug it into the board and solder it.
  2. USB port (Mini-B): the Arduino Nano's connector.
  3. LED (LED1): mind its orientation. Fit it so that it sticks out beyond the board.
  4. 3.5 mm jack: the coincidence cable that links two units plugs in here.
  5. Reset switch (RESET1)
  6. Temperature sensor (TMP36): a half-moon shape with 3 legs. Mind its orientation.
  7. BNC connector
  8. 2 × 3-pin socket (J2): the SiPM board's 6-pin connector plugs in here.
  9. 4-pin socket for the OLED
  10. Test points: TP1 to TP3 and GND1 (lined up at the lower right).

The finished main board.

  • Watch which side is the front and which the back, and the orientation of the parts.
  • Fixing parts in place with cellophane tape before soldering keeps them from shifting.
  • Mind the polarity of the LED (the + side has a round electrode, the − side a square one).

The Arduino

First, fit the Arduino so that it does not sit raised. Pins that are tilted may not go into the board, so with the Arduino plugged in, solder the 4 corners on the front and then the 4 corners on the back, checking one pin at a time that it is not tilted. Then solder the rest all together.

Side view of an Arduino Nano plugged into the board
From the side, check that the Arduino is not raised.
Top view of an Arduino Nano plugged into the board, with its pins lined up one by one
From above, check one pin at a time that none is tilted.
The back of the board, with the tips of the Arduino's pins soldered
The back of the board.

The other parts

  • Fit the low parts first.
  • Mind the orientation of the LED and the temperature sensor (the half-moon shaped part with 3 legs).

Check that it works

  1. Join the SiPM board to the main board and screw them together.
    Holding the scintillator block in a hand and connecting it to the main board
    Joining the scintillator block to the main board and screwing them together.
  2. Check the signal with an oscilloscope. Put the probe tip (the core) on TP2 and the ground clip on GND, and look at the pulses. TP1 is the raw SiPM signal, TP2 is the amplified signal and TP3 is the peak-hold signal.
    A board with red and black probe clips attached to the test points
    The red clip goes on TP2 and the black clip on GND.
    An oscilloscope screen showing a single short pulse
    An example of the pulse seen on the oscilloscope.
  3. Flash the sketch following the steps in "08 Firmware", put it in the case and you are done.
    A v1 in a magenta case, with the OLED visible through the window showing Cnt and Rate
    An example of a v1 in its case. The screen shows Cnt, Rate, Sig and Res.

The v2 readout board

Case 10 mm 17 mm Lid Scintillator wrapped SiPM board 40 × 40 mm Readout board 63 × 63 mm Nano ESP32 in the back sockets Base
How the v2 is built (a schematic side view; the thicknesses are not to scale)

The v2 board is expected to arrive with many of the small surface-mount parts already fitted. Of the parts in the bill of materials (BOM), the following ones, which are not in the assembly BOM, are soldered by hand. The contents of a kit differ between editions, so check on the board you actually received which parts are already fitted.

DesignatorPart
U3The 15-pin sockets for the Arduino Nano ESP32 (2 of them)
OLED1The 4-pin socket for the OLED
RESET1The reset switch
J1, J22 × 3-pin (6-pin) headers. They join the SiPM board and the readout board (both are 6-pin, not 3-pin)
LED1A 3 mm LED (through-hole). It is not in either of the parts lists, so check whether it is in your kit
  1. Solder the sockets

    Fit the sockets for the Nano ESP32 so that they do not sit raised. Pins that are tilted will not go in, so with the Nano ESP32 plugged in, solder the 4 corners one pin at a time and then solder the rest all together. Fit the OLED socket, the reset switch and the headers too, in the right orientation for the board.

  2. Put the boards and the scintillator together

    The readout board (63 × 63 mm) is held up by three M2 × 17 mm spacers. The SiPM board (40 × 40 mm) is held up by 10 mm spacers. For the scintillator, use the one you wrapped in the steps above.

    Join the SiPM board and the readout board with the USB cable unplugged, by pushing the 6-pin connectors (J1, J2) together, and fix them with M2 spacers and screws. Press the scintillator firmly against the SiPM and close every gap with light-shielding tape (if there is a gap, the count jumps up under fluorescent light).

  3. Fit the Nano ESP32 and the OLED

    Plug the Nano ESP32 into the sockets on the back of the board, and plug the OLED into its socket.

  4. Check that it works

    Connect it over USB and check that Cnt and Rate appear on the OLED. You can also open the measurement app and check that a waveform appears on the oscilloscope (Oscilloscope). Flash the firmware following the steps in "08 Firmware". You can do this check only if the firmware has already been written to the Nano ESP32. If nothing is displayed, flash it first.

The 3D-printed case

The v2's case is printed on a 3D printer and is assembled with the lid taken off. Its outside dimensions are 86 × 75 × 61.4 mm, and the front has a window for the OLED, a hole for the reset switch and a hole for the LED. The side has an opening for the USB cable and a rectangular opening that covers the OUT and IN1 to IN3 jacks together.

FilePurpose
cosmic-ray-detector-v2-compact-base.stlThe body and the bottom plate (1 piece)
cosmic-ray-detector-v2-compact-lid.stlThe lid, fixed with screws (1 piece)
cosmic-ray-detector-v2-compact-lightpipe.stlA part that carries the LED's light to the front. Optional; print it in a transparent material

A good starting point for printing is a 0.4 mm nozzle, 0.2 mm layers, about 4 perimeters and 20–30 % infill. Print the body and the lid in the orientation of the STL. The rectangular jack opening is a 50 mm bridge, so add support along its upper edge. To get the STL data, write to info@accel-kitchen.com.

  1. Pass three M2 × 6 mm screws up through the holes in the bottom and fix three M2 × 17 mm spacers to the floor. If you use the LED's light pipe, fit it from the inside.
  2. Point the reset switch's shaft at the hole in the front, put the readout board in, and fix it on top of the spacers with three M2 screws. Fit the SiPM board and the scintillator as in the earlier steps.
  3. Check that you can plug and unplug the USB plug, the 3.5 mm plugs and the microSD card, and that you can operate the reset switch.
  4. Line up the lid's locating rib and fix the lid with four M2 screws.

The dimensions of this case were checked against the boards and parts in the 3D model. A prototype has not yet been assembled in real life. If anything does not fit, please tell a mentor.

The scintillator model does not include the thickness of the wrapping. Check with the real, wrapped block that it fits. The lid screws go directly into the PLA (the pilot hole is 2.2 mm). The holes for the reset switch and the LED are 7.5 mm. You insert and remove the microSD card through the rectangular opening for the jacks.