Arduino Science

Aaron built an electromagnetic field detector using an Arduino board, 3.3MΩ resistor, LED, and wire –

I was messing around with my Arduino board and figured out how to make a cheap portable electromagnetic field (EMF) detector. It only requires a led, 3,300,000 Ohm resistor, and wire. As I approach an EMF the led gets brighter, so I can locate the source. Messing around with the code and resistor values I can change the sensitivity of the device; when I first made the EMF detector I could only find one place to stand in my apt where it didnt go off. I am working on getting a commercial EMF detector that spits out quantitative values so I can calibrate my version and have it do the same on a LCD screen.

Another crazy-simple yet fun Arduino project – anyone out there have an “official” EMF detector for comparison/calibration?

In the Maker Shed:
Arduino Family
Make: Arduino

12 thoughts on “Simple EMF detector with Arduino

  1. Love it.
    30 seconds of build and a lot more of fun.
    I put two of these circuits on my arduino, and I’m going to see if I can get useful directional data. EMF antennae for my bot!

  2. I’ll see your two circuits and raise you one for a 3 axis rig!

    Have you posted the code? If not, can you do so?

    Very simple and elegant!

  3. Hey I was pretty surprised to see my video up on the Make Blog. It is pretty exciting! I got the idea while making an electronic art project, you should check out that YouTube video Anyways the code is pretty simple, I was going to add an averaging function for the input values so the led dims more smoothly; sometimes it flickers instead of dims. Just copy and paste the code below into the Arduino coding environment. It looks like you will have to clean up a bit of the formatting when you copy and paste it into the Arduino environment, pasting code in this forum distorts the spaces of I put in the comments.

    // Aaron ALAI EMF Detector April 22nd 2009 VERSION 1.0
    // *future note, put in averaging function to average val which should result in a more
    // smooth response from the led

    int inPin = 5; // analog 5
    int val = 0; // where to store info from analog 5
    int pin11 = 11; // output of red led

    void setup() {



    void loop() {

    val = analogRead(inPin); // reads in the values from analog 5 and
    //assigns them to val
    if(val >= 1){

    val = constrain(val, 1, 100); // mess with these values
    val = map(val, 1, 100, 1, 1023); // to change the response distance of the device
    analogWrite(pin11, val); // *note also messing with the resistor should change
    // the sensitivity
    }else{ // analogWrite(pin11, val); just tuns on the led with
    // the intensity of the variable val
    analogWrite(pin11, 0); // the else statement is just telling the microcontroller
    // to turn off the light if there is no EMF detected

    Serial.println(val); // use output to aid in calibrating


  4. My thoughts watching the first 5 seconds of this video – “oh neat…no NOT THE SOCKET NO NO…oh, good!”

Comments are closed.