Software for the Muon Hunter project
C Python C++ Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
images Delete run-59-muon-140.jpg Jun 4, 2016


Software for the Muon Hunter project

Licence: GPL v.3

The RPi Makefile and the MV_bmp085 code uses wiringPi as a library issued under (LGPL v.3) see COPYING.LESSER in the src_BMP180 directory for the wiringPi licence.

This work is licenced under GPL v.3 as per this information:

RPi python and C++ datalogging software version history:


  • python based event handling
  • parallel threads for each signal
  • objects for each sensor created
  • I2C BMP180 (BMP085 codebase) driver added


  • sqlite capability added TODO: fix RPi bug GM2 and Muon signal


  • I2C based datalogging for the GM signals, too
  • AVR records coincidences
  • python event handling removed due to lack of accuracy when counting coincidences
  • UI program revised
  • main datalogging script added
  • database to csv export script added


  • Camera and image sorting added


Live mode

sudo python <number of seconds>

Daemon / background task mode

  • Over SSH: nohup sudo python <number of seconds> >/dev/null 2>&1 &
  • Console: sudo python <number of seconds> >/dev/null 2>&1 &

Data is written into muonhunter.db every 1s. This is an sqlite database. The writing frequency can be changed in

Export data into spreadsheet

AVR firmware version history:


  • GM & Muon rolling averages implented.
  • LCD display
  • Buzzer and LED features.


  • GM totals / GM plateauing capability added.
  • Lightbug fixed.
  • GM counting precision improved


  • I2C communcation in slave mode by reusing code by g4lvanix the slave code IS MODIFIED from the original
  • LED flash problem fixed.
  • cleaned I2C data

Usage in python (should you wish to write your own client program):

sudo python

import smbus

bus = smbus.SMBus(1)

bus.read_i2c_block_data(0x19, 0)

Example dataset:

[51, 9, 0, 68, 1, 0, 0, 63, 1, 0, 0, 38, 0, 1, 13, 0, 0, 25, 0, 0, 10, 11, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0]

read as follows from left to right:

  • Device [51,
  • Muon total LSB, MSB values 9, 0
  • GM1 total XXLSB, XLSB, LSB, MSB values 68, 1, 0, 0
  • GM2 total XXLSB, XLSB, LSB, MSB values 63, 1, 0, 0,
  • Muon per hour LSB, MSB, extrapolation flag values 38, 0, 1,
  • GM1 per min LSB, MSB, extrapolation flag values 13, 0, 0,
  • GM2 per min LSB, MSB, extrapolation flag values 25, 0, 0,
  • Detector serial number: 10
  • Detector time (sent in opposite order) SS:MM:HH:DD meaning 0d 00:14:11

Extrapolation means that the base time period hasn't elapsed yet since the beginning of datalogging so the detector extrapolates the data for the base time period based on current observations. This is indicated on the LCD by displaying a '*' next to the number. Otherwise it displays a rolling average based on the last base time period.

EG. 38, 0, 1, means in the muon data that 1 hour hasn't elapsed since datalogging, so given the current rate of muon detections the code's best guess is 38 for the hourly number of muons provided the rate doesn't change. This number is based on 9 observations as you can see from the total number of muons that you should treat accordingly. So the extrapolation flag is just an indication that you should use these numbers carefully. (The base period for GM hits is 1 min.)


  • TODO: timer compensation for I2C transmit times
  • TODO: implement second mode including buffers


  • Sylvain Bissonette, Louis Frigon & Fandi Gunawan for the pcd8544 LCD driver code (GPL v.3)
  • g4lvanix - for the I2C slave library - this code is modified from the original (public domain)
  • the RPi Makefile and the MV_bmp085 code uses wiringPi as a library - see