I'm looking to use a simple IR sensor out in bright sunlight, which means hell lot of distortion. Is there any way I can modulate it using my Arduino UNO so that it isn't affected by sunlight and other ambient light sources?
The IR sensor is just like this one.
-
You modulate the source, not the sensor. Modulation is basically blinking an LED really fast, typically around 36-40 KHz - and is ideally done with a hardware timer rather than delays, but the latter is possible.Chris Stratton– Chris Stratton06/02/2016 19:10:44Commented Jun 2, 2016 at 19:10
-
@ChrisStratton and is that possible with my sensor? If yes then how?YaddyVirus– YaddyVirus06/02/2016 19:11:46Commented Jun 2, 2016 at 19:11
-
If you want to do analog IR measurement in the presence of noise, you probably want not only a modulated source, but a synchronous detector or lock-in amplifier. I don't see much engineering detail of your board, but it looks a little simple to implement that. An almost entirely software solution should be possible, but will require learning quite a bit in order to write.Chris Stratton– Chris Stratton06/02/2016 19:13:15Commented Jun 2, 2016 at 19:13
1 Answer 1
There is little information on the Amazon page about these devices. Only that the output is digital (only on and off) and that the sensitivity is controlled manually by an on board pot. It would appear impractical to enhance this type of device with out detailed specifications and / or a schematic.
If you would prefer using software to solve some of the problems you listed, I would suggest you use an IR parallax (not the company, the technique) distance sensor with an analog output. That way the Arduino Uno's analog input can be used to read the sensor and software (sketch) can process (filter) the data before it is put to use.
Added later...
Here is an article describing how to use an IR parallax distance sensor. Here is an Arduino library design to work specifically with the Sharp IR parallax distance sensor.
-
I tried reading this sensors data with analog input, all I got were 3 digit numbers which made no sense to me. Any idea of what to do?YaddyVirus– YaddyVirus06/03/2016 03:26:30Commented Jun 3, 2016 at 3:26
-
The web page you linked to in your question said the sensors' output is digital. It gave the voltages to expect. As such, using the complex ADC feature of the Arduino gives no advantage to using a simple digital input. If you do use the ADC input, you should expect to see only numbers around 0 and numbers around 255. If you want an analog output from a distance sensor get a Sharp IR parallax distance sensor as suggested in the solution.st2000– st200006/03/2016 12:35:41Commented Jun 3, 2016 at 12:35
-
Yeah I already was looking for one, will this be good enough? robokits.co.in/sensors/… Also please consider that these sensors are to run in bright sunlight...YaddyVirus– YaddyVirus06/03/2016 12:46:43Commented Jun 3, 2016 at 12:46
-
No sensor will always work. Bright sunlight is only 1 problem. A surface that does not reflect IR radiation is another. I have not used this specific sensor but other similar sensors work well in bright room light. The only problem I have had was when a bad florescent light bulb that was failing. Evidently it was also radiating similar IR modulated signals. You might consider using ultrasonic range sensors if these IR parallax sensors are difficult to use under bright sunlight.st2000– st200006/03/2016 12:55:08Commented Jun 3, 2016 at 12:55
-
I used an ultrasonic sensor but the doppler's effect renders them unusableYaddyVirus– YaddyVirus06/03/2016 12:57:55Commented Jun 3, 2016 at 12:57