Steady Hands Game Project
I recently created a "Steady Hands Game" - it started off as·eaching the need to have a game for a cub-scout event. However after prototyping the game (on the homework board), I created a more premanent version of this game that can be used for teaching.
Enjoy·the pictures·(Click on the pictures to enlarge)
This is the finished game. The Wand (black) is tied to ground. The wire connecting the red and green posts is the "alarm" wire, and when touched, drives S in an S-R latch. The Red/Green posts have·sensors which are the goals (your aim is to touch this wire, but not the alarm wire). The box that contains the·electronics has 6 front LED's for fancy light chases etc. There's a side 2-color LED·to indicate power/status. A buzzer for audio feedback. A three-way switch (on-off-on) is used to set game modes, and a push-button switch next to the buzzer for buzzer mute / game reset. Finally there's a power switch at back, and the 9-pin programming port.
Schematic for the game. Each input wire is protected by a resistor to prevent accidental shorts. Each output-to-LED wire has a current limiting resistor. The BS2 package has a 50mA sink limit on the first 8 ports, and another 50mA sink limit on the second 8 ports. This means you don't want to drive more than 6 LED's on a given group of 8 ports (with 470-ohm resistors).
I used a 74HCT02·(quad nor) to create a modified S-R latch. '/S' is driven low when the wand touches the main wire. 'R' determines if the value is monitored (high), or has a latching behavior (low). A 74HCT00 (quad nand) can be configured to provide the same functionality and only requires 3 gates. However I had a 74HCT02, and not a 74HCT00 at hand.
This is the top-side of the circuit. I used a marker to mark where components would go, but changed things a little during final placement.
The underside. Not a soldering job I'm proud of [noparse]:([/noparse].
The box. LED's at top for effects. LED on right is 3-color. Switches on bottom are for power and mode. 9-pin serial connector on bottom for programming. Buzzer on left along with a press button for reset/mute functionality. Some of the connectors have tape on them to prevent accidental shorts.
Final placement of circuilt board.
All wired up (first angle).
All wired up (top view).
As finally wired, the ports had the following associations (my schematic is out of date in this respect):
P ·0 (Output) Low = LED Green-1 on, High = off (approx 6mA per LED)
P· 1 (Output) Low = LED Green-2 on, High = off
P··2 (Output) Low = LED Yellow-1 on, High = off
P· 3 (Output) Low = LED Yellow-2 on, High = off
P··4 (Output) Low = LED Red-1 on, High = off
P··5 (Output) Low = LED Red-2 on, High = off
P· 6 (Input) Low = Alarm wire has been touched/latched.
P· 7 (Output) Low puts PIN 6 into 'latch' mode. High puts PIN 6 into 'pass through' mode (and resets latch).
P· 8 (Input) Low = Green post sensor
P· 9 (Input) Low = Red post sensor
P 10 (Input) Low = Reset/mute button pressed
P 11 (Input) Low = "Hard" position on mode switch.
P 12 (Input) Low = "Easy" position on mode switch.
P 13 (Output) High = Buzzer on (approx 10mA)
P 14 (Output) Low = Green, High = Red or off
P 15 (Output) Low = Red, High = Green or off
Enjoy·the pictures·(Click on the pictures to enlarge)
This is the finished game. The Wand (black) is tied to ground. The wire connecting the red and green posts is the "alarm" wire, and when touched, drives S in an S-R latch. The Red/Green posts have·sensors which are the goals (your aim is to touch this wire, but not the alarm wire). The box that contains the·electronics has 6 front LED's for fancy light chases etc. There's a side 2-color LED·to indicate power/status. A buzzer for audio feedback. A three-way switch (on-off-on) is used to set game modes, and a push-button switch next to the buzzer for buzzer mute / game reset. Finally there's a power switch at back, and the 9-pin programming port.
Schematic for the game. Each input wire is protected by a resistor to prevent accidental shorts. Each output-to-LED wire has a current limiting resistor. The BS2 package has a 50mA sink limit on the first 8 ports, and another 50mA sink limit on the second 8 ports. This means you don't want to drive more than 6 LED's on a given group of 8 ports (with 470-ohm resistors).
I used a 74HCT02·(quad nor) to create a modified S-R latch. '/S' is driven low when the wand touches the main wire. 'R' determines if the value is monitored (high), or has a latching behavior (low). A 74HCT00 (quad nand) can be configured to provide the same functionality and only requires 3 gates. However I had a 74HCT02, and not a 74HCT00 at hand.
This is the top-side of the circuit. I used a marker to mark where components would go, but changed things a little during final placement.
The underside. Not a soldering job I'm proud of [noparse]:([/noparse].
The box. LED's at top for effects. LED on right is 3-color. Switches on bottom are for power and mode. 9-pin serial connector on bottom for programming. Buzzer on left along with a press button for reset/mute functionality. Some of the connectors have tape on them to prevent accidental shorts.
Final placement of circuilt board.
All wired up (first angle).
All wired up (top view).
As finally wired, the ports had the following associations (my schematic is out of date in this respect):
P ·0 (Output) Low = LED Green-1 on, High = off (approx 6mA per LED)
P· 1 (Output) Low = LED Green-2 on, High = off
P··2 (Output) Low = LED Yellow-1 on, High = off
P· 3 (Output) Low = LED Yellow-2 on, High = off
P··4 (Output) Low = LED Red-1 on, High = off
P··5 (Output) Low = LED Red-2 on, High = off
P· 6 (Input) Low = Alarm wire has been touched/latched.
P· 7 (Output) Low puts PIN 6 into 'latch' mode. High puts PIN 6 into 'pass through' mode (and resets latch).
P· 8 (Input) Low = Green post sensor
P· 9 (Input) Low = Red post sensor
P 10 (Input) Low = Reset/mute button pressed
P 11 (Input) Low = "Hard" position on mode switch.
P 12 (Input) Low = "Easy" position on mode switch.
P 13 (Output) High = Buzzer on (approx 10mA)
P 14 (Output) Low = Green, High = Red or off
P 15 (Output) Low = Red, High = Green or off
Comments
Well done
Jeff T.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
·