An Update From Us
An update from the world of Cosmic Pi!
What have we been up to for the last little while? Apart from avoiding Covid-19 as best as we can, it’s been time to finally get our database and dashboard online!
The new dashboard, shipping on all 2021 units. If you already have a cosmic pi it can be upgraded!
We’ve revised the software that runs on the Cosmic Pi unit’s Raspberry Pi Zero. Using the latest version of Raspberry Pi OS (formerly Raspbian), we benefit from a number of security and performance updates due to improvements in the Linux kernel. From a user perspective, this translates to having less to worry about and getting more performance from the same hardware. The biggest change is that there is now a compelling reason to leave your Cosmic Pi detector turned on and plugged in!
- A map showing all online cosmic pi detectors
- Global count of all muon detections
- Easy to export and analyse data from your unit and the whole network
We will soon be organising a webinar explaining how the dashboard is put together and how you can build your own visualisations. You can follow us on Facebook or subscribe to our YouTube Channel to stay informed. The best part is that it is now really easy to share your cosmic rays with the world and to analyse your data via the web! Check out our new data portal on http://cosmicpidata.mooo.com where, at the time of writing, we’ve logged more than 3 million muons already. The architecture used on each cosmic pi unit (Python scripting + InfluxDB + Grafana) is the same as that used on the server, with an MQTT protocol link. This means that you can easily develop and share dashboards (visual data analytics, based on InfluxDB queries that come out as numbers of plots), between Cosmic Pi units, and have them shared on our data portal. If you can’t wait to look under the hood, check out our code repositories on GitHub now.
The data portal. Connect your unit to the internet to see it appear on our map!
It also makes all the data accessible to everyone via the internet. From our data portal, you can click on “Inspect -> Data” for any of the panels to export the raw data underneath into a CSV or Excel file for local analysis. There are some limits on the query size, so you can’t all download all 3 million cosmic rays at once (as this would stall the server!), but this shouldn’t be an issue for most analysis.
The main innovations for the onboard software are:
- Simple wi-fi hotspot or network configuration (no more dual hotspots, it was too unstable)
- A new on-device database, using InfluxDB
- A new on-device dashboard, using Grafana
- Modified MQTT parameters, with password protection for server access
What can I do with this system?
We have massively simplified the architecture that makes a Cosmic Pi run. We now use a single python script to read data in from the detector circuit board, store it in the local database and share it online via the MQTT protocol. This means increased reliability for the single core CPU in the Raspberry Pi Zero, and the system overall.
InfluxDB is a dedicated time series database, designed to be efficient in storing large quantities of data. It runs well on the Raspberry Pi Zero and integrates with Grafana, our chosen visualisation platform. With the admin credentials for Grafana, you can build your own visualisations, to look at the relationships between different parameters collected by your detector. Here are some examples from the global data portal.
Altitude vs Frequency for a static detector - as you would expect there is no relationship!
Cosmic ray frequency vs Air pressure over a 7 day period.
What about confidential data and my identity?
Only the unique identifier of your unit, GPS location and data you collect is shared via our platform, there is no personal identifying information stored or transmitted. You can even observe the flow of data directly on your smartphone with an MQTT client.
What does this mean for you if you have already have a Cosmic Pi?
If you turn it on occasionally, then not much will change. You can update your SD card following the instructions at the bottom of this article. This update is backwards compatible with all our old units from V1.5.
You can find instructions on how to re-image your SD card here.