Attiny 45 EMF Sensor
Intro: Attiny 45 EMF Sensor
This sensor is very sensitive and can pick up electrical signals from anything that uses power. It displays the amount of interference it picks up by sequentially lighting 4 led's one after the other. I have tested it all around the house and its been kinda fun to see how different things compare. It can also be used to follow house electrical wiring inside the walls, yes its that sensitive.
STEP 1: Program the Attiny 45
I used an Arduino Nano to program the Attiny 45 it was easy to setup and worked great. The code shown reads the analog input and uses that information to figure out how many led's should be on if any. The values at which each led lights up are dependent on the antenna, its resistance to ground, and the attiny's input sensitivity. These values will have to changed in the code to best match your personal setup. Sensitivity is adjusted by increasing or decreasing the resistance to ground on the antenna and by changing the led turn on values.
STEP 2: The Circuit
Start by connecting one of the Attiny 45's analog inputs to the antenna then ground it using four 1 mega ohm resistors in series, after that wire the remaining outputs to light four led's. I used a solid copper wire for the antenna and wrapped it around a marker to get the spring like coil. It seems to work fine with 3 volts, so I used a AAA battery holder to power it. I recommend building it on a breadboard initially so you can see what works best for your antenna and modify the circuit or code as necessary.
25 Comments
Sixsense 8 years ago
arduinomaster 8 years ago
We made an arduino with 16 shift registers that can turn on 128 lights. The problem remains "I'm thinking EMF disturbance to trigger the light". I will do more research, but my discussion group can not help with your trigger idea so far.
I started with an Freetronics starter kit cat.No.XC4262 from Jaycar 3 years ago. But best is to join a group to learn, exchange ideas and ask all your questions. Youtube also has many tutorials.
You can find my web link in here
https://www.instructables.com/id/EMF-detector-0-999...
arduinomaster 8 years ago
You find my design here with instructions how to program the Tiny on my web site
https://www.instructables.com/id/EMF-detector-0-999-Hz-for-ATtiny-85/
JasonS121 8 years ago
Can you share the process for programming the ATTiny45 using the Arduino Nano? I guess specifically how you did it. I have an Uno but I am assuming it requires additional shields or something for the 8 pin chip. Thanks and neat design.
arduinomaster 8 years ago
yes, I made shields for the ATtiny85
http://arduinomaster.myfreesites.net/attiny-progra...
Khaleel123 8 years ago
arduinomaster 8 years ago
good design. Great work. I also build one.
http://arduinomaster.myfreesites.net/emf-detector
Khaleel123 8 years ago
Sorry for the late replies, I haven't been getting emails telling me when I receive comments.
arduinomaster 8 years ago
Nice design. I like the simplicity of it. I made one with an ATtiny85 and it works just fine.
No current limiting resistors needed with a 3Volt input. Simple but working software. The chip is a available on eBay or Element 14 in AUS. Good work keep it up.
Khaleel123 8 years ago
davidvarner101 8 years ago
Hi, I'm wondering what the antenna is made out of, could you please give me the requirements for this instructable?
Khaleel123 8 years ago
arduinomaster 8 years ago
/*EMF detector instructables
https://www.instructables.com/id/Attiny-45-EMF-Sensor/?ALLSTEPS
written for ATiny 85
2 October 2015
improved code by by Robert Moller
*/
void setup (){
pinMode(4,OUTPUT);
pinMode(0,OUTPUT);
pinMode(1,OUTPUT);
pinMode(2,OUTPUT);
pinMode(A3,INPUT);
int val=0;
}
void loop(){
int val = analogRead(A3);
int del =30;
delay (1);
if (val>0 && val<=4){ digitalWrite(4,HIGH);
delay (del);}
if (val>=4 && val<= 6){ digitalWrite(0,HIGH);
delay (del);}
if (val>=6 && val<=8){ digitalWrite(1,HIGH);
delay (del);}
if (val>8){ digitalWrite(2,HIGH);
delay (del);}
else
{
digitalWrite (4,LOW);
digitalWrite (0,LOW);
digitalWrite (1,LOW);
digitalWrite (2,LOW);
}
}
Khaleel123 8 years ago
dheeraj malviya 8 years ago
Hii. i am 11TH class student and want to make emf sensor for exhibition. can you please tell me from where i get that chip with 8 pins.
Khaleel123 8 years ago
amalviya2 8 years ago
Khaleel123 8 years ago
lyzux 8 years ago
Depends on where you live, i think people in America often use digikey, i live in germany and get electronic components from local stores or i buy them cheap and without shipping from china through Aliexpress, this takes weeks to arrive though.
danielaragon 8 years ago
como programas el attiny?