Project Report EMF DETECTOR Adarsh Kumar (120260013) Yashwanth Sandupatla (120260022) Vishesh Arya (120260001) Indian Institute of Technology Bombay 1
Abstract Deflection instruments like voltmeters and ammeters, such as moving coil, the magnetic vane, electrodynamometer, hot wire and electrostatic instruments cannot be read with a high accuracy due to some disturbing influences. One such example is stray EMF in the vicinity of our experimental setup. We ve made an EMF detector which can detect stray EMF and we can choose suitable location for our experiment accordingly. 2
Acknowledgement The efforts we ve made in this project would not have been possible without the kind support and help of many individuals. We would like to extend our sincere thanks to all of them. We are highly indebted to Mr. Nitin Pawar and Prof. Pradeep Sarin for their guidance and constant supervision as well as for providing necessary information regarding the project and also for their support in completing the project. We would like to express our gratitude towards our parents and friends for their kind co-operation, encouragement and giving us such attention and time which helped us in completion of this project. 3
Contents 1. Introduction and operation Page 5 2. Algorithm Page 6 3. Arduino Code Page 7-15 4. Circuit Diagram Page 16 5. Snapshots EMF Detector Page 17 6. Problems Faced Page 18 7. Scope Page 19 4
INTRODUCTION Our purpose is to build an EMF detector which can detect stray EMF in our vicinity so that we can apply that knowledge to carefully choose the environment for experimental setups concerned with accuracy of deflection instruments. We ve used LEDs/7-segment LED display, resistors, solid core wire (antennae) and Arduino. Operation of the detector: Changes in electric fields induce a potential in the antenna wire, which is then read by the Arduino. A code is written which makes LEDs glow whenever Arduino gets any reading of stray EMF in the vicinity. The function the 3.3 megohm resistor is changing the sensitivity of the device. In our charge detector, the antenna picks up a charge from a nearby object and the 3.3 meg-ohm resistor controls how quickly the charge will dissipate to ground, and therefore how sensitive the circuit is to external E-fields. 5
ALGORITHM Important Variables: Steps: 1. Sense limit - Variable to control Sensitivity 2. NUMREADINGS - Variable to increase data smoothing 3. val - stores the analog input 4. readings[numreadings] - Array to store readings for smoothing 1. First all the elements are initialized to 0 in the readings array. 2. Then analog input from probe pin 5 is is stored in val. 3. val is the constrained within the sense limit and then mapped to 1-1023 4. All the readings in the loop till the 15th loop is stored in the variable Total using the readings array.after the 15th loop the Total variable is cleared of the previous readings. 5. The value Total is averaged over the 15 loops and stored in the variable average. 6. The higher the average more number of LED s will glow. 6
ARDUINO CODE //EMF Detector //Project by //Vishesh Arya - 120260001 //Yashwanth Sandupatla - 120260022 //Adarsh Kumar - 120260013 #define NUMREADINGS 15 // Variable to increase data smoothing int senselimit = 15; int probepin = 5; // analog 5 int val = 0; // Variable to decrease sensitivity (up to 1023 max) // reading from probepin int LED1 = 2; int LED2 = 3; int LED3 = 4; int LED4 = 5; int LED5 = 6; int LED6 = 7; int LED7 = 8; int LED8 = 9; int LED9 = 10; int LED10 = 11; // connections // to the 10 LEDs // variables for smoothing 7
int readings[numreadings]; int index = 0; int total = 0; int average = 0; // the readings from the analog input // the index of the current reading // the running total // final average of the probe reading //Variable to affect the speed of the updates for numbers. Lower the number the faster it updates. int updatetime = 40; void setup() { pinmode(2, OUTPUT); pinmode(3, OUTPUT); pinmode(4, OUTPUT); pinmode(5, OUTPUT); pinmode(6, OUTPUT); pinmode(7, OUTPUT); pinmode(8, OUTPUT); pinmode(9, OUTPUT); pinmode(10, OUTPUT); pinmode(11, OUTPUT); // specify Display outputs Serial.begin(9600); // initiate serial connection for debugging/etc for (int i = 0; i < NUMREADINGS; i++) readings[i] = 0; // initialize all the readings to 0 intro(); //Runs the intro void loop() { 8
LEDlow(); val = analogread(probepin); // take a reading from the probe if(val >= 1){ val = constrain(val, 1, senselimit); // if the reading isn't zero, proceed // turn any reading higher than the senselimit value into the senselimit value val = map(val, 1, senselimit, 1, 1023); // remap the constrained value within a 1 to 1023 range total -= readings[index]; readings[index] = val; total += readings[index]; index = index + 1; // subtract the last reading // read from the sensor // add the reading to the total // advance to the next index if (index >= NUMREADINGS) index = 0; // if we're at the end of the array... //...wrap around to the beginning average = total / NUMREADINGS; // calculate the average if (average > 50){ // if the average is over 50 showled0(); // Show a 0 if (average > 150){ // and so on... showled1(); // Show a 1 if (average > 250){ showled2(); // Show a 2 9
if (average > 350){ showled3(); // Show a 3 if (average > 450){ showled4(); // Show a 4 if (average > 550){ showled5(); // Show a 5 if (average > 650){ showled6(); // Show a 6 if (average > 750){ showled7(); // Show a 7 if (average > 850){ showled8(); // Show a 8 if (average > 950){ showled9(); // Show a 9 Serial.println(average); // use output to aid in calibrating 10
delay(updatetime); //Show the number 0 void showled0(){ LEDlow(); //Show the number 1 void showled1(){ LEDlow(); digitalwrite(led2, HIGH); //Show the number 2 void showled2(){ LEDlow(); digitalwrite(led2, HIGH); digitalwrite(led3, HIGH); //Show the number 3 void showled3(){ LEDlow(); digitalwrite(led2, HIGH); digitalwrite(led3, HIGH); digitalwrite(led4, HIGH); //Show the number 4 void showled4(){ 11
LEDlow(); digitalwrite(led2, HIGH); digitalwrite(led3, HIGH); digitalwrite(led4, HIGH); digitalwrite(led5, HIGH); //Show the number 5 void showled5(){ LEDlow(); digitalwrite(led2, HIGH); digitalwrite(led3, HIGH); digitalwrite(led4, HIGH); digitalwrite(led5, HIGH); digitalwrite(led6, HIGH); //Show the number 6 void showled6(){ LEDlow(); digitalwrite(led2, HIGH); digitalwrite(led3, HIGH); digitalwrite(led4, HIGH); digitalwrite(led5, HIGH); digitalwrite(led6, HIGH); digitalwrite(led7, HIGH); //Show the number 7 void showled7(){ 12
LEDlow(); digitalwrite(led2, HIGH); digitalwrite(led3, HIGH); digitalwrite(led4, HIGH); digitalwrite(led5, HIGH); digitalwrite(led6, HIGH); digitalwrite(led7, HIGH); digitalwrite(led8, HIGH); //Show the number 8 void showled8(){ LEDlow(); digitalwrite(led2, HIGH); digitalwrite(led3, HIGH); digitalwrite(led4, HIGH); digitalwrite(led5, HIGH); digitalwrite(led6, HIGH); digitalwrite(led7, HIGH); digitalwrite(led8, HIGH); digitalwrite(led9, HIGH); //Show the number 9 void showled9(){ LEDlow(); digitalwrite(led2, HIGH); digitalwrite(led3, HIGH); digitalwrite(led4, HIGH); 13
digitalwrite(led5, HIGH); digitalwrite(led6, HIGH); digitalwrite(led7, HIGH); digitalwrite(led8, HIGH); digitalwrite(led9, HIGH); digitalwrite(led10, HIGH); //Resets the display void LEDlow(){ digitalwrite(led1, LOW); digitalwrite(led2, LOW); digitalwrite(led3, LOW); digitalwrite(led4, LOW); digitalwrite(led5, LOW); digitalwrite(led6, LOW); digitalwrite(led7, LOW); void intro(){ showled0(); delay(300); showled1(); delay(300); showled2(); delay(300); showled3(); delay(300); showled4(); delay(300); showled5(); delay(300); showled6(); 14
delay(300); showled7(); delay(300); showled8(); delay(300); showled9(); delay(300); LEDlow(); 15
CIRCUIT DIAGRAM 16
EMF DETECTOR-FINALLY!!!! 17
PROBLEMS FACED One of the major problems, we faced while making this detector was what should we use as our antennae. Another problem was, stray EMF keeps fluctuating rapidly and is very difficult to observe its nature (i.e high or low). So, to tackle this problem, we used a variable (average) to average some finite number (here 15) of EMF readings in a loop. 18
SCOPE In the future, we ll learn how to improve our antennae using a tuning circuit to detect the presence of stray EMF within a broader range. 19