Giter Club home page Giter Club logo

background-radiation-monitor's Introduction

Background Radiation Monitor to MQTT

Measures background radiation and sends CPM (clicks per minute) and µSv/h (micro Sieverts per hour) values to MQTT

Sample usage

To access RaspberryPi GPIO from the container, we need to share the gpiomem device and run the container in privileged mode:

# docker-compose.yml

version: '3'

services:
  radiation-counter:
    image: valentas/background-radiation-monitor:latest
    devices:
      - /dev/gpiomem
    privileged: true
    environment:
      - TUBE_USVH_RATIO=0.00812037037037 # (default) This is for the J305 tube
      - GPIO_PORT=7 # (default) The GPIO port used with the Geiger counter
      - MQTT_HOST=mosquitto # (required) MQTT host
      - MQTT_PORT=1883 # (default) MQTT port
      - MQTT_USER=user # (required) MQTT user
      - MQTT_PASS=pass # (required) MQTT password
      - MQTT_TOPIC_PREFIX=home # (required) prefix for MQTT topics

Two topics will be sent to MQTT every second:

  • {MQTT_TOPIC_PREFIX}/radiation/cpm - Clicks per minute value
  • {MQTT_TOPIC_PREFIX}/radiation/usvh - Micro Sieverts per hour value

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.

background-radiation-monitor's People

Contributors

chrisys avatar

Watchers

James Cloos avatar

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.