A Raspberry Pi cosmic ray detector from folk at CERN

A group of people from CERN is using their spare time to build Cosmic Pi, a cosmic ray detector based on a Raspberry Pi. Their goal is to crowdsource the world’s largest cosmic ray telescope by getting the devices into the hands of people and organisations around the globe, collecting data that will help astrophysicists understand more about these rays, several of which have passed through your body in the time it has taken you to read this paragraph. A video the team made last year explains the idea nicely:

You can take a look at details of the team’s current Cosmic Pi prototype hardware and software, all available online. The cosmic-ray-detecting part consists of a scintillator, made of a material that absorbs energy from cosmic rays passing through it and then emits some of that energy in the form of photons; an optic fibre to trap these photons and carry them to the edges of the scintillator material; and a silicon photomultiplier at each end of the fibre to convert this light into an electrical signal that can be analysed by the computer. A blog post from the end of last year has more detail about the prototyping process and the current design.


Because atmospheric conditions influence the flux of cosmic rays at the Earth’s surface, the team decided that it would be worthwhile including temperature, pressure and humidity sensors to monitor the weather. They also added a GPS module to allow devices to log their location (allowing altitude, another factor influencing flux, to be recorded too), and an accelerometer and magnetometer to provide additional information about the device’s orientation and position. Currently, an Arduino Due microcontroller reads the sensor data and passes them to the Raspberry Pi, which pre-processes and stores them; the Cosmic Pi team is prototyping a HAT to combine as many components as possible in a single PCB.

Cosmic Pi HAT prototype and Raspberry Pi, with banana

Cosmic Pi HAT prototype and Raspberry Pi, with banana for scale. Photo by James Devine.

You can sign up to get notified when Cosmic Pi launches, which the team hope will happen with a Kickstarter campaign later in 2016, and they also intend to publish the design under an open source licence. They’re aiming to keep the cost of the whole package under $500, or about £350. While this is likely to be a bit steep for some individuals, we’d love to see organisations and groups like hackspaces using devices like this to contribute to what could be an amazingly valuable citizen science project. Keep an eye on the Cosmic Pi blog for updates!


EverPi avatar

WoW, that was impressive.

Tzj avatar

Bet this becomes the next pi project in space.

fss avatar

Could this board also be used for background radiation detection and quantification?

Steve Richards avatar

The price is steep though.
I could see this working if local communities became involved with schools to help raise the cash.
It’s an incredibly exciting sounding project and I can think of a score of talented young people straight away who will think so and want to work on this too.

Milo avatar

Back in 1973 as a physics major, I built a detector using two Geiger tubes to detect coincident pulses as a function of azimuthal angle of the tubes. Back then the only computer available to collect data was a DEC PDP8 and programming using Fortran so I ended up building a BCD counter using TTL components to count pulses. My how things have changed (for the better!).

Davep avatar

Could this be used for a proper random number generator?

Iain Kay avatar

What a brilliant thought you have there DaveP!
I guess we would have to obtain one, start reading the data from the sensors and see how predictable it really is.
We may see quite some patterns but if we performed some form of calculation on them based on temperature, location, accelerometer, etc, we could probably get closer to a true RNG.

Davep avatar

I look forward to more information on this! I’ve joined the cosmic-pi mailing list if that’s where you would post such information.

JMHC avatar

Have a look at this http://noosphere.princeton.edu/reg.html

I ran one for several years for the project. A Pi zero with a suitable REGularHat might be interesting?

Davep avatar

That’s really interesting, thanks.

Bill McConnaughey avatar

Is is feasible to design this so that the silicon PMs can get input from another source, such as a fluorescence microscope? That would make it a far more versatile instrument. At $500 this could help get more people involved.
Due to low frequency of cosmic ray events maybe you are not including a high-capacity counter, but for other applications this could be a good idea.
What are the particle types and energies that the scintillator can detect?
Regarding random number generation, that’s difficult because you don’t know exactly how to scale the count rate. As noted in the blog, the expected count rate depends on atmospheric conditions and altitude, and I suppose time of day because of non-uniform distribution of cosmic ray sources.

Andras avatar

There is no need to have a Rapsberry Pi for this project, the processor in the Arduino (the Atmega) is more than enough for this task, the problem is the lazy attitude of the people who program this thing in Arduino language rather than C. With some effort, programming better can alone bring down the cost significantly. I teach embedded systems at a Uni and I see the incredible laziness that programmers are capable of. They’d rather spend a few hundreds more on hardware than write a good code once.

Rex Roper avatar

On programming laziness, in general, I do agree. My very first computer war the Timex Sinclair ZX-81 (U.S. version). Writing code to fit into the 2KB that was standard on ZX-81 drove the point home for me. It is better to write ‘tight’ code in the interest of economics and performance…in my humble opinion.

Comments are closed