Photo-gate timer

From ShawnReevesWiki
Revision as of 14:03, 22 February 2014 by Shawn (talk | contribs) (Created page with "===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 m...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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

Circuit diagram for a bicycle speedometer, as a placeholder for an apropos diagram once I make one

Components

Power supply

We can use three AAA or AA cells which would provide 3.6V to 5.1V, or one lithium 3.7V cell. Or, we can use a 9V battery with a voltage regulator. A coin battery would not last a day if we left the switch on.

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

See also

Circuits for teaching physics