![Page 1: IR Sensors. Two Types Diode-Phototransistor Pair Sharp Sensors](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649d765503460f94a57825/html5/thumbnails/1.jpg)
IR Sensors
![Page 2: IR Sensors. Two Types Diode-Phototransistor Pair Sharp Sensors](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649d765503460f94a57825/html5/thumbnails/2.jpg)
Two TypesDiode-Phototransistor Pair
Sharp Sensors
![Page 3: IR Sensors. Two Types Diode-Phototransistor Pair Sharp Sensors](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649d765503460f94a57825/html5/thumbnails/3.jpg)
Sharp Sensor
Pros● Easy to useCons● Expensive● Large● Noisy readings
![Page 4: IR Sensors. Two Types Diode-Phototransistor Pair Sharp Sensors](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649d765503460f94a57825/html5/thumbnails/4.jpg)
Diode-Phototransistor PairPros● Cheap● Small● More accurateCons● Complex to manage
![Page 5: IR Sensors. Two Types Diode-Phototransistor Pair Sharp Sensors](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649d765503460f94a57825/html5/thumbnails/5.jpg)
Example Parts• Diode (Emitter): SFH-4545• Phototransistor (Receiver):
TEFT4300• 10SC010075 SC10 3/4 Nylon
Screw Insulators• I will try to get these in the lab
• Black Thermal Tubing• Prevents IR leakage• Use hot-air gun to shrink
![Page 6: IR Sensors. Two Types Diode-Phototransistor Pair Sharp Sensors](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649d765503460f94a57825/html5/thumbnails/6.jpg)
Example Setup: Emitter
MCU
GND
5V
0.1 uF 4.7 uF
How to insulate:1. Cut small piece of
thermal tubing2. Put tubing over
emitter so only tip is exposed
3. Use hot-air gun to shrink tubing
![Page 7: IR Sensors. Two Types Diode-Phototransistor Pair Sharp Sensors](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649d765503460f94a57825/html5/thumbnails/7.jpg)
Example Setup: Receiver3.3V
MCU
GND
How to insulate:1. Cut a small piece of the
Nylon Screw Insulator2. Use a SMALL amount of
glue to glue it over the TEFT4300
3. Cover with thermal tubing, same way as previous slide
![Page 8: IR Sensors. Two Types Diode-Phototransistor Pair Sharp Sensors](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649d765503460f94a57825/html5/thumbnails/8.jpg)
Example Sensor Layout
![Page 9: IR Sensors. Two Types Diode-Phototransistor Pair Sharp Sensors](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649d765503460f94a57825/html5/thumbnails/9.jpg)
Position Correction• Wall-in-front correction
• http://micromouseusa.com/?p=398• Corrects angle and translational position• Use twice at dead end to correct X and Y position
• Post detection• http://micromouseusa.com/?p=828• Corrects translational position while on the move• Must calibrate for each speed
![Page 10: IR Sensors. Two Types Diode-Phototransistor Pair Sharp Sensors](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649d765503460f94a57825/html5/thumbnails/10.jpg)
Software Tips• Only turn one on at a time• Turn them on only long enough to get a good
reading• Charge period: ~100 us • Discharge period: ~140 us
• Do post-detection and wall-in-front correction• Subtract ambient noise from sensor reading
![Page 11: IR Sensors. Two Types Diode-Phototransistor Pair Sharp Sensors](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649d765503460f94a57825/html5/thumbnails/11.jpg)
Maze AdjustmentsSince the Diode/phototransistor pair reads the intensity of the light, the material of the maze walls will significantly change the readings you get.
For example, UCSD uses wooden walls, while UCLA uses plastic walls. The plastic walls will reflect a lot more light. If your mouse is very stable, you might be able to just multiply all your sensor values by a constant to account for the difference. However, in reality the relationship is not always linear, so it may be necessary to re-calibrate all your sensor values.
It is probably a good idea to multiply all your sensor values by 100 or 1000 from the beginning, then you can adjust it up or down as needed when you run your mouse on a new maze. This makes it so you don't need to use floating point to make small adjustments.