Introducing OpenRad, a simple radiation monitoring solution powered by the SBM-20 GM tube and TTGO ESP32 microcontroller. this project offers a user-friendly approach to tracking and measuring radiation levels.
- Install VSCode.
- Install PlatformIO.
- Clone this repository
git clone https://github.com/omarkhorshid/OpenRad.git
- (optional) Install Squareline Studio.
- (optional) For Squareline, Change the project settings save paths to match your project directory.
- In PlatformIO extension: Platform > Upload the Filesystem Image.
- In PlatformIO extension: General > Upload the code to the TTGO board.
- lvgl v8.3.11
- TFT_eSPI v2.4.61
- AsyncTCP-esphome v1.2.2
- ESPAsyncWebServer-esphome v2.1.0
- PubSubClient v2.8
- ArduinoJson v7.0.4
hardware.cpp/h
: Contains hardware init and functions.settings.cpp/h
: Contains the settings.geiger.cpp/h
: Contains geiger calculations.gui.cpp/h
: Contains LVGL functions.connectivity.cpp/h
: Contains all the connectivity functions.
ui_events.c/h
: Contains the UI events.
index.html
: Contains the web interface.chart.js
: Chart.js Library file.
Using the three buttons, up down and enter. ...
After uploading the code to the ESP, open the settings cogwheel, and change the settings you want.
- For Sleep mode: Navigate to the power button and click it.
- For Deep Sleep mode: Hold the button untill this message pops up, then release it before it disappears.
OpenRad has WiFi and MQTT connectivity to be able to remotely monitor the radiation levels from the Web interface.
To connect to OpenRad and access the web interface:
If not connected to a Wifi network:
- Enable Wifi from the on device settings
- Enable "Wi-Fi Access Point"
- Connect to the device's AP using the password on screen
- Navigate to "http://192.168.4.1" or use the "Manage Router" option on your phone
If Connected:
- From a device on the same network navigate to the IP address showing on the device screen in the Connectivity settings
- Window Size: Number of samples used to calculate the average radiation intensity.
- Bigger values help the device give a more stable reading and theoretically increse its precision, but it will react slowler to changes.
- Smaller values help the device react faster to changes, but the readings might fluctuate more and theoretically decrease the precision.
- Sampling Period: This is how often the device takes a reading (e.g., every N milliseconds).
- Bigger values make the device take readings less frequently, reducing energy consumption during sleep, but the device will react slower to changes.
- Smaller values make the device take readings more often, making it quicker to detect changes, but the readings may be less precise and the device consumes more power during sleep (If sleep sampling is enabled).
OpenRad is BSD-3 Licensed