Pages: 1 2 [3]   Go Down
Author Topic: HELP with Infrared emitter + sensor problems  (Read 8006 times)
0 Members and 1 Guest are viewing this topic.
Sioux Falls
Offline Offline
Jr. Member
**
Karma: 0
Posts: 77
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just realized I worded my last post poorly, when I say " light was on "... I did not mean IR led, I meant incandescent light only, just to test how much the values change when someone would turn a light switch on or off.  The room was completely dark, then I switch an incandescent light on, then off.  Not ir led, sorry for the confusion if there was any.
Logged

Sioux Falls
Offline Offline
Jr. Member
**
Karma: 0
Posts: 77
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Man this stuff is frustrating.

Ok, I want to set up an IR receiver that will calibrate to the environment... ( check to see how much ir light is in the environment) and then set that as the new zero level, so if the other IR receiver receives a little more ir light than that new zero ( threshold), then an led will turn on.  To test this, I simply have 2 of the exact same infrared receivers hooked up the exact same way with the exact same resistors to analog 0 and 5 on the arduino.  The 2 receivers are not more than 1 inch apart and are at the same level vertically.  The problem is they are receiving vastly different ir values?? why?


here is the code and the resulting values..... 

int Calibration;
int Receiver;


 void setup()

{
  int Receiver = analogRead(A5);
  int Calibration = analogRead(A0);
  Serial.begin(9600);
  Serial.println("Calibration Input = ");
  Serial.println(Calibration);
  delay(1000);
  Serial.println("Receiver Input = ");
  Serial.println(Receiver);
  }

void loop()
{}
 
 
 here are the values..


Calibration Input =
133
Receiver Input =
359
Calibration Input =
141
Receiver Input =
377...


HOW COULD THEY BE SO DIFFERENT?
Logged

Pages: 1 2 [3]   Go Up
Jump to: