Photo-gate timer: Difference between revisions

From ShawnReevesWiki
Jump to navigationJump to search
Line 10: Line 10:
===Components===
===Components===
*Photogates
*Photogates
**LED, infrared (~$0.20). I use a Lite-On LTE-302-M, which has a black dot to identify itself as an emitter; it also allows up to 50mA of current, so it can be used at a greater distance than 20mA emitters.
**LED, infrared (~$0.20). I use a Lite-On LTE-302-M, which has a black dot to identify itself as an emitter; it also allows up to 50mA of current, so it can be used at a greater distance than 20mA emitters. The cathode is the short lead, on the left as you're facing the lens.
**Phototransistor, infrared (~$0.20). I use a Lite-On LTR-301, which has a red dot to identify itself as a receiver.
**Phototransistor, infrared (~$0.20). I use a Lite-On LTR-301, which has a red dot to identify itself as a receiver. The collector is the long lead, on the right as you're facing the lens, the short lead being the emitter of the transistor.
**Switching transistor, 2N2222 or equivalent NPN  (~$0.10)
**Switching transistor, 2N2222 or equivalent NPN  (~$0.10)
**Resistors
**Resistors

Revision as of 12:27, 9 March 2014

Specifications

  • Run on a battery.
  • Include a multi-character display, at least four digits.
  • Include a power switch to save the battery.
  • Use a breadboard so it can be modified.
  • Timing of periods of at least 10 s accurate to 0.01s

Circuit

Components

  • Photogates
    • LED, infrared (~$0.20). I use a Lite-On LTE-302-M, which has a black dot to identify itself as an emitter; it also allows up to 50mA of current, so it can be used at a greater distance than 20mA emitters. The cathode is the short lead, on the left as you're facing the lens.
    • Phototransistor, infrared (~$0.20). I use a Lite-On LTR-301, which has a red dot to identify itself as a receiver. The collector is the long lead, on the right as you're facing the lens, the short lead being the emitter of the transistor.
    • Switching transistor, 2N2222 or equivalent NPN (~$0.10)
    • Resistors
      • LED limiting resistor (~100Ω) (~$0.02)
      • Phototransistor resistor (~5kΩ) (~$0.02)
      • NPN base resistor (~50kΩ) (~$0.02)
      • NPN collector resistor (~1kΩ) (~$0.02)
  • Breadboard (~$5)
  • Micro-controller ($2-$10)
    • Power circuit if necessary ($1)
    • Resonator circuit if necessary (~$1)
  • Display, serial capable ($10), or
  • TTL-to-USB or TTL-to-serial for sharing data with computer ($18)
  • Hook-up wires ($2)

Power supply

Using a 3V LCD display will require us to use one 3V coin cell or two AA or AAA batteries. Or, we could use a 5V phone charger with a set of enough diodes to bring the voltage down, or find a rarer 3V plug-in power supply.

Program

  1. Clear the display
  2. Loop.
    1. Watch for a break in the first gate. If so, reset counter and continue to next loop.
  3. Loop.
    1. increment a counter periodically. Use a period of 10ms or less.
    2. Watch for a break in the second gate. If so, continue to the next section.
  4. Convert the counter to a proper number, if necessary.
  5. Display the number
  6. Return to the idling loop.

Datasheets

Newhaven Display liquid crystal display module, with side white backlight and transflective display.
http://www.newhavendisplay.com/specs/NHD-C0216CiZ-FSW-FBW-3V3.pdf

See also

Circuits for teaching physics