Video loading...
introduce
Current radiation monitoring is closely related to us, not only for our health and safety, but also hidden in many mysterious and fascinating scientific phenomena. Nuclear radiation refers to the release of particles or electromagnetic waves from radioactive material. It is divided into three types: alpha radiation, beta radiation, and gamma radiation.
These radiations are closely related to our daily lives, such as in medical diagnostics, energy production and food irradiation. However, they also pose certain dangers. Understanding the characteristics and safety thresholds of these exposures can help us better address potential risks.
Picked up the blank board next to him and rubbed a desktop version of the Geiger counter. Simply put, this is a counting instrument that specializes in detecting the intensity of ionizing radiation.
Typically, Geiger counters consist of an inflated sealed tube and an information display that measures the number of rays per unit of time. Below I will share in detail the various aspects of the homemade Geiger counter to help us monitor radiation values on a daily basis and add custom functions.
Hardware selection
Now let's take a look at the hardware you need to make a radiation monitor!
Bill of Materials
- Row blank plate X1
- Geiger counter module X1
- Temperature and humidity sensor X1
- U-shaped male-to-female TypeC extension cable X1
Wiring diagram
The Geiger counter module is connected to the row blank board pin 23
The DHT20 humidity and temperature sensor is connected to the empty board IIC interface
3D printed housing
3D printing shell download link: https://www.thingiverse.com/thing:6224720/files
Geiger counter principle
How do you measure radiation values?
Here is a popular science about the principle of Geiger counters.
A Geiger counter is a gas discharge detector filled with easily ionizing gas, which, when radiation enters the tube, causes the gas to ionize, resulting in a pulsed current. These pulse signals are amplified and become counting pulses. We only need to count the number of pulses per unit time to directly calculate the amount of ambient radiation. Compared with other detectors, the biggest advantage of Geiger counting tube is that it outputs digital electrical signals, and does not require complex analog circuitry to achieve accurate radiation counting. So we count how many radiation particles pass through the gas tube every minute, and we can get the degree of radiation in the current environment.
How is radiation calculated?
There are three key units: CPM, millisievert (mSv/h), and microsievert (uSv/h).
CPM (Counts Per.Minute) is a unit of measurement of radiation levels, times per minute. It represents the number of times the radiation particles received in a minute of radiation values have hit.
The radiation level can be measured by the level of the amount of radiation received per hour: (Sv/h), millisievert (mSv/h), microsiefer (uSv/h).
The conversion formula is 151CPM = 1uSv/h
1Sv/h = 1000mSv/h = 1000000uSh/h
How are radiation levels evaluated and measured?
The Basic Standards for Radiological Health Protection mention that the annual dose equivalent limit for individuals exposed to the public is: uniform irradiation of the whole body does not exceed 5 mSv; Any single tissue or organ does not exceed 50 mSv; The systemic dose equivalent limit for each year of life should not be higher than 1 mSv.
The standard value of nuclear radiation dose in the indoor environment is 0.5uSV/h, calculated according to the public annual radiation dose limit of 5mSv/h, according to the calculation method of 365*24 hours, the dose rate does not exceed 0.5uSv/h, which belongs to the normal range in this range, and the normal radiation dose rate of the general indoor environment is below 0.20uSv/h, most of which are about 0.13, but usually the radiation dose rate in the bathroom and kitchen is higher.
Program editing
Programming in python to calculate microsieverts (uSv/h)
Calculate how many pin interrupts are triggered in the unit time interval (count) to determine how many radiation particles have passed. Here, it is first set to calculate every five seconds (time_gap). The number of particles that passed in one minute (CPM) is then calculated using the number of particles that have passed in 60 seconds/5 seconds*. Since 151CPM = 1uSv/h, the value of uSv/h is finally obtained.
Load the Pin Pong library for Python control of Geiger counters
Load a GUI library to display numbers on the display.
The sensor is connected to pin P23 as a signal input.
import time
from pinpong.board import Board,Pin
Board("unihiker").begin() #初始化,选择板型(uno、leonardo、xugu)和端口号,不输入端口号则进行自动识别
from unihiker import GUI #导入包
gui=GUI() #实例化GUI类
btn = Pin(Pin.P23, Pin.IN)
Set variables and functions:
time_gap: Enter the interval between two calculations of the microschiffer (uSv/h) value
start_time: The time to start counting
count: The number of particles that passed
time_gap: The interval between calculations
uSvh: The final radiation value
Define the function zero, determine the start time of calculation and count zero.
Define the interrupt function, particle count +1 when falling interrupt.
Define get_cpm function and calculate the value of usvh.
time_gap = 0
start_time = 0
count = 0
time_gap = 5
uSvh = 0
def zero():
global start_time,count
start_time = time.time()
count = 0
def btn_falling_handler(pin):#中断事件回调函数
global count
count += 1
zero()
btn.irq(trigger=Pin.IRQ_FALLING, handler=btn_falling_handler) #设置中断模式为下降沿触发
def get_cpm():
global uSvh
if time.time() - start_time >= time_gap:
uSvh = round((count/151)*(60/time_gap),2)
print("uSvh=",uSvh)
zero()
Display display
Displays the current radiation value in 150*90 pixels and black 20 characters.
Allows get_cpm functions and updates text in the display.
dig = gui.draw_digit(x=150, y=90, text=uSvh, origin = "center",color="black",font_size=20,angle=90)#数码管字体显示
while True:
#start()
time.sleep(1) #保持程序持续运行
get_cpm()
dig.config(text=uSvh)
All code
import time
from pinpong.board import Board,Pin
Board("unihiker").begin() #初始化,选择板型(uno、leonardo、xugu)和端口号,不输入端口号则进行自动识别
from unihiker import GUI #导入包
gui=GUI() #实例化GUI类
btn = Pin(Pin.P23, Pin.IN)
time_gap = 0
start_time = 0
count = 0
time_gap = 5
uSvh = 0
def zero():
global start_time,count
start_time = time.time()
count = 0
def btn_falling_handler(pin):#中断事件回调函数
global count
count += 1
zero()
btn.irq(trigger=Pin.IRQ_FALLING, handler=btn_falling_handler) #设置中断模式为下降沿触发
def get_cpm():
global uSvh
if time.time() - start_time >= time_gap:
uSvh = round((count/151)*(60/time_gap),2)
print("uSvh=",uSvh)
zero()
dig = gui.draw_digit(x=150, y=90, text=uSvh, origin = "center",color="black",font_size=20,angle=90)#数码管字体显示
while True:
#start()
time.sleep(1) #保持程序持续运行
get_cpm()
dig.config(text=uSvh)
Display optimization
Now the radiation values are displayed, but the picture is slightly monotonous. At this time, we can try to add a temperature and humidity sensor, while displaying temperature and humidity, real-time year, month and day information, and a line chart of radiation value changes. When the radiation value exceeds 0.5uSvh, the empty board beeps and the value is displayed in red.
- Temperature and humidity sensor: DHT20
- Library for loading temperature and humidity sensors: from pinpong.libs.dfrobot_dht20 import DHT20
- The numbers are displayed horizontally with 'angle=90' after this code. tem1 = gui.draw_text(x=55, y=263, text="Temperature :", origin = "center",color="white",font_size=8,angle=90)
- Functions for drawing line segments: line1=gui.draw_line(x0=(numberMap((uSvh_list[0]), 0, 1.1, 239, 200)),y0=320,x1=(numberMap((uSvh_list[1]), 0, 1.1, 239, 200)),y1=288,width=2,color="#acacac")
- Display of year, month, day, and time: DigitalTime.config(text=time.strftime("%Y/%m/%d %H:%M"))
- The line chart always shows the latest 10 changes in the data: def numberMap(x, in_min, in_max, out_min, out_max): return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min
import time
from pinpong.board import Board,Pin
from pinpong.libs.dfrobot_dht20 import DHT20
from pinpong.extension.unihiker import *
Board("unihiker").begin() #初始化,选择板型(uno、leonardo、xugu)和端口号,不输入端口号则进行自动识别
from unihiker import GUI #导入包
gui=GUI() #实例化GUI类
btn = Pin(Pin.P23, Pin.IN)
p_dht20 = DHT20()
#global num_pulse1
time_gap = 0
start_time = 0
count = 0
time_gap = 5
uSvh = 0
def zero():
global start_time,count
start_time = time.time()
count = 0
# print('start',start_time)
def btn_falling_handler(pin):#中断事件回调函数
global count
count += 1
# print("pulse = ", count)
zero()
btn.irq(trigger=Pin.IRQ_FALLING, handler=btn_falling_handler) #设置中断模式为下降沿触发
def get_cpm():
# print("time:",time.time())
global uSvh
global dht1
global p_dht20
if time.time() - start_time >= time_gap:
print("-------------------")
print("count=",count)
uSvh = round((count/151)*(60/time_gap),2)
print("uSvh=",uSvh)
zero()
def numberMap(x, in_min, in_max, out_min, out_max):
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min
uSvh_list = [0,0,0,0,0,0,0,0,0,0,0]
bg = gui.fill_rect(x=0, y=0, w=240, h=320, width=3, color=(0, 0, 0),onclick=lambda: print("rect clicked"))
tem1 = gui.draw_text(x=55, y=263, text="Temperature :", origin = "center",color="white",font_size=8,angle=90)#数码管字体显示
tem2 = gui.draw_digit(x=95,y=240,text=(int(float(p_dht20.temp_c()))),origin = "center",color="white",font_size=33,angle=90)
tem3 = gui.draw_digit(x=105, y=190, text="°C", origin = "center",color="white",font_size=10,angle=90)#数码管字体显示
humi1 = gui.draw_text(x=57, y=140, text="Humidity :", origin = "center",color="white",font_size=8,angle=90)#数码管字体显示
humi2 = gui.draw_digit(x=95,y=100,text=(int(float(p_dht20.humidity()))),origin = "center",color="white",font_size=33,angle=90)
humi3 = gui.draw_digit(x=105, y=45, text="%rh", origin = "center",color="white",font_size=10,angle=90)#数码管字体显示
u1 = gui.draw_text(x=143, y=270, text="Radiation :", origin = "center",color="white",font_size=8,angle=90)#数码管字体显示
u2 = gui.draw_digit(x=175, y=150, text=uSvh, origin = "center",color="white",font_size=45,angle=90)#数码管字体显示
u3 = gui.draw_digit(x=190, y=45, text="uSvh", origin = "center",color="white",font_size=12,angle=90)#数码管字体显示
DigitalTime=gui.draw_digit(text=time.strftime("%Y/%m/%d %H:%M"),x=10,y=310,font_size=15, color="white",angle=90)
if (len(uSvh_list) >= 12):
uSvh_list.pop((len(uSvh_list) - 1))
print(uSvh_list)
line1=gui.draw_line(x0=(numberMap((uSvh_list[0]), 0, 1.1, 239, 200)),y0=320,x1=(numberMap((uSvh_list[1]), 0, 1.1, 239, 200)),y1=288,width=2,color="#acacac")
line2=gui.draw_line(x0=(numberMap((uSvh_list[1]), 0, 1.1, 239, 200)),y0=288,x1=(numberMap((uSvh_list[2]), 0, 1.1, 239, 200)),y1=256,width=2,color="#acacac")
line3=gui.draw_line(x0=(numberMap((uSvh_list[2]), 0, 1.1, 239, 200)),y0=256,x1=(numberMap((uSvh_list[3]), 0, 1.1, 239, 200)),y1=224,width=2,color="#acacac")
line4=gui.draw_line(x0=(numberMap((uSvh_list[3]), 0, 1.1, 239, 200)),y0=224,x1=(numberMap((uSvh_list[4]), 0, 1.1, 239, 200)),y1=192,width=2,color="#acacac")
line5=gui.draw_line(x0=(numberMap((uSvh_list[4]), 0, 1.1, 239, 200)),y0=192,x1=(numberMap((uSvh_list[5]), 0, 1.1, 239, 200)),y1=160,width=2,color="#acacac")
line6=gui.draw_line(x0=(numberMap((uSvh_list[5]), 0, 1.1, 239, 200)),y0=160,x1=(numberMap((uSvh_list[6]), 0, 1.1, 239, 200)),y1=128,width=2,color="#acacac")
line7=gui.draw_line(x0=(numberMap((uSvh_list[6]), 0, 1.1, 239, 200)),y0=128,x1=(numberMap((uSvh_list[7]), 0, 1.1, 239, 200)),y1=96,width=2,color="#acacac")
line8=gui.draw_line(x0=(numberMap((uSvh_list[7]), 0, 1.1, 239, 200)),y0=96,x1=(numberMap((uSvh_list[8]), 0, 1.1, 239, 200)),y1=64,width=2,color="#acacac")
line9=gui.draw_line(x0=(numberMap((uSvh_list[8]), 0, 1.1, 239, 200)),y0=64,x1=(numberMap((uSvh_list[9]), 0, 1.1, 239, 200)),y1=32,width=2,color="#acacac")
line10=gui.draw_line(x0=(numberMap((uSvh_list[9]), 0, 1.1, 239, 200)),y0=32,x1=(numberMap((uSvh_list[10]), 0, 1.1, 239, 200)),y1=0,width=2,color="#acacac")
while True:
#start()
time.sleep(1) #保持程序持续运行
get_cpm()
# tem1.config(text="温度:")
tem2.config(text=(int(float(p_dht20.temp_c()))))
# humi1.config(text="湿度:")
humi2.config(text=(int(float(p_dht20.humidity()))))
# u1.config(text="辐射量:")
u2.config(text=uSvh,color="white")
DigitalTime.config(text=time.strftime("%Y/%m/%d %H:%M"))
print(uSvh_list)
uSvh_list.insert(0,uSvh)
line1.config(x0=(numberMap((uSvh_list[0]), 0, 1.1, 239, 200)),y0=320,x1=(numberMap((uSvh_list[1]), 0, 1.1, 239, 200)),y1=288)
line2.config(x0=(numberMap((uSvh_list[1]), 0, 1.1, 239, 200)),y0=288,x1=(numberMap((uSvh_list[2]), 0, 1.1, 239, 200)),y1=256)
line3.config(x0=(numberMap((uSvh_list[2]), 0, 1.1, 239, 200)),y0=256,x1=(numberMap((uSvh_list[3]), 0, 1.1, 239, 200)),y1=224)
line4.config(x0=(numberMap((uSvh_list[3]), 0, 1.1, 239, 200)),y0=224,x1=(numberMap((uSvh_list[4]), 0, 1.1, 239, 200)),y1=192)
line5.config(x0=(numberMap((uSvh_list[4]), 0, 1.1, 239, 200)),y0=192,x1=(numberMap((uSvh_list[5]), 0, 1.1, 239, 200)),y1=160)
line6.config(x0=(numberMap((uSvh_list[5]), 0, 1.1, 239, 200)),y0=160,x1=(numberMap((uSvh_list[6]), 0, 1.1, 239, 200)),y1=128)
line7.config(x0=(numberMap((uSvh_list[6]), 0, 1.1, 239, 200)),y0=128,x1=(numberMap((uSvh_list[7]), 0, 1.1, 239, 200)),y1=96)
line8.config(x0=(numberMap((uSvh_list[7]), 0, 1.1, 239, 200)),y0=96,x1=(numberMap((uSvh_list[8]), 0, 1.1, 239, 200)),y1=64)
line9.config(x0=(numberMap((uSvh_list[8]), 0, 1.1, 239, 200)),y0=64,x1=(numberMap((uSvh_list[9]), 0, 1.1, 239, 200)),y1=32)
line10.config(x0=(numberMap((uSvh_list[9]), 0, 1.1, 239, 200)),y0=32,x1=(numberMap((uSvh_list[10]), 0, 1.1, 239, 200)),y1=0)
i = uSvh
if (i > 0.5):
u2.config(text=uSvh,color="red")
buzzer.pitch(466,8)
i = 0
time.sleep(1)
Using the DIY DIY desktop Geiger counter, it is very convenient to monitor the radiation level in the environment in real time. It has the advantages of simple production, easy to use, low cost, etc., through simple pulse statistics can calculate the radiation dose rate, help us understand the surrounding radiation situation in real time. At the same time, the row blank board used in the project not only has a screen that can be touched, but also can be connected to other hardware sensors. Programming directly in Python also greatly increases the flexibility of creation. Compared with general commercial testing equipment, this self-made equipment is more flexible and customizable, and we can add alarm functions, data logging functions, etc., to make radiation detection more intelligent. In short, at a time when nuclear contamination is becoming more and more known, making a desktop version of Geiger counters to make radiation monitoring within reach can not only raise awareness of radiation safety, but also be a meaningful creation.
Geiger in hand, radiation escapes!
This article was first published in: https://makelog.dfrobot.com.cn/article-313483.html
Please indicate the source information for reprinting