### EMF detector

#### January 7, 2010

posted Jan 7, 2010, 8:27 AM by Unknown user

 Lately with Dylan being out I have been trying to think of a better way to work the electromagnetic field detector to be a final project. Some of my ideas are to clean up the way the LEDs look and make it look more professional and finalize the bar graph for the EMF detector.

#### Untitled Post

posted Dec 15, 2009, 8:59 AM by Unknown user

 i, dylan, was absent yesterday. im glad to see how much ian got done without me. now we are mixing up a bunch of old programs to make the EMF work. in the ELSE we changed the DIGITALWRITE and LOW to PINMODE and INPUT, which accomplish the same thing of turning the leds off when no signal is dedected, but is need to work with our arrays. now im taking the potentimeter program where we use the pot. to light up more or less leds. we're taking the IF out of it and using it, taking the val. of the antena to determine how many leds light up.int plus [] =  {8, 13, 12, 9, 8, 12, 13, 8, 9, 11, 13, 9, 10, 11, 11, 10, 10, 8, 12, 13, 9, 10, 10, 11, 12, 13, 12, 11, 9, 8};int minus [] = {12, 8, 8, 12, 13, 9, 9, 11, 13, 8, 10, 11, 13, 9, 13, 12, 8, 10, 10, 11, 8, 9, 11, 12, 13, 12, 11, 10, 10, 9};int inPin = 1;int val = 0;void setup() {   Serial.begin(9600);   for(int pin = 8; pin < 13; pin++){pinMode(pin,OUTPUT);  } }void loop() {   val = analogRead(inPin);                    // reads in the values from analog 5 and                                                                   //assigns them to val  if(val >= 1){           val = constrain(val, 0, 100);    // mess with these values                                             for(int x=0; x

#### Untitled Post

posted Dec 14, 2009, 9:08 AM by Unknown user

 the past couple of classes we have had problems with the arrays so i rewrote all 30 arrays but i did not get them on the computer yet seeing Dylan has been missing it took me all 60 min to re figure out the positives and the negatives of all the LEDs

#### Untitled Post

posted Dec 10, 2009, 8:37 AM by Unknown user

 today we plugged the 30 leds in and wrote the array for it and fixed out all the little problems, then we started writing a program to turn all 30 lights on, than after we get that done we will start the programing for the EMF detector

#### Untitled Post

posted Dec 9, 2009, 8:41 AM by Unknown user

 yesterday ian and i got more soddering done for adding a 6th pin to our arrays led board. today we are finishing that and recording the positive and negative values into out arrays in the program. then we hope to connect it to our EMF. also some of the programing needs to be adjusted to accomodate 30 pins instead of the old 20.

#### Untitled Post

posted Dec 8, 2009, 8:45 AM by Unknown user

 Yesterday, before class ended we got the LED bar graph to work correctly, we had a problem with one of the LED' shorting because it was touching itself but we got all that fixed, and this is our new program we wrote- int inPin = 1;             // analog 5int val = 0;                 // where to store info from analog 5int pin9= 9;int pin10 = 10;int pin11 = 11;         // output of red ledint pin12 = 12;int pin13 = 13;void setup() {   Serial.begin(9600);   for(int pin = 9; pin < 13; pin++){pinMode(pin,OUTPUT);  } }void loop() {   val = analogRead(inPin);                    // reads in the values from analog 5 and                                                                   //assigns them to val  if(val >= 1){           val = constrain(val, 0, 100);    // mess with these values                                                   if(val > 0 && val <= 20)  {    digitalWrite(pin13,HIGH);  }  else if(val >= 21 && val <= 40)  {    digitalWrite(pin13,HIGH);    digitalWrite(pin12,HIGH);  }  else if(val >= 41 && val <= 60) {    digitalWrite(pin13,HIGH);    digitalWrite(pin12,HIGH);       digitalWrite(pin11,HIGH); }  else if(val >= 61 && val <= 80)  {    digitalWrite(pin13,HIGH);    digitalWrite(pin12,HIGH);       digitalWrite(pin11,HIGH);    digitalWrite(pin10,HIGH);  }     else if(val >= 81 && val <=100)  {    digitalWrite(pin13,HIGH);    digitalWrite(pin12,HIGH);       digitalWrite(pin11,HIGH);    digitalWrite(pin10,HIGH);    digitalWrite(pin9,HIGH);  }                                                   }else{               for(int pin = 9; pin < 13; pin++){digitalWrite(pin,LOW);  }             }    Serial.println(val);                                          }Now today and the rest of the week we are going to be adding one more pin to our array board and putting the new LEDs onto the board to give us 30 LED for the bar graph.

#### Untitled Post

posted Dec 7, 2009, 8:53 AM by Unknown user

 okay. Ian kelley and i are making a electromagnetic field detector. we have already accomplish the base of this project. we have successfully detected these fields and have used a blink LED to measure the field's strength. we are trying to build the device to that it can be measured and seen on a bar graph of LEDs. currently we are having a lot off trouble with the programing, bug i think we got all of the minor bugs worked out.this includs the language of the arduino, and properly formating the commands. friday, we converted the program from the single LED to accomodate five LEDs, and depending on the strength of the ectromagnetic field more or less LEDs will light up. the problem is only one LED will light up. We thing that this is because of how the readings are coming in. We extended the antena we use for measuring the fields and are doing a serial print the measure these. We eliminated the map command because it wasnt neccarly because we are doing a digital wirte and have no need to ajust value. now we are going to read the value that the antena is measuring and do a serial print. fom those values we plan to adjust the constraits of the readings. we are telling each LED to light up when the reading reach a certain range. for instance, 0 will light no leds up, 1 to 20 will light the first up, 21 - 41 the first and second, and 42- 62 the 1st 2nd and 3rd and so on until we get to what the max value currentlyh is, 100, and all 5 leds light up. we are using the "if" and "if else" and "else" commands to accomplish this.  Here is our current code which is adjusted and manipulated from a base code from online, Led codes we worked with in the poast, codes from past exercises and the green book, and just me and Ian messing around trying to fix problems...int inPin = 1;             // analog 5int val = 0;                 // where to store info from analog 5int pin9= 9;int pin10 = 10;int pin11 = 11;         // output of red ledint pin12 = 12;int pin13 = 13;void setup() {   Serial.begin(9600); }void loop() {   val = analogRead(inPin);                    // reads in the values from analog 5 and                                                                   //assigns them to val  if(val >= 1){           val = constrain(val, 0, 100);    // mess with these values                                                   if(val > 0 && val <= 20)  {    digitalWrite(pin13,HIGH);  }  else if(val >= 21 && val <= 40)  {    digitalWrite(pin13,HIGH);    digitalWrite(pin12,HIGH);  }  else if(val >= 41 && val <= 60) {    digitalWrite(pin13,HIGH);    digitalWrite(pin12,HIGH);       digitalWrite(pin11,HIGH); }  else if(val >= 61 && val <= 80)  {    digitalWrite(pin13,HIGH);    digitalWrite(pin12,HIGH);       digitalWrite(pin11,HIGH);    digitalWrite(pin10,HIGH);  }     else if(val >= 81 && val <=100)  {    digitalWrite(pin13,HIGH);    digitalWrite(pin12,HIGH);       digitalWrite(pin11,HIGH);    digitalWrite(pin10,HIGH);    digitalWrite(pin9,HIGH);  }                                                   }else{               for(int pin = 9; pin < 13; pin++){digitalWrite(pin,LOW);  }             }    Serial.println(val);                                          }HOLLA AT YA CATZ LATER!

1-7 of 7