TinyEMF Detector

The next device for my attiny85 to tackle is a tiny EMF detector. So I saw a video from Make magazine on youtube, which then linked me to another random youtuber who had originally done this for their arduino. Essentially the original user had just a single LED which was showing the EMF strength vida LED intensity, the Make guy kind of just improved on that buy using a bar graph and now in the ultimate show of one up-man-ship I decided to move this project over to the ATtiny85 because why waste all those arduino pins.

To find the original video go here http://www.aaronalai.com/emf-detector

The Make magazine article is here http://makezine.com/2009/05/15/making-the-arduino-emf-detector/

The code is here and for the most part it’s a copy of the original code

int aOut2 = 0;
long EMFval = 0;
int averaging = 0 ;
int EMFread = 1;
int sample = 25; // number of samples per read
int sensingRange = 100; // the max expected analog response
void setup() {
// put your setup code here, to run once:

void loop() {
for (int x =0; x < sample ; x ++) {
averaging = analogRead(EMFread)+ averaging;
EMFval = averaging / sample ;
//Serial.println (EMFval);
EMFval = constrain (EMFval, 0, sensingRange);
EMFval = map (EMFval,0,sensingRange,0,255);

analogWrite (aOut2, EMFval);
averaging = 0;



The difficult part clearly wasn’t going to be the code since well I copied the crap out of that. The tricky parts were the pin constraints. Now the hardware required for this project is as follows : 

LM3915 bar graph driver

10LEDS or a bar graph (I used 10 leds because I had them lying around.

0.1 uf Cap

10K resister

1K resister

2x100k resister

500K resister

1 push button


5V 1A regulator (if you want to have it fun off batteries or an unregulated supply)

9V (and battery) battery adapter (if you want to have it run on batteries)

and some wire

One you have that you can follow this schematic load up the ATTiny and go on finding some interesting fields


I just realized that I didn’t put a button in the schematic, but anyway it’s trivial pick a spot between the power or ground and connect it, that way when you press the button it’ll power up and you can see the fields.  Also I used 400k of resisters because I didn’t have any bigger lying around you can choose bigger or smaller ones based on your needs and just tune the code a bit specifically this variable “sensingRange”.

Here’s a photo of my finished product, I made it a case with my new 3d printer which I will talk about later. Image

As of yet I don’t have a video of it in action because well I didn’t know how to record it nicely, I would like to walk around home and detect things but then you’d have to view it in shakey cam, so if you want to see it in action click the links above to the original folks who did this and watch their demo, it’s essentially the same, mine is just smaller 🙂


The Tiny Tiny Series

Before I left to do some training I had bought 25 ATTiny85’s . I still have them and I’m trying to figure out projects for them. So one at a time I will be making projects with them.

For those who don’t know about the ATTiny85 its a 8 pin micro controller. It’s a convenient, solution for very small projects, has a built in 8Mhz clock (with the clock prescaler set to 8, so effectively operating at 1Mhz), can operate with 5V supplies and upto 6 IOs (If the reset pin is disabled, otherwise has 5).

Another thing about these cores is that they can be programmed with the arduino IDE and you can find out more about it here. http://hlt.media.mit.edu/?p=1695

You can read about them here. http://www.atmel.ca/devices/ATTINY85.aspx.

Alto-Scope Part 2 – The performance test

Welcome to the second post.

Today we’re going to explore the Alto-scope’s performance. The specifications of my little Alto-scope should be as follows:

Sample Rate: 150 Ksps

Analogue Bandwidth: 15Khz

Input Voltage Range (1x) : 0-5V

Triggering: Rising Edge level trigger

Singleshot mode: Yes

So how are we going to test this? With a whole slew of signals of course. Sqaures, Sines, Triangles!

Enjoy! And don’t forget to check for part 3 where I explain how you too can build your own Alto-Scope.