Devices & Components
Arduino Uno Rev3
5k Ohm resistor
Resistor 100 ohm
TCRT5000
Software & Tools
Arduino IDE
Project description
Code
Remove static noise from IR sensor data
arduino
This code Static and the low-frequency noise from sensor data.
1/* 2This code is to Remove ambience noise from sensor data. 3IR LED connected to Digital pin: 6 4IR diode connected to analog input:A3 5 6by-Abhilash Patel 7*/ 8int a,b,c; 9void setup() 10{ 11Serial.begin(9600); 12pinMode(6,OUTPUT); 13} 14 15void loop() { 16 digitalWrite(6,HIGH); // Turning ON LED 17 delayMicroseconds(500); //wait 18 a=analogRead(A3); //take reading from photodiode(pin A3) :noise+signal 19 digitalWrite(6,LOW); //turn Off LED 20 delayMicroseconds(500); //wait 21 b=analogRead(A3); // again take reading from photodiode :noise 22c=a-b; //taking differnce:[ (noise+signal)-(noise)] just signal 23 24//Serial.print(a); //noise+signal 25//Serial.print("\ "); 26//Serial.print(b); //noise 27//Serial.print("\ "); 28Serial.println(c); // denoised signal 29 30}
Downloadable files
Schematic for connection
Schematic for connection

Schematic for connection
Schematic for connection

Comments
Only logged in users can leave comments