Reoprts.QRD1114IRSensor History

Hide minor edits - Show changes to output

Changed lines 6-7 from:
Initially I chose another infrared sensor for test, [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was to detect any motion in front of the sensor but it turened out not so sensitive. So that I look at this QRD1114 IR Sensor for substitute. In this test, I used both as digital and analog input to see what difference it has and how sensitive it is.
to:
Initially I chose another infrared sensor for test, [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was to detect any motion in front of the sensor but it turened out not so sensitive. So that I looked at this QRD1114 IR Sensor for substitute. In this test, I used both as digital and analog input to see what difference it has and how sensitive it is.
Changed lines 6-7 from:
Initially I chose another infrared sensor for test, [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was to detect any motion in front of the sensor but it turened out not so sensitive. So that I look at this QRD1114 IR Sensor for substitute. During working on this sensor, I struggled against serial output but in vain. Because of seeing nothing in serial communicator, I used this sensor as digital input for the first try.
to:
Initially I chose another infrared sensor for test, [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was to detect any motion in front of the sensor but it turened out not so sensitive. So that I look at this QRD1114 IR Sensor for substitute. In this test, I used both as digital and analog input to see what difference it has and how sensitive it is.
Changed lines 122-123 from:
See video [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-PWM2.AVI | here ]](1mb, avi).
to:
See video [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-PWM2.AVI | here ]] (1mb, avi).
Changed lines 127-129 from:
to:
#Is infrared sensor THAT dangerous to eyes?
#linear or radial?
Changed lines 1-2 from:
[-Report by Guy Lee, 2/18/06-]
to:
[-Report by Guy Lee, last update 2/24/06-]
Changed lines 94-95 from:
See videos which show the direct-ratio between the distant and the lightness: [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-PWM Ser.AVI | video1(1mb, avi)]], [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-PWM1.AVI | video2(800k, avi)]]).
to:
See videos which show the direct-ratio between the distant and the lightness: [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-PWM Ser.AVI | video1(1mb, avi)]], [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-PWM1.AVI | video2(800k, avi)]].
Changed lines 69-70 from:
Here I use PWM to let LED light gradually. The lighness depends on the variable "adcVar", which is in direct-ratio (code 1) or inverse-ratio (code 2) to the distance between reflecting surface and the sensor. In code one, when the reflecting surface is out of the range (0.5cm), the sensor will read adcVar in the maximum (It should be 1023 in theory but it's 1016 in fact. See [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-PWM Ser.AVI | video1(1mb, avi)]], [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-PWM1.AVI | video2(800k, avi)]]). Also, the minimum is 30 instead of 0.
to:
Here I use PWM to let LED light gradually. The lighness depends on the variable "adcVar", which is in direct-ratio (code 1) or inverse-ratio (code 2) to the distance between reflecting surface and the sensor. In code one, when the reflecting surface is out of the range (0.5cm), the sensor will read adcVar in the maximum (It should be 1023 in theory but it's 1016 in fact. Also, the minimum is 30 instead of 0.
Added lines 94-95:
See videos which show the direct-ratio between the distant and the lightness: [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-PWM Ser.AVI | video1(1mb, avi)]], [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-PWM1.AVI | video2(800k, avi)]]).
Changed line 119 from:
Here are images that present the inverse-ratio between the distance and the lightness.\\
to:
Here are images that present the inverse-ratio between the distance and the lightness.\\
Changed lines 50-51 from:
[PicBasic code]\\
to:
[PicBasic code]
Changed lines 71-72 from:
[PWM PicBasic code 1]\\
to:
[PWM PicBasic code 1]
Changed lines 94-95 from:
[PWM PicBasic code 2]\\
to:
[PWM PicBasic code 2]
Changed lines 51-52 from:
>>red<<[@
to:
>>red<<
[@
Changed lines 50-51 from:
[PicBasic code]
to:
[PicBasic code]\\
Changed lines 69-70 from:
[PWM PicBasic code 1]
to:
[PWM PicBasic code 1]\\
Changed lines 91-92 from:
[PWM PicBasic code 2]
to:
[PWM PicBasic code 2]\\
Changed line 52 from:
>><<[@
to:
>>red<<[@
Changed lines 119-120 from:
See video [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-PWM1.AVI | here ]](1mb, avi).
to:
See video [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-PWM2.AVI | here ]](1mb, avi).
Changed lines 68-69 from:
Here I use PWM to let LED light gradually. The lighness depends on the variable "adcVar", which is in direct-ratio (code 1) or inverse-ratio (code 2) to the distance between reflecting surface and the sensor. In code one, when the reflecting surface is out of the range (0.5cm), the sensor will read adcVar in the maximum (It should be 1023 in theory but it's 1016 in fact. See [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-PWM Ser.AVI | video1]], [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-PWM1.AVI.AVI | video2]]). Also, the minimum is 30 instead of 0.
to:
Here I use PWM to let LED light gradually. The lighness depends on the variable "adcVar", which is in direct-ratio (code 1) or inverse-ratio (code 2) to the distance between reflecting surface and the sensor. In code one, when the reflecting surface is out of the range (0.5cm), the sensor will read adcVar in the maximum (It should be 1023 in theory but it's 1016 in fact. See [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-PWM Ser.AVI | video1(1mb, avi)]], [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-PWM1.AVI | video2(800k, avi)]]). Also, the minimum is 30 instead of 0.
Changed lines 118-119 from:
http://itp.nyu.edu/~thl238/sensor/01/10.jpg http://itp.nyu.edu/~thl238/sensor/01/11.jpg http://itp.nyu.edu/~thl238/sensor/01/12.jpg
to:
http://itp.nyu.edu/~thl238/sensor/01/10.jpg http://itp.nyu.edu/~thl238/sensor/01/11.jpg http://itp.nyu.edu/~thl238/sensor/01/12.jpg\\
See video [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-PWM1.AVI | here ]](1mb, avi).
Changed line 47 from:
2. Trigger with a piece of paper - See the video [[ http://itp.nyu.edu/~thl238/sensor/01/2.AVI | here]], 800k, avi.
to:
2. Trigger with a piece of paper - See video [[ http://itp.nyu.edu/~thl238/sensor/01/2.AVI | here]], 800k, avi.
Changed line 52 from:
[@
to:
>><<[@
Changed lines 65-66 from:
to:
>><<
Changed lines 68-74 from:
Here I use PWM to let LED light gradually. The lighness depends on the variable "adcVar", which is in direct-ratio (code 1) or inverse-ratio (code 2) to the distance between reflecting surface and the sensor. In code one, when the reflecting surface is out of the range (0.5cm), the sensor will read adcVar in the maximum (it should be 1023 in theory but it's 1016 in fact). Also, the minimum is 30 instead of 0.

Here are images that present the inverse
-ratio between the distance and the lightness.\\
http://itp.nyu.edu/~thl238/sensor/01/07.jpg http://itp.nyu.edu/~thl238/sensor/01/08.jpg http://itp.nyu.edu/~thl238/sensor/01/09.jpg\\
http://itp.nyu.edu/~thl238/sensor/01/10.jpg http://itp.nyu.edu/~thl238/sensor/01/11.jpg http://itp.nyu.edu/~thl238/sensor/01/12.jpg
to:
Here I use PWM to let LED light gradually. The lighness depends on the variable "adcVar", which is in direct-ratio (code 1) or inverse-ratio (code 2) to the distance between reflecting surface and the sensor. In code one, when the reflecting surface is out of the range (0.5cm), the sensor will read adcVar in the maximum (It should be 1023 in theory but it's 1016 in fact. See [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-PWM Ser.AVI | video1]], [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-PWM1.AVI.AVI | video2]]). Also, the minimum is 30 instead of 0.
Changed line 95 from:
[@
to:
>>red<<[@
Changed lines 114-115 from:
to:
>><<

Here are images that present the inverse-ratio between the distance and the lightness.\\
http://itp.nyu.edu/~thl238/sensor/01/07.jpg http://itp.nyu.edu/~thl238/sensor/01/08.jpg http://itp.nyu.edu/~thl238/sensor/01/09.jpg\\
http://itp.nyu.edu/~thl238/sensor/01/10.jpg http://itp.nyu.edu/~thl238/sensor/01/11.jpg http://itp.nyu.edu/~thl238/sensor/01/12.jpg
Changed lines 94-95 from:
@]>><<
to:
@]
>><<
Changed lines 74-76 from:
[PWM PicBasic code 1]\\
||border=1 width=20%
||
[@
to:
[PWM PicBasic code 1]

>>red<<
[@
Changed lines 94-95 from:
@]||||
to:
@]>><<
Changed line 75 from:
||border=0 wodth=80%
to:
||border=1 width=20%
Changed lines 73-74 from:
||border=1 wodth=20%
||[PWM
PicBasic code 1]||
to:
[PWM PicBasic code 1]\\
||border=0 wodth=80%
Changed lines 73-75 from:
[PWM PicBasic code 1]

[@
to:
||border=1 wodth=20%
||[PWM
PicBasic code 1]||
||
[@
Changed lines 93-94 from:
@]
to:
@]||||
Changed line 40 from:
'''Digital input'''
to:
'''Digital input'''\\
Changed line 66 from:
'''Analog Input'''
to:
'''Analog Input'''\\
Changed line 40 from:
[Digital input]\\
to:
'''Digital input'''
Changed line 66 from:
[Analog Input]\\
to:
'''Analog Input'''
Added lines 69-72:
Here are images that present the inverse-ratio between the distance and the lightness.\\
http://itp.nyu.edu/~thl238/sensor/01/07.jpg http://itp.nyu.edu/~thl238/sensor/01/08.jpg http://itp.nyu.edu/~thl238/sensor/01/09.jpg\\
http://itp.nyu.edu/~thl238/sensor/01/10.jpg http://itp.nyu.edu/~thl238/sensor/01/11.jpg http://itp.nyu.edu/~thl238/sensor/01/12.jpg
Changed lines 117-120 from:
Here are images that present the direct-ratio between the distance and the lightness.\\
http://itp.nyu.edu/~thl238/sensor/01/07.jpg http://itp.nyu.edu/~thl238/sensor/01/08.jpg http://itp.nyu.edu/~thl238/sensor/01/09.jpg\\
http://itp.nyu.edu/~thl238/sensor/01/10.jpg http://itp.nyu.edu/~thl238/sensor/01/11.jpg http://itp.nyu.edu/~thl238/sensor/01/12.jpg
to:
Changed lines 120-121 from:
2#How to set up Color difference (White/Black) detection circuit ?
to:
#How to set up Color difference (White/Black) detection circuit ?
Changed lines 118-120 from:
1. The range is from 30-1016 instead of 0-1023. Why?
2. How to set up Color difference (White/Black) detection circuit ?\\
to:
#The range is from 30-1016 instead of 0-1023. Why?
2#How to set up Color difference (White/Black) detection circuit ?
Changed lines 113-115 from:
Here are images that present the direct-ratio of the distance and the lightness.\\
http://itp.nyu.edu/~thl238/sensor/01/07.jpg http://itp.nyu.edu/~thl238/sensor/01/08.jpg http://itp.nyu.edu/~thl238/sensor/01/09.jpg
to:
Here are images that present the direct-ratio between the distance and the lightness.\\
http://itp.nyu.edu/~thl238/sensor/01/07.jpg http://itp.nyu.edu/~thl238/sensor/01/08.jpg http://itp.nyu.edu/~thl238/sensor/01/09.jpg\\
http://itp.nyu.edu/~thl238/sensor/01/10.jpg http://itp.nyu.edu/~thl238/sensor/01/11.jpg http://itp.nyu.edu/~thl238/sensor/01/12
.jpg
Added lines 66-115:
[Analog Input]\\
Here I use PWM to let LED light gradually. The lighness depends on the variable "adcVar", which is in direct-ratio (code 1) or inverse-ratio (code 2) to the distance between reflecting surface and the sensor. In code one, when the reflecting surface is out of the range (0.5cm), the sensor will read adcVar in the maximum (it should be 1023 in theory but it's 1016 in fact). Also, the minimum is 30 instead of 0.

[PWM PicBasic code 1]

[@
DEFINE OSC 20
DEFINE ADC_BITS 10 ' Set number of bits in result
DEFINE ADC_CLOCK 3 ' Set clock source (3=rc)
DEFINE ADC_SAMPLEUS 50 ' Set sampling time in uS

TRISA = %11111111 ' Set PORTA to all input
ADCON1 = %10000010 ' Set PORTA analog and right justify
output portb.7
adcVar VAR word
dutyCycle var byte

main:
ADCIN 0, adcVar
serout2 portc.6, 16468, [DEC adcVar, 13]
dutyCycle = adcVar/5
pwm portb.7,dutyCycle,10
goto main
@]

[PWM PicBasic code 2]

[@
DEFINE OSC 20
DEFINE ADC_BITS 10 ' Set number of bits in result
DEFINE ADC_CLOCK 3 ' Set clock source (3=rc)
DEFINE ADC_SAMPLEUS 50 ' Set sampling time in uS

TRISA = %11111111 ' Set PORTA to all input
ADCON1 = %10000010 ' Set PORTA analog and right justify
output portb.7
adcVar VAR word
dutyCycle var byte

main:
ADCIN 0, adcVar
serout2 portc.6, 16468, [DEC adcVar, 13]
dutyCycle = (1023-adcVar)/5
pwm portb.7,dutyCycle,10
goto main
@]

Here are images that present the direct-ratio of the distance and the lightness.\\
http://itp.nyu.edu/~thl238/sensor/01/07.jpg http://itp.nyu.edu/~thl238/sensor/01/08.jpg http://itp.nyu.edu/~thl238/sensor/01/09.jpg
Changed lines 118-119 from:
1. How to set up Color difference (White/Black) detection circuit ?\\
to:
1. The range is from 30-1016 instead of 0-1023. Why?
2
. How to set up Color difference (White/Black) detection circuit ?\\
Changed lines 68-99 from:
1. Test one \\
Maybe the code below doesn't make sense but I find something interesting when running on this code.

[@
DEFINE OSC 20
DEFINE ADC_BITS 10 ' Set number of bits in result
DEFINE ADC_CLOCK 3 ' Set clock source (3=rc)
DEFINE ADC_SAMPLEUS 50 ' Set sampling time in uS

TRISA = %11111111 ' Set PORTA to all input
ADCON1 = %10000010 ' Set PORTA analog and right justify
output portb.7
adcVar VAR byte

main:
ADCIN 0, adcVar
serout2 portc.6, 16468, [DEC adcVar, 10, 13]
if adcVar<100 then
high portb.7
else
low portb.7
endif
goto main
@]

Porta.0 was used as analog input. Then I found the operative area was changed and divided into several sections by distance (In this case, there were 4 operative sections). And when the code was changed to adcVar<10, the performance varied as well ( a little big though). Perhaps it's just an unexpected error.

http://itp.nyu.edu/~thl238/sensor/01/a01.jpg http://itp.nyu.edu/~thl238/sensor/01/a02.jpg http://itp.nyu.edu/~thl238/sensor/01/a04.jpg http://itp.nyu.edu/~thl238/sensor/01/a05.jpg http://itp.nyu.edu/~thl238/sensor/01/a07.jpg http://itp.nyu.edu/~thl238/sensor/01/a08.jpg
See the video [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-3.AVI | here]], 2mb, avi.

2. How to set up Color difference (White/Black) detection circuit ?\\
3. PWM performance
to:
1. How to set up Color difference (White/Black) detection circuit ?\\
Changed lines 93-94 from:
Porta.0 was used as analog input. Then I found the operative area was changed and divided into several sections by distance (In this case, there were 4 operative sections). And when the code was changed to adcVar<10, the appearance varied as well ( a little big though). Perhaps it's just an unexpected error.
to:
Porta.0 was used as analog input. Then I found the operative area was changed and divided into several sections by distance (In this case, there were 4 operative sections). And when the code was changed to adcVar<10, the performance varied as well ( a little big though). Perhaps it's just an unexpected error.
Changed lines 98-99 from:
2. How to set up Color difference (White/Black) detection circuit ?
to:
2. How to set up Color difference (White/Black) detection circuit ?\\
3. PWM performance
Changed line 40 from:
[Digital input]
to:
[Digital input]\\
Added line 40:
[Digital input]
Changed lines 97-98 from:
2. Color difference (White/Black) detection
to:
2. How to set up Color difference (White/Black) detection circuit ?
Changed lines 68-69 from:
Maybe the code below doesn't make sense but I find something interesting when running on this code. In this case, I used porta.0 as analog input.
to:
Maybe the code below doesn't make sense but I find something interesting when running on this code.
Changed lines 92-93 from:
Then the operative area was changed and divided into several sections by distance. And when the code was changed to adcVar<10, the appearance varied as well. Perhaps it's just an unexpected error.
to:
Porta.0 was used as analog input. Then I found the operative area was changed and divided into several sections by distance (In this case, there were 4 operative sections). And when the code was changed to adcVar<10, the appearance varied as well ( a little big though). Perhaps it's just an unexpected error.
Changed line 94 from:
http://itp.nyu.edu/~thl238/sensor/01/a02.jpg http://itp.nyu.edu/~thl238/sensor/01/a04.jpg http://itp.nyu.edu/~thl238/sensor/01/a05.jpg http://itp.nyu.edu/~thl238/sensor/01/a06.jpg http://itp.nyu.edu/~thl238/sensor/01/a07.jpg http://itp.nyu.edu/~thl238/sensor/01/a08.jpg
to:
http://itp.nyu.edu/~thl238/sensor/01/a01.jpg http://itp.nyu.edu/~thl238/sensor/01/a02.jpg http://itp.nyu.edu/~thl238/sensor/01/a04.jpg http://itp.nyu.edu/~thl238/sensor/01/a05.jpg http://itp.nyu.edu/~thl238/sensor/01/a07.jpg http://itp.nyu.edu/~thl238/sensor/01/a08.jpg
Changed lines 68-69 from:
Maybe the code below doesn't make sense but I find something interesting when running on this code. In this case, I use porta.0 as analog input.
to:
Maybe the code below doesn't make sense but I find something interesting when running on this code. In this case, I used porta.0 as analog input.
Changed lines 92-93 from:
Then I found the operative area was changed and divided into several sections by distance. And when the code was changed to adcVar<10, the appearance varied as well. Perhaps it's just an unexpected error.
to:
Then the operative area was changed and divided into several sections by distance. And when the code was changed to adcVar<10, the appearance varied as well. Perhaps it's just an unexpected error.
Changed line 50 from:
----
to:
Changed lines 64-65 from:
----
to:
Changed line 69 from:
----
to:
Changed line 91 from:
----
to:
Changed line 50 from:
--------------
to:
----
Changed lines 64-65 from:
--------------
to:
----
Added line 70:
----
Added line 92:
----
Changed lines 6-7 from:
Initially I chose another infrared sensor for test, [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was to detect any motion in front of the sensor but it turened out not so sensitive. So that I look at this QRD1114 IR Sensor for substitute.
to:
Initially I chose another infrared sensor for test, [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was to detect any motion in front of the sensor but it turened out not so sensitive. So that I look at this QRD1114 IR Sensor for substitute. During working on this sensor, I struggled against serial output but in vain. Because of seeing nothing in serial communicator, I used this sensor as digital input for the first try.
Changed lines 16-17 from:
'''What Can It Do'''
to:
'''What Can QRD 1114 IR Sensor Do'''
Changed line 35 from:
Below show the relatio ship between normalized collector current and distance.
to:
Below shows the relationship between normalized collector current and distance.
Changed lines 68-69 from:
1. Analog input\\
When I hocked up the signal input to analog pin porta.0, something wierd happened. In this case, porta.0 was used as analog input. See PicBasic code below:
to:
1. Test one \\
Maybe the code below doesn't make sense but I find something interesting when running on this code. In this case, I use porta.0 as analog input.
Added line 32:
Added line 34:
Changed line 33 from:
*Below show the relatio ship between normalized collector current and distance.
to:
Below show the relatio ship between normalized collector current and distance.
Added line 33:
*Below show the relatio ship between normalized collector current and distance.
Changed line 90 from:
http://itp.nyu.edu/~thl238/sensor/01/a02.jpg http://itp.nyu.edu/~thl238/sensor/01/a03.jpg http://itp.nyu.edu/~thl238/sensor/01/a04.jpg http://itp.nyu.edu/~thl238/sensor/01/a05.jpg http://itp.nyu.edu/~thl238/sensor/01/a06.jpg http://itp.nyu.edu/~thl238/sensor/01/a07.jpg http://itp.nyu.edu/~thl238/sensor/01/a08.jpg
to:
http://itp.nyu.edu/~thl238/sensor/01/a02.jpg http://itp.nyu.edu/~thl238/sensor/01/a04.jpg http://itp.nyu.edu/~thl238/sensor/01/a05.jpg http://itp.nyu.edu/~thl238/sensor/01/a06.jpg http://itp.nyu.edu/~thl238/sensor/01/a07.jpg http://itp.nyu.edu/~thl238/sensor/01/a08.jpg
Changed line 90 from:
http://itp.nyu.edu/~thl238/sensor/01/a01.jpg http://itp.nyu.edu/~thl238/sensor/01/a02.jpg http://itp.nyu.edu/~thl238/sensor/01/a03.jpg http://itp.nyu.edu/~thl238/sensor/01/a04.jpg http://itp.nyu.edu/~thl238/sensor/01/a05.jpg http://itp.nyu.edu/~thl238/sensor/01/a06.jpg http://itp.nyu.edu/~thl238/sensor/01/a07.jpg http://itp.nyu.edu/~thl238/sensor/01/a08.jpg
to:
http://itp.nyu.edu/~thl238/sensor/01/a02.jpg http://itp.nyu.edu/~thl238/sensor/01/a03.jpg http://itp.nyu.edu/~thl238/sensor/01/a04.jpg http://itp.nyu.edu/~thl238/sensor/01/a05.jpg http://itp.nyu.edu/~thl238/sensor/01/a06.jpg http://itp.nyu.edu/~thl238/sensor/01/a07.jpg http://itp.nyu.edu/~thl238/sensor/01/a08.jpg
Changed line 91 from:
See the video [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-3.AVI | here]].
to:
See the video [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-3.AVI | here]], 2mb, avi.
Changed lines 65-66 from:
1. Analog input - When I hocked up the signal input to analog pin porta.0, something wierd happened. In this case, porta.0 was used as analog input. See PicBasic code below:
to:
1. Analog input\\
When I hocked up the signal input to analog pin porta.0, something wierd happened. In this case, porta.0 was used as analog input. See PicBasic code below:
Added line 64:
Changed lines 86-87 from:
Then I found the operative area was changed and divided into several areas by distance. And when the code was changed to adcVar<10, the appearance varied as well. Perhaps it's just an unexpected error.
to:
Then I found the operative area was changed and divided into several sections by distance. And when the code was changed to adcVar<10, the appearance varied as well. Perhaps it's just an unexpected error.
Changed lines 64-67 from:
#Analog input
When I hocked up the signal input to analog pin porta.0, something wierd happened. In PicBasic code, I used adcVar<
#Color difference (White/Black) detection
to:
1. Analog input - When I hocked up the signal input to analog pin porta.0, something wierd happened. In this case, porta.0 was used as analog input. See PicBasic code below:
[@
DEFINE OSC 20
DEFINE ADC_BITS 10 ' Set number of bits in result
DEFINE ADC_CLOCK 3 ' Set clock source (3=rc)
DEFINE ADC_SAMPLEUS 50 ' Set sampling time in uS

TRISA = %11111111 ' Set PORTA to all input
ADCON1 = %10000010 ' Set PORTA analog and right justify
output portb.7
adcVar VAR byte

main:
ADCIN 0, adcVar
serout2 portc.6, 16468, [DEC adcVar, 10, 13]
if adcVar<100 then
high portb.7
else
low portb.7
endif
goto main
@]
Then I found the operative area was changed and divided into several areas by distance. And when the code was changed to adcVar<10, the appearance varied as well. Perhaps it's just an unexpected error.

http://itp.nyu.edu/~thl238/sensor/01/a01.jpg http://itp.nyu.edu/~thl238/sensor/01/a02.jpg http://itp.nyu.edu/~thl238/sensor/01/a03.jpg http://itp.nyu.edu/~thl238/sensor/01/a04.jpg http://itp.nyu.edu/~thl238/sensor/01/a05.jpg http://itp.nyu.edu/~thl238/sensor/01/a06.jpg http://itp.nyu.edu/~thl238/sensor/01/a07.jpg http://itp.nyu.edu/~thl238/sensor/01/a08.jpg
See the video [[ http://itp.nyu.edu/~thl238/sensor/01/QRD1114-3.AVI | here]].

2. Color difference (White/Black) detection
Changed line 18 from:
1. Obect / Surface detection\\
to:
1. Object / Surface detection\\
Changed lines 16-17 from:
'''How Does It Work'''
to:
'''What Can It Do'''
Changed lines 6-7 from:
Initially I chose another infrared sensor for test, [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was to detect any motion in front of the sensor but it turened out not so sensitive. So that I look at this QRD1114 IR Sensor for a possible substitute.
to:
Initially I chose another infrared sensor for test, [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was to detect any motion in front of the sensor but it turened out not so sensitive. So that I look at this QRD1114 IR Sensor for substitute.
Changed lines 6-7 from:
Originally I got another infrared sensor, [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was to detect any motion in front of the sensor but it turened out not so sensitive. So that I look at this QRD1114 IR Sensor for a possible substitute.
to:
Initially I chose another infrared sensor for test, [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was to detect any motion in front of the sensor but it turened out not so sensitive. So that I look at this QRD1114 IR Sensor for a possible substitute.
Changed lines 40-41 from:
[Documentation]
1. Trigger with finger (See the video [[ http://itp.nyu.edu/~thl238/sensor/01/1.AVI | here]], 900k, avi.)
to:
1. Trigger with finger - See the video [[ http://itp.nyu.edu/~thl238/sensor/01/1.AVI | here]], 900k, avi.
Changed line 43 from:
2. Trigger with a piece of paper (See the video [[ http://itp.nyu.edu/~thl238/sensor/01/2.AVI | here]], 800k, avi.)
to:
2. Trigger with a piece of paper - See the video [[ http://itp.nyu.edu/~thl238/sensor/01/2.AVI | here]], 800k, avi.
Changed lines 27-28 from:
*Pins 2 and 4 are typically shorter than pins 1 and 3.
to:
*Pins 2 and 4 are typically shorter than pins 1 and 3. See the reference circuit [[ http://itp.nyu.edu/~thl238/sensor/01/circuit.gif | here]].
Added line 9:
Changed lines 19-20 from:
Object or surfaces must be within 0.5cm. This circuit will not distinguish between white and black objects but it will let you know when you are at the edge of a surface.
to:
Object or surfaces must be within 0.5cm. This [[ http://itp.nyu.edu/~thl238/sensor/01/circuit.gif | circuit]] will not distinguish between white and black objects but it will let you know when you are at the edge of a surface.
Changed lines 21-22 from:
If you want to detect the difference between white or black surfaces, in the [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=185&SubSubCatID=0&ProductID=97 | circuit]] the Input pin on the Micro should be an analog to digital converter or some other device that can utilize variable voltage levels. A black surface will give a voltage some where between 0V and 5V and white surfaces will give a voltage of 5V. Determining the voltage level for your black and white surfaces will require experimentation.
to:
If you want to detect the difference between white or black surfaces, in the [[ http://itp.nyu.edu/~thl238/sensor/01/circuit.gif | circuit]] the Input pin on the Micro should be an analog to digital converter or some other device that can utilize variable voltage levels. A black surface will give a voltage some where between 0V and 5V and white surfaces will give a voltage of 5V. Determining the voltage level for your black and white surfaces will require experimentation.
Changed lines 21-22 from:
If you want to detect the difference between white or black surfaces, in the circuit above the Input pin on the Micro should be an analog to digital converter or some other device that can utilize variable voltage levels. A black surface will give a voltage some where between 0V and 5V and white surfaces will give a voltage of 5V. Determining the voltage level for your black and white surfaces will require experimentation.
to:
If you want to detect the difference between white or black surfaces, in the [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=185&SubSubCatID=0&ProductID=97 | circuit]] the Input pin on the Micro should be an analog to digital converter or some other device that can utilize variable voltage levels. A black surface will give a voltage some where between 0V and 5V and white surfaces will give a voltage of 5V. Determining the voltage level for your black and white surfaces will require experimentation.
Added lines 15-22:
'''How Does It Work'''

1. Obect / Surface detection\\
Object or surfaces must be within 0.5cm. This circuit will not distinguish between white and black objects but it will let you know when you are at the edge of a surface.

2. Color Differences ( White / Black )\\
If you want to detect the difference between white or black surfaces, in the circuit above the Input pin on the Micro should be an analog to digital converter or some other device that can utilize variable voltage levels. A black surface will give a voltage some where between 0V and 5V and white surfaces will give a voltage of 5V. Determining the voltage level for your black and white surfaces will require experimentation.
Deleted lines 33-40:
'''How Does It Work'''

1. Obect / Surface detection\\
Object or surfaces must be within 0.5cm. This circuit will not distinguish between white and black objects but it will let you know when you are at the edge of a surface.

2. Color Differences ( White / Black )\\
If you want to detect the difference between white or black surfaces, in the circuit above the Input pin on the Micro should be an analog to digital converter or some other device that can utilize variable voltage levels. A black surface will give a voltage some where between 0V and 5V and white surfaces will give a voltage of 5V. Determining the voltage level for your black and white surfaces will require experimentation.
Deleted line 5:
Changed lines 18-19 from:
*Pins 2 and 4 typically shorter than pins 1 and 3.
to:
*Pins 2 and 4 are typically shorter than pins 1 and 3.
Deleted line 20:
Changed lines 24-34 from:

[NOTES]
#Derate power dissipation liearly 1.33mW
/? above 25 ?.
#RMA flux is recommended
.
#Methanol or iospropyl alcohols are recommended as cleaning agents.
#Soldering iron 1
/16" ()1.6mm) from housing.
#As lon as leads are not under any srping tension.
#D is the distance from the sensor face to the reflective surface.
#Cross talk (Icx) is the collector current measured with the indicator current on the input diode and with no reflective surface.
#Measured using an Eastman Koadk netueal white test card with 90% diffused reflecting as a reflective surface.
to:
http://itp.nyu.edu/~thl238/sensor/01/QRD1114-IR-t1-NOTES.jpg
Changed lines 16-17 from:
[PIN Diagram]
to:
'''PIN Diagram'''
Added lines 21-22:
'''Related Tables'''
Changed lines 33-34 from:
http://itp.nyu.edu/~thl238/sensor/01/QRD1114-IR-t1.jpg
to:
http://itp.nyu.edu/~thl238/sensor/01/QRD1114-IR-t2.jpg
http://itp.nyu.edu/~thl238/sensor/01/QRD1114-IR-t3
.jpg
Changed lines 18-21 from:
http://itp.nyu.edu/~thl238/sensor/01/QRD1114-IR-pin.jpg \\
http://itp.nyu.edu/~thl238/sensor/01/QRD1114-IR-pin2.jpg
to:
http://itp.nyu.edu/~thl238/sensor/01/QRD1114-IR-pin.jpg\\
*Pins 2 and 4 typically shorter than pins 1 and 3.

http://itp.nyu.edu/~thl238/sensor/01/QRD1114-IR-t1.jpg
Changed line 18 from:
http://itp.nyu.edu/~thl238/sensor/01/QRD1114-IR-pin.jpg \
to:
http://itp.nyu.edu/~thl238/sensor/01/QRD1114-IR-pin.jpg \\
Added lines 16-21:
[PIN Diagram]

http://itp.nyu.edu/~thl238/sensor/01/QRD1114-IR-pin.jpg \
http://itp.nyu.edu/~thl238/sensor/01/QRD1114-IR-pin2.jpg
Changed lines 42-43 from:
"Demonstration"
to:
'''Demonstration'''
Changed lines 3-4 from:
http://itp.nyu.edu/~thl238/sensor/01/QRD114-IR.jpg http://itp.nyu.edu/~thl238/sensor/01/QRD114-IR2.jpg
to:
http://itp.nyu.edu/~thl238/sensor/01/QRD1114-IR.jpg http://itp.nyu.edu/~thl238/sensor/01/QRD1114-IR2.jpg
Added lines 16-27:
[NOTES]
#Derate power dissipation liearly 1.33mW/? above 25 ?.
#RMA flux is recommended.
#Methanol or iospropyl alcohols are recommended as cleaning agents.
#Soldering iron 1/16" ()1.6mm) from housing.
#As lon as leads are not under any srping tension.
#D is the distance from the sensor face to the reflective surface.
#Cross talk (Icx) is the collector current measured with the indicator current on the input diode and with no reflective surface.
#Measured using an Eastman Koadk netueal white test card with 90% diffused reflecting as a reflective surface.

http://itp.nyu.edu/~thl238/sensor/01/QRD1114-IR-t1.jpg
Changed lines 39-40 from:
http://itp.nyu.edu/~thl238/sensor/01/QRD114-IR-schematic.jpg
to:
http://itp.nyu.edu/~thl238/sensor/01/QRD1114-IR-schematic.jpg
Changed line 26 from:
I have tested object/surface detection and stiil figure out how to detect the difference betwwen black and white. Here is the schematic of how I hooked up QRD1114 IR Sensor to PIC18F452. Portd.1 is used for digital input from QRD1114 IR Sensor's signal and portb.7 for output to light a LED.
to:
I have tested object/surface detection and stiil try to figure out Black/White difference detection. Here is the schematic of how I hooked up QRD1114 IR Sensor to PIC18F452. Portd.1 is used for digital input from QRD1114 IR Sensor's signal while portb.7 is for output to light a LED.
Changed line 29 from:
Here shows how sensitive QRD1114 IR Sensor is:\\
to:
[Documentation]
Changed line 36 from:
[PicBasic code:]
to:
[PicBasic code]
Changed lines 54-55 from:
#Analog input?
to:
#Analog input
When I hocked up the signal input to analog pin porta.0, something wierd happened. In PicBasic code, I used adcVar<
Added line 57:
Changed lines 7-8 from:
Originally I got another infrared sensor, [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was to detect the motion around the sensor but it turened out not so sensitive. So that I look at this QRD1114 IR Sensor for a possible substitute.
to:
Originally I got another infrared sensor, [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was to detect any motion in front of the sensor but it turened out not so sensitive. So that I look at this QRD1114 IR Sensor for a possible substitute.
Changed line 26 from:
I only tested object/surface detection. Here is the schematic of how I hooked up QRD1114 IR Sensor to PIC 18F452. I use portd.1 for digital input and portb.7 for output.
to:
I have tested object/surface detection and stiil figure out how to detect the difference betwwen black and white. Here is the schematic of how I hooked up QRD1114 IR Sensor to PIC18F452. Portd.1 is used for digital input from QRD1114 IR Sensor's signal and portb.7 for output to light a LED.
Changed line 36 from:
And here is the PicBasic code:
to:
[PicBasic code:]
Changed line 33 from:
2. Trigger with a piece of paper
to:
2. Trigger with a piece of paper (See the video [[ http://itp.nyu.edu/~thl238/sensor/01/2.AVI | here]], 800k, avi.)
Changed line 30 from:
1. Trigger with finger (See the video [[ http://itp.nyu.edu/~thl238/sensor/01/01.avi | here]], 900k, avi.)
to:
1. Trigger with finger (See the video [[ http://itp.nyu.edu/~thl238/sensor/01/1.AVI | here]], 900k, avi.)
Changed line 36 from:
And here is the Pic code of my test:
to:
And here is the PicBasic code:
Changed lines 3-4 from:
http://itp.nyu.edu/~thl238/sensor/QRD114-IR.jpg http://itp.nyu.edu/~thl238/sensor/QRD114-IR2.jpg
to:
http://itp.nyu.edu/~thl238/sensor/01/QRD114-IR.jpg http://itp.nyu.edu/~thl238/sensor/01/QRD114-IR2.jpg
Changed lines 27-28 from:
http://itp.nyu.edu/~thl238/sensor/QRD114-IR-schematic.jpg
to:
http://itp.nyu.edu/~thl238/sensor/01/QRD114-IR-schematic.jpg
Changed line 30 from:
1. Trigger with finger (See the video [[ http://itp.nyu.edu/~thl238/sensor/01/1.avi | here]], 900k, avi.)
to:
1. Trigger with finger (See the video [[ http://itp.nyu.edu/~thl238/sensor/01/01.avi | here]], 900k, avi.)
Changed line 30 from:
1. Trigger with finger (See the video [[ http://itp.nyu.edu/~thl238/sensor/01/1.avi | here, 900k, avi ]])
to:
1. Trigger with finger (See the video [[ http://itp.nyu.edu/~thl238/sensor/01/1.avi | here]], 900k, avi.)
Changed line 30 from:
1. Trigger with finger
to:
1. Trigger with finger (See the video [[ http://itp.nyu.edu/~thl238/sensor/01/1.avi | here, 900k, avi ]])
Changed line 37 from:
-------------------------------
to:
--------------
Changed lines 51-52 from:
-------------------------------
to:
--------------
Changed line 37 from:
to:
-------------------------------
Changed lines 51-52 from:
to:
-------------------------------
Added lines 36-37:
And here is the Pic code of my test:
Deleted line 39:
Deleted line 43:
Deleted line 48:
Deleted line 49:
Changed lines 20-26 from:
Here is the schematic of how I hooked up QRD1114 IR Sensor to PIC 18F452.
to:

2. Color Differences ( White / Black )\\
If you want to detect the difference between white or black surfaces, in the circuit above the Input pin on the Micro should be an analog to digital converter or some other device that can utilize variable voltage levels
. A black surface will give a voltage some where between 0V and 5V and white surfaces will give a voltage of 5V. Determining the voltage level for your black and white surfaces will require experimentation.

"Demonstration"

I only tested object/surface detection. Here is the schematic of how I hooked up QRD1114 IR Sensor to PIC 18F452. I use portd.1 for digital input and portb.7 for output.
Changed lines 29-30 from:
Here shows how teh sensor works:\\
a) Trigger with finger
to:
Here shows how sensitive QRD1114 IR Sensor is:\\
1. Trigger with finger
Changed line 33 from:
b) Trigger with paper
to:
2. Trigger with a piece of paper
Changed lines 36-38 from:
2. Color Differences ( White / Black )\\
If you want to detect the difference between white or black surfaces, in the circuit above the Input pin on the Micro should be an analog to digital converter or some other device that can utilize variable voltage levels. A black surface will give a voltage some where between 0V and 5V and white surfaces will give a voltage of 5V. Determining the voltage level for your black and white surfaces will require experimentation.
to:
[@
DEFINE OSC 20

output portb.7
input portd.1

main:

if portd.1=0 then
high portb.7
else
low portb.7
endif

goto main

@]
Changed line 24 from:
**Triggler with finger
to:
a) Trigger with finger
Added lines 27-29:
b) Trigger with paper
http://itp.nyu.edu/~thl238/sensor/01/04.jpg http://itp.nyu.edu/~thl238/sensor/01/05.jpg http://itp.nyu.edu/~thl238/sensor/01/06.jpg
Changed line 24 from:
1. Triggler with finger
to:
**Triggler with finger
Added lines 23-26:
Here shows how teh sensor works:\\
1. Triggler with finger
http://itp.nyu.edu/~thl238/sensor/01/01.jpg http://itp.nyu.edu/~thl238/sensor/01/02.jpg http://itp.nyu.edu/~thl238/sensor/01/03.jpg
Changed lines 21-22 from:
to:
http://itp.nyu.edu/~thl238/sensor/QRD114-IR-schematic.jpg
Changed line 13 from:
#Compact package ( Size 4.6 x 6.1 x 4.4 mm)
to:
#Compact package (size 4.6 x 6.1 x 4.4 mm)
Changed lines 3-4 from:
[[Attach:QRD1114-IR.jpg]]
to:
http://itp.nyu.edu/~thl238/sensor/QRD114-IR.jpg http://itp.nyu.edu/~thl238/sensor/QRD114-IR2.jpg
Changed line 18 from:
Obect / Surface detection\\
to:
1. Obect / Surface detection\\
Changed lines 22-24 from:
to:
2. Color Differences ( White / Black )\\
If you want to detect the difference between white or black surfaces, in the circuit above the Input pin on the Micro should be an analog to digital converter or some other device that can utilize variable voltage levels. A black surface will give a voltage some where between 0V and 5V and white surfaces will give a voltage of 5V. Determining the voltage level for your black and white surfaces will require experimentation.
Added line 27:
#Color difference (White/Black) detection
Changed line 18 from:
*Obect / Surface detection
to:
Obect / Surface detection\\
Changed line 18 from:
''Obect / Surface detection''//
to:
*Obect / Surface detection
Changed lines 18-19 from:
''Obect / Surface detection''
to:
''Obect / Surface detection''//
Added line 19:
Changed line 11 from:
#No contact surface sensing
to:
#Non-contact surface sensing
Changed line 13 from:
#Compact package
to:
#Compact package ( Size 4.6 x 6.1 x 4.4 mm)
Added lines 18-19:
''Obect / Surface detection''
Object or surfaces must be within 0.5cm. This circuit will not distinguish between white and black objects but it will let you know when you are at the edge of a surface.
Changed lines 5-6 from:
I bought this infrared sensor from [[ http://www.hvwtech.com/ | HVM Technologies Inc. ]], $1.50 each. To view the datasheet [[http://www.hvwtech.com/products_resources.asp?CatID=114&SubCatID=185&SubSubCatID=0&ProductID=97 | here]].
to:
I bought this infrared sensor from [[ http://www.hvwtech.com/ | HVM Technologies Inc. ]], $1.50 each. See the datasheet [[http://www.hvwtech.com/products_resources.asp?CatID=114&SubCatID=185&SubSubCatID=0&ProductID=97 | here]].
Changed lines 7-8 from:
Originally I got another infrared sensor, [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was to detect the motion around the sensor but it turened out not so sensotive. So that I look at this QRD1114 IR Sensor for a possible substitute.
to:
Originally I got another infrared sensor, [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was to detect the motion around the sensor but it turened out not so sensitive. So that I look at this QRD1114 IR Sensor for a possible substitute.
Changed lines 7-8 from:
Originally I got another infrared sensor, [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was not so sensotive and couldn't respond to the detected motion immediately. So that I look at this QRD1114 IR Sensor for a possible substitute.
to:
Originally I got another infrared sensor, [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was to detect the motion around the sensor but it turened out not so sensotive. So that I look at this QRD1114 IR Sensor for a possible substitute.
Changed lines 7-8 from:
Originally I got another infrared sensor [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was not so sensotive and couldn't respond to the detected motion immediately. So that I look at this QRD1114 IR Sensor for a possible substitute.
to:
Originally I got another infrared sensor, [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was not so sensotive and couldn't respond to the detected motion immediately. So that I look at this QRD1114 IR Sensor for a possible substitute.
Changed lines 7-63 from:
Originally I got another infrared sensor [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was not so sensotive and always delayed.

'''Devantech SRF-04'''

http://itp.nyu.edu/physcomp/sensors/uploads/Reports/srf04-front.jpg http://itp.nyu.edu/physcomp/sensors/uploads/Reports/srf04-back1.jpg

This particular module is very popular for use in smaller robotics manufacturing and engineering. When you hunt down information about the unit, it is often tied to both home and academic research products that use the sensors as navigation tools for their robots. [[http://www.acroname.com/robotics/gallery/bugbot/bugbot.html | An example fitting of ITP’s often humorous approach to robotics]].

A good question to ask would be: Why use this type of ranger when here are other methods, many of them cheaper? Take, for example, the [[http://www.acroname.com/robotics/parts/R120-GP2Y0D02YK.html | Sharp range of IR sensors]]. They are a little less bulky, and, come on, the concept of working with IR just sounds sexier. But there are two main reasons why the sonar sensors are a good solution to navigational needs, over the IR sensors:
1) They can detect further distances
2) IR and light tracking and sensing can be a giant pain. You take an IR sensor outdoors into the natural sunlight which puts off an immense amount of natural IR light, and your robot is, in effect, blind.

Sonar rangers do have their own quirks, which I will get to, but outdoor projects may be easier to negotiate with sonar. Reference the Bugbot link above for examples of multiple arrays of sensors used in conjunction.

'''Electrical Characteristics'''

Unfortunately, I was not able to find a specific data sheet for this product. Googling Devantech leads you [[http://www.robot-electronics.co.uk | here]]. However, on both the Acroname and Parallax sites, you can find very handy data-sheet-esque reports that have code examples (mostly for the Basic Stamp and BX). Download the PDF [[http://www.acroname.com/robotics/parts/R93-SRF04p.pdf | here]]. Also, when you purchase a unit from Acroname, they send you a small booklet which is a nicely condensed version of the Parallax data-report. The reports outline the following behaviors for this unit:

* It operates on +5v and uses between 30 and 50 mA (30 is typical)
* Emits at a frequency of 40khz (way beyond anything we can hear)
* The MAX range for detection is 3 meters (roughly 8.5 feet)
* The MIN range for detection is 3 centimeters (a little more than an inch)
* According to lab testing, the sonar can detect the top of a broom handle, which is 3cm in diameter, from a distance greater than 2 meters (almost 6 feet). Testing this theory is a bit tricky, and as my tests later showed, that kind of accuracy is irrelevant due to other concerns.

'''How Does This Thing Work?'''

I hooked this sensor up to a [[http://microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2057&dty=Data+Sheets&ty=&section=Data+Sheets&ssUserText=18f252&image.x=10&image.y=7 | Microchip Pic 18F252]].

HOW IT INTERFACES

http://itp.nyu.edu/physcomp/sensors/uploads/Reports/srf04-pins.jpg

* The INIT and ECHO pins go to any digital I/O pin on the Pic.
* You pulse the INIT pin for a minimum of 10uS, at 5V (TTL Level). This is the trigger for the sensor to send the 40khz tone.
* You ask the Pic to listen on the ECHO pin for 10mS for that tone coming back to the sensor. Using PicBasicPro, the PULSIN command allows you read the voltage coming back to the Pic.
* If we take that time and divide it by the constant of the Speed of Sound, we can determine distance. On the Pic with a 4mhz clock, you use 14. As Tom Igoe notes in his book [[http://www.amazon.com/gp/product/159200346X/qid=1133575367/sr=2-1/ref=pd_bbs_b_2_1/002-7333207-3857625?s=books&v=glance&n=283155 | ''Physical Computing'']], due to the differences in timing between the PULSOUT and PULSIN commands, this value differs from one microcontroller to the next. The BX, for example, uses 74 as its constant. That is included in the data report found on the Acroname page.

When I hooked up a multimeter to the ECHO pin, the voltage coming back ranged from .65V to 3.5V consistently, giving some idea as to the range the PULSIN command translates.

This is the [[Code.SRF04 Test | code]] I used to test this with a 4mhz clock. It is taken directly from ''Physical Computing''.

The end result of testing, with the sensor pointed at a roughly 15 foot ceiling, and using my hand as a movable target, was a seemingly maximum distance of 61 inches, and a minimum distance of 3 inches. As we can see, not quite what the guides give us as the parameters for the sensor.

http://itp.nyu.edu/physcomp/sensors/uploads/Reports/srf04-board1.jpg http://itp.nyu.edu/physcomp/sensors/uploads/Reports/srf04-board2.jpg http://itp.nyu.edu/physcomp/sensors/uploads/Reports/srf04-serial.jpg

'''Problems'''

When I tilted the sensor angle, so the emitters were parallel with the table, and pointed it into space where I knew any items were out of range, I figured I would get roughly the same results as before. This was not the case. I kept getting readings of things being as close as a foot away, even though there were no items in front of the sensor.

When I went back to the Acroname page to see if there are any circuits for calibrating these devices, I came across a link to this [[http://www.robot-electronics.co.uk/htm/reducing_sidelobes_of_srf10.htm | page]].

The user here describes the problem inherent to the ranger. In the data provided with the sensor, Acroname lab tests show a roughly 45 degree angle of dispersion for the frequency. But that means it goes out in a 360 degree cone, not just on the X-axis. Subsequently, the floor of the work area became a “target.” The user here found that the best height for eliminating this distortion was at 5 feet. He describes this on a SRF10 ranger. The 04 has a shorter range, so the height would be a bit lower, but you still have to consider the floor a factor in measurement. He also discusses a solution for creating a narrower cone, eliminating distortion from object “way off boresight” (the angle where the sonar is aimed...straight ahead).



to:
Originally I got another infrared sensor [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was not so sensotive and couldn't respond to the detected motion immediately. So that I look at this QRD1114 IR Sensor for a possible substitute.

'''Features'''
#Phototransistor output
#No contact surface sensing
#Unfocused for sensing diffused sufaces
#Compact package
#Daylight filter onsensor

'''How Does It Work'''

Here is the schematic of how I hooked up QRD1114 IR Sensor to PIC 18F452.


'''Questions'''
#Analog input?
Changed lines 7-8 from:
One of my favorite uses of Sonar technology comes from the marine world, and I don’t really mean the trillion dollar submarine development branch of the Navy and federal government, but something way more mundane: fish finders. Nothing better than sitting in a boat all day, out on a nice calm lake, trolling slowly along with the movement of schools of fish that you can “see” underneath the boat. Okay, there are many things better than that, but I still like the technology of the fishing world. For example, [[http://humminbird.com/products.asp?ID=361 | Humminbird]] makes some wonderful gear for tracking fish and navigating various aquatic terrain.
to:
Originally I got another infrared sensor [[ http://www.hvwtech.com/products_view.asp?CatID=114&SubCatID=186&SubSubCatID=0&ProductID=270 | PIR Motion Sensor ]], which was not so sensotive and always delayed.
Changed lines 11-14 from:
The [[http://www.acroname.com/robotics/parts/R271-SRF04.html | SRF-04 Sonar Ranger]] is a fairly low cost method of working with Sonar for the purposes of range detection. This particular interface works well for proximity (Z-axis), but it does not provide any feedback in terms of positioning on an X or Y axis.

http://itp.nyu.edu/physcomp/sensors/uploads/Reports/srf04-front1
.jpg http://itp.nyu.edu/physcomp/sensors/uploads/Reports/srf04-back1.jpg
to:
http://itp.nyu.edu/physcomp/sensors/uploads/Reports/srf04-front.jpg http://itp.nyu.edu/physcomp/sensors/uploads/Reports/srf04-back1.jpg
Changed lines 1-2 from:
QRD1114 IR Sensor [-Report by Guy Lee-]
to:
[-Report by Guy Lee, 2/18/06-]
Changed lines 1-2 from:
QRD1114 IR Sensor''' [-Report by Guy Lee-]
to:
QRD1114 IR Sensor [-Report by Guy Lee-]
Added lines 1-65:
QRD1114 IR Sensor''' [-Report by Guy Lee-]

[[Attach:QRD1114-IR.jpg]]

I bought this infrared sensor from [[ http://www.hvwtech.com/ | HVM Technologies Inc. ]], $1.50 each. To view the datasheet [[http://www.hvwtech.com/products_resources.asp?CatID=114&SubCatID=185&SubSubCatID=0&ProductID=97 | here]].

One of my favorite uses of Sonar technology comes from the marine world, and I don’t really mean the trillion dollar submarine development branch of the Navy and federal government, but something way more mundane: fish finders. Nothing better than sitting in a boat all day, out on a nice calm lake, trolling slowly along with the movement of schools of fish that you can “see” underneath the boat. Okay, there are many things better than that, but I still like the technology of the fishing world. For example, [[http://humminbird.com/products.asp?ID=361 | Humminbird]] makes some wonderful gear for tracking fish and navigating various aquatic terrain.

'''Devantech SRF-04'''

The [[http://www.acroname.com/robotics/parts/R271-SRF04.html | SRF-04 Sonar Ranger]] is a fairly low cost method of working with Sonar for the purposes of range detection. This particular interface works well for proximity (Z-axis), but it does not provide any feedback in terms of positioning on an X or Y axis.

http://itp.nyu.edu/physcomp/sensors/uploads/Reports/srf04-front1.jpg http://itp.nyu.edu/physcomp/sensors/uploads/Reports/srf04-back1.jpg

This particular module is very popular for use in smaller robotics manufacturing and engineering. When you hunt down information about the unit, it is often tied to both home and academic research products that use the sensors as navigation tools for their robots. [[http://www.acroname.com/robotics/gallery/bugbot/bugbot.html | An example fitting of ITP’s often humorous approach to robotics]].

A good question to ask would be: Why use this type of ranger when here are other methods, many of them cheaper? Take, for example, the [[http://www.acroname.com/robotics/parts/R120-GP2Y0D02YK.html | Sharp range of IR sensors]]. They are a little less bulky, and, come on, the concept of working with IR just sounds sexier. But there are two main reasons why the sonar sensors are a good solution to navigational needs, over the IR sensors:
1) They can detect further distances
2) IR and light tracking and sensing can be a giant pain. You take an IR sensor outdoors into the natural sunlight which puts off an immense amount of natural IR light, and your robot is, in effect, blind.

Sonar rangers do have their own quirks, which I will get to, but outdoor projects may be easier to negotiate with sonar. Reference the Bugbot link above for examples of multiple arrays of sensors used in conjunction.

'''Electrical Characteristics'''

Unfortunately, I was not able to find a specific data sheet for this product. Googling Devantech leads you [[http://www.robot-electronics.co.uk | here]]. However, on both the Acroname and Parallax sites, you can find very handy data-sheet-esque reports that have code examples (mostly for the Basic Stamp and BX). Download the PDF [[http://www.acroname.com/robotics/parts/R93-SRF04p.pdf | here]]. Also, when you purchase a unit from Acroname, they send you a small booklet which is a nicely condensed version of the Parallax data-report. The reports outline the following behaviors for this unit:

* It operates on +5v and uses between 30 and 50 mA (30 is typical)
* Emits at a frequency of 40khz (way beyond anything we can hear)
* The MAX range for detection is 3 meters (roughly 8.5 feet)
* The MIN range for detection is 3 centimeters (a little more than an inch)
* According to lab testing, the sonar can detect the top of a broom handle, which is 3cm in diameter, from a distance greater than 2 meters (almost 6 feet). Testing this theory is a bit tricky, and as my tests later showed, that kind of accuracy is irrelevant due to other concerns.

'''How Does This Thing Work?'''

I hooked this sensor up to a [[http://microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2057&dty=Data+Sheets&ty=&section=Data+Sheets&ssUserText=18f252&image.x=10&image.y=7 | Microchip Pic 18F252]].

HOW IT INTERFACES

http://itp.nyu.edu/physcomp/sensors/uploads/Reports/srf04-pins.jpg

* The INIT and ECHO pins go to any digital I/O pin on the Pic.
* You pulse the INIT pin for a minimum of 10uS, at 5V (TTL Level). This is the trigger for the sensor to send the 40khz tone.
* You ask the Pic to listen on the ECHO pin for 10mS for that tone coming back to the sensor. Using PicBasicPro, the PULSIN command allows you read the voltage coming back to the Pic.
* If we take that time and divide it by the constant of the Speed of Sound, we can determine distance. On the Pic with a 4mhz clock, you use 14. As Tom Igoe notes in his book [[http://www.amazon.com/gp/product/159200346X/qid=1133575367/sr=2-1/ref=pd_bbs_b_2_1/002-7333207-3857625?s=books&v=glance&n=283155 | ''Physical Computing'']], due to the differences in timing between the PULSOUT and PULSIN commands, this value differs from one microcontroller to the next. The BX, for example, uses 74 as its constant. That is included in the data report found on the Acroname page.

When I hooked up a multimeter to the ECHO pin, the voltage coming back ranged from .65V to 3.5V consistently, giving some idea as to the range the PULSIN command translates.

This is the [[Code.SRF04 Test | code]] I used to test this with a 4mhz clock. It is taken directly from ''Physical Computing''.

The end result of testing, with the sensor pointed at a roughly 15 foot ceiling, and using my hand as a movable target, was a seemingly maximum distance of 61 inches, and a minimum distance of 3 inches. As we can see, not quite what the guides give us as the parameters for the sensor.

http://itp.nyu.edu/physcomp/sensors/uploads/Reports/srf04-board1.jpg http://itp.nyu.edu/physcomp/sensors/uploads/Reports/srf04-board2.jpg http://itp.nyu.edu/physcomp/sensors/uploads/Reports/srf04-serial.jpg

'''Problems'''

When I tilted the sensor angle, so the emitters were parallel with the table, and pointed it into space where I knew any items were out of range, I figured I would get roughly the same results as before. This was not the case. I kept getting readings of things being as close as a foot away, even though there were no items in front of the sensor.

When I went back to the Acroname page to see if there are any circuits for calibrating these devices, I came across a link to this [[http://www.robot-electronics.co.uk/htm/reducing_sidelobes_of_srf10.htm | page]].

The user here describes the problem inherent to the ranger. In the data provided with the sensor, Acroname lab tests show a roughly 45 degree angle of dispersion for the frequency. But that means it goes out in a 360 degree cone, not just on the X-axis. Subsequently, the floor of the work area became a “target.” The user here found that the best height for eliminating this distortion was at 5 feet. He describes this on a SRF10 ranger. The 04 has a shorter range, so the height would be a bit lower, but you still have to consider the floor a factor in measurement. He also discusses a solution for creating a narrower cone, eliminating distortion from object “way off boresight” (the angle where the sonar is aimed...straight ahead).