Arduino Geiger Counter With Designed App in Python
by Dima_Panasenko in Circuits > Gadgets
464 Views, 3 Favorites, 0 Comments
Arduino Geiger Counter With Designed App in Python
Detector of radioactivity designed on Arduino base, which has possibilities to interact with Python kivy App
Intro.
Firstly a good idea would be to start from what radiation and radioactivity is.
Radioactivity is a well-known phenomenon in the world. It does not mean nuclear weapons. It means a lot of materials in the world can radiate rays with different wave length in visible and non visible wave diapason. It is very widespread in our lives: microwaves in kitchen, mobile, space gamma rays, natural radiation of limestone and other minerals which contain impurities of rare earth elements from Mendeleev table, for instance Uranium and its compounds, element's isotopes (atoms of that same chemical element, but with different atomic weight) are usually radioactive.
On the example of Uranium atom we can observe radiation effect. With a small portion of external energy (heat, mechanical impact, ultrasonic) we can evoke its decay to parts. Pieces of uranium atoms are electrons, protons, nuclei of helium, all of them can fly with high speed/energy and ionize other atoms, molecules in a stable state around. It means encountering with other molecules on its way particles either can hit out electrons from outer electron layer, as result, we going to have positive charged molecule (with out electron), free travel electron, gamma rays with some frequency, or crack atom/molecule into 2 pieces. It is an effect of irradiation. Our body can be damaged if we will be in contact with radioactive materials for some period of time.
Supplies
Arduino Mega 2560
ESP 8266 Node mcu
dht 11 temperature sensor
hc 05 bluetooth module
Arduino geiger counter kit
Neo6v2 gps sensor
Arduino Geiger Counter Kit
Couple words about Arduino Geiger counter kit. Main part is Geiger-Muller tube. Usually it is glass or metal cylinder which is filled up with inert gas: Argon, Neon, cathode and anode are applied to it. There is a thread inside the tube along as anode, if body of tube is metal one - it takes part as cathode, or applied to the ends.
Any way, above 300 - 400v potential should be applied to it. When high energy particle cross a tube with neon gas inside, it ionizes atoms and we have got a mixture of positive/negative particles. In the high energy electromagnetic field in the tube is being evoked avalanche of charged particles. So 1 hit particle means 1 movement (actually spark) to the cathode direction.
Our microcontroller in Arduino Geiger kit treat signal into digital one, and we read it off on the vin pin.
ESP8266 Node Mcu
Main idea of this project was to write App, which could provide us with possibilities to depict radioactivity in graphically pleasant view. To achieve it I had to connect Arduino Geiger counter to Arduino board, treat information, pass and store data on cloud service. App has direct connection with Arduino via com ports USB or Bluetooth via hc-05 module. Also can get access via internet to our cloud to take stored data and treat it.
So, first worked project I decided to design with ESP8266 node mcu and arduino geiger kit.
Actually it was not very difficult, but I had encountered with some troubles and esp8266 particularity.
Mark it, pins on it are ordered in different way comparing with traditional Arduino boards. And not all pins are free and can treat information as we suppose.
Big disadvantage is that it has only 1 UART. If you think about diagram signs like rx1/tx1 so it does not work as you think. So if you planing to build some bigger project with lot of sensors keep it in mind
RadioScan App
So I have written a frame of app in python kivy framework.
it is quite ease library to create cross platform application. Lots of python libraries allow us to run processes in different ways as we wish. You can combine everything.
I have used such libraries as kivy-garden, mathplotlib, pandas, pyserial and re. Main feature is to depict real time data
and get stored information from cloud. I set hardware part to pass data to web server, which posts data into web page on PHP server.
So, the App consist from 3 screens: graphic screen with momental information, which we get from Arduino board with pyserial library.
Second is actually that same, but with another view. We have real time plotting with appeared bar columns. As higher bars are, as intensive radiation is.
3d window give as possibilities to extract data from web cloud, choose date and observe measurements on that particular period.
Hardware Circuit
About hardware. I have connected esp8266 to the Arduino Geiger kit, Bluetooth module hc 05 and dht 11. It was not so smoothly as it seams in the first view. I had troubles with pins. As I understood after, pins are in other order and not all of them work digital input and with interrupt events. So explore esp8266 pin out in detail before working with that.
Hardware Circuit for Extended Project
A little bit later I decided to extent this project and add GPS sensor. An idea was to provide possibilities to write down a GPS data in to our database. Having opportunities to embed map into kivy app we can create screen where would be possible to see our device location.
So main board was chosen Arduino Mega 2560. It has 4 UARTs and I am totally satisfied with it.
The problem I have encountered with was choosing of WIFI shield. If esp8266 node mcu particularity was an availability of embedded WIFI module, Arduino Mega does not have it.
The first choice was to esp 01. Actually it is great board, but I mess up with its settings and did wrong action: flashed couple times and something went wrong, maybe I supplied 5v instead of 3v.
I read a little bit about communication between boards and figured out. We can use I2C protocol with wire.h library and connect esp 8266 node mcu, set it as master, which has access to internet via wifi and to our web storage.
Arduino mega 2560 is set as slave. Its task to read off data from sensors: dht11, arduino geiger kit, gps neo6v2 and pass it to master.
RadioScan 2.0
The App view basically is that same, except of adding of map screen. To do it, we have to use garden map view library.
Generally, I am very happy to having it done. It was my first project, I expected, it could work worse than it is. Of course, not so perfect as it could be, I but I gonna work on improvements
Source Code
It is great educational scientific project and obviously, it can't be used as serious Radiation detector. I have plans to extent it more having added some interesting features. I will show you later.
Thanks for you time you spend reading this article:)
if you need source code of this project, you can get it with this link on my github page:
https://github.com/techmadman/RadioScan-2.0