more details to follow but its super simple... Sparkfun sells the Infrared sensor or IR sensor
. It is an LED AND a Sensor! crazy useful!.
When the bee crosses under the LED the light is reflected back to the sensor..(its a photo transistor) and triggers a digital input to the Arduino.. (or teensy in my case).
I lined up two chips right next to each other... as the bee goes through the gate if it hits the inside sensor first... its going out.. if it hits the outside sensor first its coming in. More on the programming...
See the full schematic and GERBER files attached.
- I used 4 LEDs in series with one 10 ohm resistor at the end.. that equals 1.2 volts drop per LED.
- you can check your LED voltage drop with an online web tool like this one
- if you end up building the same set up as me you can get the IR sensors for a little cheaper through Digikey here
- Pololu also sells the same IR sensors on a board (array) and they have code and examples here
- per the large schematic below, I used 100k ohm resistors to ground. this increases the sensitivity. If you use a smaller resistor it becomes less sensitive. It is an NPN Phototransistor
Rough cost and components for my board ~ $110
- Printed Circuit Board $45
- qty(44) QRE1113 IR Sensors $33
- Teensy ++ $24
- qty(11) 10 ohm 0805 resistors
- qty(44) 100k 0805 resistors
- 26 headers
and 26 pins
for attaching the Teensy to the board $3
- my time $ouch!
Message me if your interested in me putting together a kit as it would probably be $150 if you want to do the soldering and hot glue gunning yourself!