Photo-gate timer: Difference between revisions

From ShawnReevesWiki
Jump to navigationJump to search
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..."
 
No edit summary
Line 7: Line 7:


===Circuit===
===Circuit===
[[File:Speedometer-Diagram1.png|256px|thumb|right|Circuit diagram for a bicycle speedometer, as a placeholder for an apropos diagram once I make one]]
 
===Components===
===Components===


===Power supply===
===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.
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 2V power diode, or find a rarer 3V plug-in power supply.


===Program===
===Program===

Revision as of 14:08, 22 February 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

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 2V power diode, 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

See also

Circuits for teaching physics