Stuffed into a wristband, here’s an Arduino Pro Mini, a LiPo battery and boost converter to get 5V, a couple of LEDs, and the EMF antenna and code. See it glow red AND green when a compact fluorescent light is turned on nearby! Red LED shows 60Hz, green shows “everything else”
Here’s another field visualization from a while back. These folks made a directional antenna for WiFi and mapped each network’s intensity as a function of direction. The blue mist shows a WiFi signal coming through a door near the middle of the image, maybe reflecting off the wall on the left. It’s an image-based technique. It won’t tell you the WiFi strength at the red table farther back in the photo, but it can tell you how to point your antenna when you’re standing at the spot where the “image” was collected.
Thanks to Paul Faget for the link.
To test the digital filter, I removed the EMF sensing resistor and antenna, and then plugged in a 1V peak-to-peak signal from a sine wave generator at different frequencies, up to the maximum frequency of 250 Hz (half the 500 Hz sampling frequency). It gets a little bumpy at low frequency, probably because we’re averaging over a small number of cycles (less than 3).
For a DC input of 5 volts, the Arduino reports an output of 1023. So the filter is working to extract the 1V amplitude, which is 1/5 *1023, or approximately 200. The signal drops to about half the maximum within +/- 15 Hz of 60 Hz. Nice!
I made a version of the EMF sensor that reports the 60Hz voltage as a LED output on pin 11, and “everything BUT 60 Hz” on pin 3, where I put a green LED. The red LED lights near active wires and cords, while the green one goes nuts near compact-fluorescent bulbs (CFL). Two colors will help us distinguish more different kinds of events. To wire it up, just add a 3- to 8 Meg resistor between pin A5 and ground, then stick about a 4 inch wire from pin A5 hanging off into space as in the original EMF detector. The Arduino code is after the jump, and there’s also a list of 50 Hz filter coefficients if you live in one of those regions. You’ll have to truncate those and plug them into your code as we did with the 60 Hz, but you won’t need MATLAB to generate them.
Even a battery can be a sensor. I measured the current in a remote control battery while pressing various buttons. The typical remote control dumps a LOT of current through an infrared LED (up to 1A momentarily). The better to reach a TV or DVD player in a far corner of the room. This activity shows up clearly in the battery current.
There are new user activity recognition tools out there that are just a bit bigger than a battery and add an accelerometer. Green Goose (whose sensor kit will be available in January) and Twine (which recently succeeded on Kickstarter–you can back them until January 3) are two. Software and the user interface are going to determine how useful these tools are. Today’s example shows there is plenty of information just from monitoring the battery’s current in an existing gadget.
With the remote, there is always a startup pattern in the battery current that probably is a manufacturer’s code, then a 4ms space, then a bunch of shark-fin shapes that vary depending on what button was pushed. Filter capacitors in nearly all gadgets store some power locally, preventing a blackout when there’s activity elsewhere in the circuit. These capacitors distort the battery signal level a lot–making shark fins from square waves–but they don’t change the timing between signal edges. You can definitely see a distinct timing pattern in the digits “o” through “9.”Tips of the fins are separated by either 1ms or 2ms. Here’s a screenshot of the variable part of the signal from pressing the button “5”
Assuming the 2ms corresponds to “1” and the 1ms corresponds to a “o” , there are 20 data bits here. There are 4 bits that stay constant (1110), then 4 data bits (varies), four constant bits (1111), 4 bits that are the inverse of the data bits, and finally a constant (1111). Here are the data bits I found. Interestingly they don’t correspond to binary values for the button number. Anyone with a relevant datasheet might be able to check on this, it’s a Samsung Blu-ray remote circa 2008.
Button 0 1101 Button 1 0100 Button 2 1100 Button 3 0010 Button 4 1010 Button 5 0110 Button 6 0001 Button 7 1110 Button 8 1001 Button 9 0101
In short, your basic alkaline battery knows exactly what you’re doing, watching, and thinking. You may need to get out more. You can even zoom in see the 38 KHz infrared modulation that’s used to reduce sensitivity to ambient light. Read further for more on what is going on and how to do this on your own remote…
Here’s a nice visualization from Greg Charvat at MIT using a LED-equipped sensor to map out 2.4 GHz waves. The sensor detects the direction as well as magnitude, so you get two different colors. The 2.4 GHz frequency is used for Bluetooth, wireless sensors (especially ZigBee), Wi-Fi and almost every other gadget, if you’re in the US.
Its wavelength is a few centimeters. (In comparision, the wavelength of 60 Hz electromagnetic radiation is a few thousand MILES)
Now you can almost feel the positive and negative wavefronts thanks to this long exposure image, created by moving the sensing antenna around while the LED lights up.
Now the digital 60 Hz filter is up and running on the Arduino. The goal was to take in all frequencies of EMF, reject anything that was not 60 Hz, and show the amplitude of the 60 Hz component. Here’s a graph of what the Arduino is doing–producing the green filtered signal from the blue raw signal. It also does a moving average over three cycles so there is a bit of lag, about 0.05 seconds. Thanks to Chris Isert for getting the Arduino interrupts set up so we could control the sampling rate (500 Hz).
It’s very sensitive to whether the antenna is being touched–higher values are when it is touched, then it drops off when not touched as shown about halfway through the graph. But if the user is also touching ground while touching the antenna, the values drop to nearly zero.
There should really be a lowpass RC filter on the EMF detector so that the filter does not get fooled by high frequency harmonics above half the sampling frequency. This may be why the green signal is a little bit higher than the tips of the blue peaks.
Here’s the Arduino code, and more information about what the filter is doing to the signal…
Here is a composite image where the EMF detector (hanging out on the left) was moved around a power strip that was turned on. Red dots show where the LED went on. This is the original EMF detector, no frequency filtering, but the signal is likely to be mostly 60 Hz based on what we have measured lately. Thanks to Anand Kulkarni for moving the sensor all over the place, and Dr. Karla Welch for making the composite image.