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"

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;

//Initial rad value for calibration
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) {
    ldrValue = analogRead(ldrPin);
    
    // set the minimum radiation value for LDR
    if (ldrValue < ldrMin) {
      ldrMin = ldrValue;
    }    
  }
}

void loop() {
int ldrStatus2;
int ldrbegin2;
int ldrStatus = analogRead(ldrPin);

//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 ){
  Serial.println("No radiation?");
  ldrStatus2 =1;}


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


if (ldrStatus2 >0){
  Status = "Radiation OK";
  digitalWrite(8,HIGH);
  }
if (ldrStatus2 >1){
  Status = "Radiation OK";
    digitalWrite(9,HIGH);
  }
if (ldrStatus2 >2){
  Status = "Radiation Medium";
    digitalWrite(10,HIGH);
  }
if (ldrStatus2 >3){
  Status = "Radiation Medium";
    digitalWrite(11,HIGH);
  }
if (ldrStatus2 >4){
  Status = "Radiation High";
    digitalWrite(12,HIGH);
  }
if (ldrStatus2 >5){
  Status = "Radiation Killing";
    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?
  • Ground and 5V port in correct position in breadborad?
  • All resistors are correctly plugged in?
  • Reupload the code to your Arduino.

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:

  • Radiation Oké
  • Radiation Medium
  • Radiation High
  • Radiation Killing

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.