Setup Instructions – Beamlines for Schools Cosmic Pi

I just got a Cosmic Pi as a CERN Beamline for Schools runner up prize, what do I do now? We’ll answer all your questions here, as soon as we can! To start with you should take your Cosmic Pi out of the box, it should look like this:img_20161129_183422You should also have a small black bag that came in the box – it looks like this:


Open the bag, you should find inside a GPS antenna and a very short USB cable (A to micro-B).


You should also find an AC adapter (9V with a barrel jack) in the box.


Connect the GPS antenna first, ensure that it can ‘see’ the sky – it’s magnetic, so perhaps you can stick it to something, or sellotape it to a window, or if you’re in a wooden structure it might just work. Try to avoid coiling the cable around the Cosmic Pi setup, as this will interfere with reception.

Connect the GPS via the SMA connector. Screw it up to be finger tight.

Connect the GPS via the SMA connector. Screw it up to be finger tight.

Next connect the AC adapter, you can connect it to a nearby socket and then into the socket marked Power on the Cosmic Pi. It should light up immediately, with a short flash on both the power and event green LEDs. If it doesn’t flash, check that the plug you’re using works! After both LEDs have flashed, they will go out until the unit acquires a GPS fix. We’ll be changing the operation of the LEDs in a future firmware version so that the Power LED comes on when the unit is powered and only blinks every second when we get the timing pulse from the GPS – but we haven’t done that yet so please be patient.

Make sure you connect and power the AC adapter before connecting the USB. Otherwise you'll need to do it again!

Make sure you connect and power the AC adapter before connecting the USB. Otherwise you’ll need to do it again!

Now connect the Micro-B end of the USB cable to the Programming USB socket. You should connect the A end either to a Raspberry Pi – but don’t worry if you don’t have one, any internet connected machine running Linux can be used.


Finally, add the Micro-B USB cable to the Cosmic Pi and connect to a computer!

If you type in cat < /dev/ttyACM0 (on Ubuntu based Linux, you can find out which USB devices you have in Linux by typing “sudo lsusb -t” at the command prompt) at the terminal of your linux machine or Raspberry Pi, you should see data from the Cosmic Pi being transmitted straight away. You should set the baud rate for the connection to 9600bps. If you can’t access the USB port, you may wish to access it as superuser, or to check that you have user access permissions for the modem group. The unit might take up to 5 minutes to acquire a GPS lock, after which time the Power LED will flash at a rate of 0.5 Hz to indicate that the PPS (Pulse Per Second) signal is coming through from the GPS receiver. The event light should start to flash shortly after this, and it will flash every time there is an event (a Muon) detected. Note that the event light shouldn’t be active until a valid PPS signal has been received. It may also take a few minutes (again allow another 5 or 6) before events start to be detected. This is because the detector requires a very precise voltage to be applied to the analogue circuit board and it takes a while for our algorithm to tune the voltage, as a function of temperature and the output signal.


If you have a spare Raspberry Pi the setup is very small!

What next? When you’ve got your system up and running and both the Power and Event lights are blinking, you can start to play with the unit by analysing the data. We’re working on some nice software for users, but in the meantime our python test routines, and the Arduino source code for compilation if you want to update your device, can be downloaded here.

5 thoughts on “Setup Instructions – Beamlines for Schools Cosmic Pi

    1. Hi Andrew,
      the first batch was only for “Beamline for schools”, but we are hoping to be able to sell more in a near future. Stay tuned !

  1. First of, congrats on a great idea. Not for school but rather for personal use, the counts should be publishable to the cloud by adding the WriteKey to the Arduino code uploaded to the RPI which has WIFI. Actually, you could gather multiple site readings by telling us your WriteKey to your dashboard. Just saying.

    Please let us know when you’d be selling these, or if there’s a low cost way to build my own cosmic ray detector. Of course, if you’re going for uniform readings you may want to only let folks use your pre-calibrated black-box. Again, great idea.

  2. Hello from Lockyer Technology Centre, the Radio Astronomy Unit at Norman Lockyer Observatory in Sidmouth, Devon.

    We hold many education outreach events at the Observatory and would like to be involved with your CosmicPi Project.

    We already run various projects using Raspberry Pi, including a solar flare detector and magnetometer, so will be keen to hear when your Pi units become available. Good luck with CosmicPi.

Leave a Reply

Your email address will not be published. Required fields are marked *