Hardware Components
Penny insertionThe penny detector uses an opto-interruptor. Prior to penny insertion, IR light shines, output is low. When a penny is inserted and breaks the beam, output is high. Requires (1) Opto-interruptor and (2) Schiff-trigger inverter.
|
Start Light LEDStart Light LED is controlled by a N-channel transistor, when we output a high to the pin, transistor is on, LED light is on, on the other hand, the LED is off. Requires (1) Red LED with screw and (2) N-channel transistor
|
Start ButtonAfter the player inserts a penny, the program waits for the start button before game execution. When the switch button is closed, input to the designated pin is high, and the game begins. Requires a SPST Momentary button
|
Evilness factorThe Evil Fisherman tries to block the player from feeding the fish. The player can adjust the speed of the Fisherman by turning a dial (potentiometer). The A/D will read the input and output a proportional PWM duty cycle to control the Fisherman’s DC motor speed. Requires a 10k Potentiometer
|
Evil FishermanThe Evil Fisherman tries to block the player from feeding the fish. The player can adjust the speed of the Fisherman by turning a dial (potentiometer). The A/D will read the input and output a proportional PWM duty cycle to control the Fisherman’s DC motor speed. Requires a Regular DC Motor
|
Fish Food DetectorWithin the mouth of each fish, an IR-LED and an IR photo-transistor will detect when the fish are fed. The food’s entrance will break the IR beam, and send a high signal to the designated pins. This circuit is much like the penny insertion detector, except that we are not using opto-interruptors here. Requires (1) IR LED, (2) IR Photo-transistor, (3) Op-Amp, (4) Schiff-trigger inverter
|
Fish Eye LightingA shift register will control the lighting of each fish’s eye LED. (6 LEDs) The shift register uses 3 pins—for CP, MR, and DS1. DS2 will be pulled up to +5V. Requires (1) Large Green LED and (2) 8-bit Shift Register
|
Score DisplayTwo 7-segment LEDs will display the score. A shift register will control each LED display. Each shift register uses 3 pins—for CP, MR, and DS1—so we will use a total of 6 pins for the scoreboard. DS2 will be pulled up to +5V. Requires (1) Seven Segment LED and (2) 8 bit Shift Register for each
|
Sound EffectsThe fish will say to the player, “I love you!” every time a hungry fish is fed. Using Build-A-Bear’s sound module, we are able to turn the sound on or off with a single output pin. Requires a Built-in Sound Board--“I Love You! I Love You!”
|
Gift DispenserThe gift dispenser uses a servo motor to control the dispensing gate. If the player has collected enough points by the end of the game, the gate will turn 90 degrees for 1 second, release the gift, and turn back to default position. Requires a Servo Motor
|
C32 Microprocessor Pin Usage
C32 Board |
|||
No Connect |
1 |
28 |
No Connect |
(X) Port E0 |
2 |
27 |
AD0
<penny detection> |
(X) Port E1 |
3 |
26 |
AD1
<score display> |
<score display> Port
T7 |
4 |
25 |
AD2
<score display> |
<score display> Port
T6 |
5 |
24 |
AD3
<fm evilness factor> |
<score display> Port
T5 |
6 |
23 |
AD4
<start light> |
<score display> Port
T4 |
7 |
22 |
AD5
<fish lighting> |
<start button> Port T3 |
8 |
21 |
AD6
<fish lighting> |
<evil fisherman>
PortT2 |
9 |
20 |
AD7
<fish lighting> |
<sound player> Port T1 |
10 |
19 |
M5
<fish feed detection> |
<gift dispense> Port
T0 |
11 |
18 |
M4
<fish feed detection> |
<fish feed detection>
PortM0 |
12 |
17 |
M3
<fish feed detection> |
<fish feed detection>
PortM1 |
13 |
16 |
M2
<fish feed detection> |
GND |
14 |
15 |
GND |
Purpose |
Implementation |
Dir |
Qty |
Pin |
Penny insertion |
Opto-interruptor |
Input |
1 |
AD0 |
Start button |
Push-button
switch |
Input |
1 |
T3 |
Start light |
One LED |
Output |
1 |
AD4 |
Fish feed
detection |
IR detection |
Input |
6 |
M0 ~ M5 |
Fish lighting |
Ultra-bright LEDs |
Output |
3 |
AD5, AD6, AD7 |
Score board |
7-segment LEDs |
Output |
6 |
T4 ~ T7, AD1,
AD2 |
Sound effect |
Build-A-Bear
sound card |
Output |
1 |
T1 |
Evil Fisherman |
PWM output to DC
motor |
Output |
1 |
T2 |
Evilness factor |
Analog input
controlled by a pot |
Input |
1 |
AD3 |
Gift dispense |
PWM output to
servo motor |
Output |
1 |
T0 |
|
|
|
|
|
Total Pin Usage |
22 pins |
Bill of Materials
Item no. |
Item |
Function |
Qty |
Unit Price |
Subtotal |
1 |
Shift register |
Score display, fish lighting |
3 |
$0.39 |
$1.17 |
2 |
1/2" x 18" x 30" MDF Sheet |
Game frame |
1 |
$3.50 |
$3.50 |
3 |
24x36 in. Masonite Panel |
Game frame |
2 |
$6.12 |
$12.24 |
4 |
20x30 in. Black on Black Foamboard |
Game frame |
1 |
$4.48 |
$4.48 |
5 |
4x6 in. polycarbonate tube, 1/8" thickness |
Candy Dispenser |
1 |
$8.00 |
$8.00 |
6 |
Build-A-Bear sound circuit |
"I love you" sound |
1 |
$5.00 |
$5.00 |
7 |
LIGITEK LSD5051-11 7-segment LED |
Score |
2 |
$0.89 |
$1.78 |
8 |
Push-button switch |
Game initiator |
1 |
$2.50 |
$2.50 |
9 |
2N7000 MOSFET |
Sound |
1 |
$0.25 |
$0.25 |
10 |
100k resistor |
Start button, sound, penny detection, feed detection |
10 |
$0.01 |
$0.10 |
11 |
33k resistor |
Start button, feed detection |
7 |
$0.01 |
$0.07 |
12 |
100 resistor |
Score, penny detection |
17 |
$0.01 |
$0.17 |
13 |
330 resistor |
Fish lighting, start button |
7 |
$0.01 |
$0.07 |
14 |
470 resistor |
Feed detection |
6 |
$0.01 |
$0.06 |
15 |
10k resistor |
Feed detection |
6 |
$0.01 |
$0.06 |
16 |
4M resistor |
Feed detection |
6 |
$0.04 |
$0.24 |
17 |
Molex 6-pin female |
All circuitry |
6 |
$0.15 |
$0.90 |
18 |
Molex 6-pin male |
All circuitry |
6 |
$0.70 |
$4.20 |
19 |
Molex 2-pin female |
All circuitry |
12 |
$0.06 |
$0.72 |
20 |
Molex 2-pin male |
All circuitry |
12 |
$0.05 |
$0.60 |
21 |
OPB860T55 slotted optical switch |
Penny detection |
1 |
$0.89 |
$0.89 |
22 |
MM74HC14M inverter |
Penny detection, feed detection |
7 |
$0.10 |
$0.70 |
23 |
Normal LEDS red |
Start light |
1 |
$0.10 |
$0.10 |
24 |
Bright LEDs green |
Fish lighting (eyes) |
6 |
$0.10 |
$0.60 |
25 |
LM339 comparator |
Feed detection |
6 |
$0.10 |
$0.60 |
26 |
LTR-3208E Photo NPN |
Feed detection |
6 |
$0.25 |
$1.50 |
27 |
LTE-5208 IR LED |
Feed detection |
6 |
$0.10 |
$0.60 |
28 |
Potentiometer 10k |
Evilness factor |
1 |
$0.85 |
$0.85 |
29 |
Knob for pot |
Evilness factor |
1 |
$2.00 |
$2.00 |
30 |
IRLZ34N PMOSFET |
Evil Fisherman |
1 |
$0.80 |
$0.80 |
31 |
HN-GH12-1345T 12V DC motor |
Evil Fisherman |
1 |
$12.00 |
$12.00 |
32 |
1ft wooden dowel |
Evil Fisherman |
1 |
$2.00 |
$2.00 |
33 |
Electrical wires 1-foot length |
All circuitry |
60 |
$0.10 |
$6.00 |
34 |
|
Game play |
1 |
$15.00 |
$15.00 |
35 |
HiTech HS-311 6V servo motor |
Gift Dispenser |
1 |
$16.00 |
$16.00 |
36 |
4.25" OD, 1/8" thickness, 5" length PVC |
Fish feed reception tube |
6 |
$1.50 |
$9.00 |
37 |
2" OD, 1/8" thickness, 1.5" length PVC |
Fish feed reception tube |
6 |
$1.50 |
$9.00 |
|
|
|
|
|
|
|
|
|
|
TOTAL |
$123.75 |