https://github.com/sdesalas/arduino-emi-sensor
A simple arduino-based sensor that detects electromagnetic inteference.
https://github.com/sdesalas/arduino-emi-sensor
arduino electromagnetic-fields electronics emi sensor
Last synced: about 2 months ago
JSON representation
A simple arduino-based sensor that detects electromagnetic inteference.
- Host: GitHub
- URL: https://github.com/sdesalas/arduino-emi-sensor
- Owner: sdesalas
- Created: 2018-01-28T04:01:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-25T13:55:51.000Z (over 5 years ago)
- Last Synced: 2025-01-22T15:11:20.315Z (4 months ago)
- Topics: arduino, electromagnetic-fields, electronics, emi, sensor
- Language: C++
- Size: 2.81 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# arduino-emi-sensor
A simple arduino-based sensor that detects electrical currents (electromagnetic inteference).

### Components
- 1x Arduino Microcontroller
- 1x Mini Breadboard
- 1x 10-20cm cable lead
- 1x Green LED
- 1x Yellow LED
- 2x Red LEDs```c++
/*
* Arduino EMI Sensor
* By Steven de Salas
*
* A simple sensor that detects electromagnetic inteference.
* It works because Arduino analog pins are very sensitive when using
* a 'floating ground' (ie when antenna is not connected to main ground).
*
* DIAGRAM:
*
* (Antenna)
* Y
* | +--------+
* | |* *|9 --O-| (Red LED)
* | |* *|8 --O-| (Red LED)
* | |* *|7 --O-| (Yellow LED)
* |- A3|* *|6 --O-| (Green LED)
* |* *| |
* |* *|GND --|
* +--------+
*/
int leds[] = { 6, 7, 8, 9 };
int thresholds[] = { 256, 512, 768, 950 };void setup() {
for (byte i = 0; i < 4; i++) {
pinMode(leds[i], OUTPUT);
}
pinMode(A3, INPUT);
}void loop() {
int emi = analogRead(A3);
for (byte i = 0; i < 4; i++) {
digitalWrite(leds[i], emi > thresholds[i] ? 1 : 0);
}
delay(10);
}
```