Close

Step 8. Tesla Coil & UV Lamp

A project log for UV Sanitizing Autonomous Robot

Cost-effective robotic solution for surface sanitization in home

Guillermo Perez GuillenGuillermo Perez Guillen 08/25/2021 at 19:000 Comments

Tesla Coil

A Tesla coil is an electrical resonant transformer circuit designed by inventor Nikola Tesla in 1891. It is used to produce high-voltage, low-current, high frequency alternating-current electricity. Tesla experimented with a number of different configurations consisting of two, or sometimes three, coupled resonant electric circuits. Tesla used these circuits to conduct innovative experiments in electrical lighting, phosphorescence, X-ray generation, high frequency alternating current phenomena, electrotherapy, and the transmission of electrical energy without wires. Reference: https://en.wikipedia.org/wiki/Tesla_coil

Tesla coil closeup

                               Tesla coil close-up

In this project I'm using this principle to transmit electrical energy to the UV lamp by means of a Tesla mini coil. Thanks to this great invention I have the following advantages:

Where can I get this device? Example: https://www.elecrow.com/mini-diy-tesla-coil-kit.html

Mini DIY Tesla Coil

                               Mini DIY Tesla Coil

UV Lamp

I'm using a UV lamp. UV light helps detect the records and watermarks that are included in bills and important documents. This lamp has a power of 6 watts and a life time of approximately 8000 hours.

UV lamp

                               UV lamp

Assembling Tesla coil and UV lamp, recommendations:

UV Meter

The World Health Organization publishes a practical guide on the UV index in which it explains the health risks of ultraviolet radiation and proposes some protective measures depending on their intensity.

UV index

                               UV index

This is optional; to measure UV radiation I've developed this device, and using the UVM30A sensor. I show you the electrical diagram in the figure below:

UV Meter

                               UV Meter

Code: uv-meter.ino

//AUTHOR: GUILLERMO PEREZ GUILLEN

#include <MCUFRIEND_kbv.h>
MCUFRIEND_kbv tft;      
#include <TouchScreen.h>

int16_t BOXSIZE;
uint16_t ID, currentcolor;
uint8_t Orientation = 0;    //PORTRAIT
String UVIndex = "0";
String Index = " ";  

// Assign human-readable names to some common 16-bit color values:
#define BLACK   0x0000
#define BLUE    0x001F
#define RED     0xF800
#define GREEN   0x07E0
#define CYAN    0x07FF
#define MAGENTA 0xF81F
#define YELLOW  0xFFE0
#define WHITE   0xFFFF

void setup()
{
    while (!Serial);
  Serial.begin(57600);
   
    uint16_t tmp;
    tft.reset();
    ID = tft.readID();
    tft.begin(ID);
    tft.setRotation(Orientation);
    tft.fillScreen(BLACK);
}
 
void loop()
{
  float sensorVoltage;
  float sensorValue;

  sensorValue = analogRead(A8);
  sensorVoltage = (sensorValue * (5.0 / 1023.0))*1000;  //Voltage in miliVolts

////////////////////////// UV Index

  if(sensorVoltage<50.0)
  {
    UVIndex = "0";
    Index = "LOW";
  }
  else if (sensorVoltage>=50.0 && sensorVoltage<227.0)
  {
    UVIndex = "0";
    Index = "LOW";
  }
  else if (sensorVoltage>=227 && sensorVoltage<318)
  {
    UVIndex = "1";
    Index = "LOW";    
  }
  else if (sensorVoltage>=318 && sensorVoltage<408)
  {
    UVIndex = "2";
    Index = "LOW";    
  }else if (sensorVoltage>=408 && sensorVoltage<503)
  {
    UVIndex = "3";
    Index = "MEDIUM";    
  }
  else if (sensorVoltage>=503 && sensorVoltage<606)
  {
    UVIndex = "4";
    Index = "MEDIUM";    
  }else if (sensorVoltage>=606 && sensorVoltage<696)
  {
    UVIndex = "5";
    Index = "MEDIUM";    
  }else if (sensorVoltage>=696 && sensorVoltage<795)
  {
    UVIndex = "6";
    Index = "HIGH";    
  }else if (sensorVoltage>=795 && sensorVoltage<881)
  {
    UVIndex = "7";
    Index = "HIGH";    
  }
  else if (sensorVoltage>=881 && sensorVoltage<976)
  {
    UVIndex = "8";
    Index = "VERY HIGH";    
  }
  else if (sensorVoltage>=976 && sensorVoltage<1079)
  {
    UVIndex = "9";
    Index = "VERY HIGH";    
  }
  else if (sensorVoltage>=1079 && sensorVoltage<1170)
  {
    UVIndex = "10";
    Index = "VERY HIGH";    
  }
  else if (sensorVoltage>=1170)
  {
    UVIndex = "11";
    Index = "THE HIGHEST";    // EXTREMELY HIGHEST
  }
  
/////////////////////////////////////
    
  Serial.print("sensor reading = ");
  Serial.print(sensorValue);
  Serial.println("");
  Serial.print("sensor voltage = ");
  Serial.print(sensorVoltage);
  Serial.println(" V");
  Serial.print("UV Index = ");
  Serial.print(UVIndex);

   tft.setCursor(0, 5);
   tft.setTextSize(3);   
   tft.setTextColor(MAGENTA, BLACK);   
   tft.println("  UV METER");
   tft.println(" ");   
   tft.setTextColor(YELLOW, BLACK);
   tft.println("mV: " + String(sensorVoltage) + "  ");
   tft.println(" ");
   tft.println("UVIndex: " + String(UVIndex) + " ");  
   tft.setTextColor(WHITE, BLACK);
   tft.println(" ");      
   tft.println(String(Index) + "     ");       
   delay(1000);
}

Discussions