IR Sensor Analysis - WPISmartmouse/Smartmouse_2018 GitHub Wiki
How fast do our sensors need to be?
To get 650Hz, they mathematically need to take less than 1.5ms to read. Next we account for 200us of KC + 32us of scheduling + 7us of motors + 10us of other stuff. This sums to 249us. Which means our sensors actually should take less than 1.2ms to read.
Choosing Sensors
In order to be able to read our sensors at 650Hz, we can't rely on any packaged sensors. They'll all just too slow to change. So we will use simple diode and phototransistors which are much faster. The biggest factor I think will be angle-of-half-sensitivity/intensity.
IR Emitting Diodes:
Part Number | Wavelength | Half Angle | Datasheet | Purchasing |
---|---|---|---|---|
VSLY5850 | 850nm | 3 | datasheet | digikey |
VSLY5940 | 940nm | 3 | datasheet | digikey |
VSMB2943SLX01 | 940nm | 25 | datasheet | digikey |
VSMY2853SL | digikey | |||
VSLB3940 | 940nm | +-22 | datasheet | Mouser |
TSAL6100 | 940 | +-10 | datasheet | Mouser |
TSAL6200 | 940 | +-17 | datasheet | Mouser |
TSUS5402 | 950 | +-22 | datasheet | Mouser |
IR Phototransistors:
Part Number | Wavelength | Half Angle | Datasheet | Purchasing |
---|---|---|---|---|
BPW77NB | 850nm | 10 | datasheet | digikey |
BPV11F | 940nm | 15 | datasheet | digikey |
VEMT2023SLX01 | 860nm | 35 | datasheet | digikey |
TEFT4300 (3mm) | 940nm | +-30 | datasheet | |
LTR-209 (3mm) | 940nm | +-8 | datasheet | Mouser |
LTR-4206E | 940nm | +-10 | datasheet | digikey |
TEKT5400S | 940nm | +-37 | datasheet | digikey |
The 940nm receivers have a day light filter on them, so I think we should use those even though they have a wider half angle. These are highlighted in bold
Beam patterns
BPV11F Receiver
VSLY5940 Emitter
General Circuit Schematic
Choosing the resistor value
For the phototransistor side, there is a resistor (R1 on the 2018 sensor board) which adjusts the sensitivity.
This source offers this equation:
$$ V_{cc} > R_1 * I_{cc} $$
The datasheet for the LTR-209 lists the "On State Collector Current" as 4ma typical--which I think means the $I_{cc}$ from above. our $V_{cc}$ should be 3.3v. So that means $R_1$ should be less than $\frac{3.3}{0.004}=825\Omega$. The lower R1 is, the higher sensitivity will be. We picked $360\Omega$ for our testing.
Testing with $360\Omega$ R1
We built two sensors and mounted them to a 3d printed part which positions them a repeatable and known distance to a flat surface.
Sensor Board Letter | Mean ADC Value over 50 samples |
---|---|
A | 116.56 |
B | 351.72 |