# X-ray Dose Detector - TfCD

1,420

10

2

## Introduction: X-ray Dose Detector - TfCD

X-ray radiation is a type of gamma radiation consisting of high energy photons in the range of 10 to 100 keV. Just like visible light it can interact with electronics through several ways. One of which is the photoelectric effect. Therefore a wave of x-ray photons can be identified using an advanced version of the broadly available photoresistor technology. This version of the photoresistor consists of a Cadmium Sulphide semiconductor and is capable of operating within the range of x-ray mentioned above.

Just like an ordinary photoresistor, the high energy x-ray photons excite the electrons on the semiconductor enough to jump from one end of the resistor to the other, creating a current.

Knowing about radiation dose will ensure you to step away from the source in order to protect yourself, because the inverse sqaure law is valid. "Doubeling the distance from the source will drop dose by four"

### Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

## Step 1: Prototyping Circuit

The following layout was used to make the prototype in order to simulate the radiation dose intensity detector. The prototype consists of 1x Arduino Uno, Arduino wires, 6x white LEDs, 1x LDR, 6x 100 ohm resistors and 1x 10k ohm resistor.

## Step 2: Coding and Testing the Setup

Upload the following code after building the circuit to test your prototpe:

```//Credits to Tom and Fehmihan

//Define all pins with LEDs
const int ledPin6 = 13;
const int ledPin5 = 12;
const int ledPin4 = 11;
const int ledPin3 = 10;
const int ledPin2 = 9;
const int ledPin1 = 8;

//Incoming signal of the LDR
const int ldrPin = A5;

int ldrValue = 0;
int ldrMin = 1023;

void setup() {

Serial.begin(9600);

pinMode(ledPin6, OUTPUT);
pinMode(ledPin5, OUTPUT);
pinMode(ledPin4, OUTPUT);
pinMode(ledPin3, OUTPUT);
pinMode(ledPin2, OUTPUT);
pinMode(ledPin1, OUTPUT);

//Calibration to set normal Radiation level in the room
while (millis() < 2000) {

// set the minimum radiation value for LDR
if (ldrValue < ldrMin) {
ldrMin = ldrValue;
}
}
}

void loop() {
int ldrStatus2;
int ldrbegin2;

//turn of all leds on pin 8 to 13 on begin of cycle
for (int i=8; i <= 13; i++){
digitalWrite(i, LOW);
}

String Status;
//map values on scale 1 to 6 (as leds) with calibration value as the lowest
//1023 is hard to reach therefore 975
ldrStatus2 = map(ldrStatus, ldrMin, 975, 1, 6);

//If value does exceed 950 then give level 6
if(ldrStatus >975 ){
ldrStatus2 =6;}

//If value drops below treshold of the initial radiation
if(ldrStatus2 <1 ){
ldrStatus2 =1;}

//Checks the value and turns on correct LED level;

if (ldrStatus2 >0){
digitalWrite(8,HIGH);
}
if (ldrStatus2 >1){
digitalWrite(9,HIGH);
}
if (ldrStatus2 >2){
digitalWrite(10,HIGH);
}
if (ldrStatus2 >3){
digitalWrite(11,HIGH);
}
if (ldrStatus2 >4){
digitalWrite(12,HIGH);
}
if (ldrStatus2 >5){
digitalWrite(13,HIGH);
}

//Prints status to console
Serial.println(Status);
delay(100);
}```

Troubleshooting:

• Did you build the circuit correctly?
• No leds placed the wrong way around?
• All resistors are correctly plugged in?

## Step 3: Build Casing

Using some simple materials you can build a nice casing around your detector (we used some leftover hard wood). In order to add an extra functionality to give feedback about the amount of x-ray it is exposed to, a color coded layer is added on top of the leds.

This device will ensure feedback about exposure dose to x-ray by:

1. Volumetric feedback
• Bar filling up
2. Color coded feedback
• Green = Oké
• Orange = Medium
• Red = Killing

## Step 4: Congratz! Final Results

Conratz, this the last step, it should be working now!

Get a light source close to the LDR sensor and see how the LEDs start shining bright and fill up the bar when lights gets intesified!

Several threshold coded will provide textual feedback on the serial monitor with words such as:

To recalibrate for a darker room, you can place the device there and press the reset button on the Arduino. It will then automatically adjust to the new threshold light (radiation) levels.

213 28K
174 14K
112 10K

## 2 Discussions

Does this sensor gets triggered only by X-Ray and Gamma rays, or by visible light as well? Is it as accurate as an STS-5 geiger tube?

That's a neat setup :)