Code Monkey home page Code Monkey logo

background-radiation-monitor's Introduction

Background Radiation Monitor

A simple balenaCloud application to measure and record background radiation in your area. Radiation is detected with a cheaply available board, and connected to a Raspberry Pi to provide InfluxDB for datalogging and Grafana for pretty charts.

grafana-dashboard

Hardware required

  • A Raspberry Pi (any model should be good for this, but I’d recommend a 3 or above just for performance reasons)
  • An 8GB (or larger) SD card (we recommend SanDisk Extreme Pro SD cards)
  • A power supply (PSU)
  • A radiation detector Amazon UK or AliExpress
  • Some Dupont cables/jumper jerky (you’ll need 3 female-female cables)

Hardware connection

There are 3 connections we need to make from the radiation detector board to the Raspberry Pi. They are +5V and Ground (GND) for power, and the output pulse line to detect the count. Note that this is called VIN which can be a bit confusing as this usually means ‘voltage input’ or something similar, but on this board, it’s the output.

pi-geiger-simple

In this configuration you only need to provide 5 volt power to one of the two boards; if you’re powering the Pi with a standard micro-USB power supply, that will power the detector board via the connections we’ve just made, as well.

Software setup

Running this project is as simple as deploying it to a balenaCloud application, then downloading the OS image from the dashboard and flashing your SD card.

We recommend this button as the de-facto method for deploying new apps on balenaCloud, but as an alternative, you can set this project up with the repo and balenaCLI if you choose. Get the code from this repo, and set up balenaCLI on your computer to push the code to balenaCloud and your devices. Read more.

Access the dashboard

Once the software has been deployed and downloaded to your device, the dashboard will be accessible on the local IP address of the device, or via the balenaCloud public URL feature.

public-url

background-radiation-monitor's People

Contributors

chrisys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

background-radiation-monitor's Issues

Local IP Address

typing in the local IP address does not bring up Grafana. The only way to view the dashboard is to enable the public device URL and use that.

spi.open(0, 0) FileNotFoundError

Hi,

Since I already have an environment with InfluxDB / Grafana running, I am trying to add your counter container to it. However, when I build it using the provided Dockerfile (successfully), and then run the image using Docker Compose (not Balena) with the service snippet from your docker-compose.yml file, I'm getting this error:

Traceback (most recent call last):
  File "counter.py", line 45, in <module>
    spi.open(0, 0)
FileNotFoundError: [Errno 2] No such file or directory

I'm using "standard" docker buildx to build the image via docker compose, and the HW/OS I am using is Raspberry Pi 4 / DietPi v8.18.2 ("Debian GNU/Linux 12 (bookworm)").

I separately installed the prereqs onto the barebones OS and tried to run the Python file (with sudo); same error occurs.

Any ideas on how I can fix this?

Note - when I deploy the whole thing via Balena on the same hardware, it works well, but I'd like to run it outside Balena on a RPi device that is doing some other things as well, as not to have to dedicate an entire SBC to this

Thanks!

Remote InfluxDB

Was wondering where in the code I would need to change settings to have this send the info to my remote influxDB server as opposed to writing the data on the SD card.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.