Photo-gate timer
From ShawnReevesWiki
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
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
- Clear the display
- Loop.
- Watch for a break in the first gate. If so, reset counter and continue to next loop.
- Loop.
- increment a counter periodically. Use a period of 10ms or less.
- Watch for a break in the second gate. If so, continue to the next section.
- Convert the counter to a proper number, if necessary.
- Display the number
- Return to the idling loop.