ELECTRICAL MECHANICAL SOFTWARE PARTS LIST REFLECTIONS TEAM
Electrical Systems
This page details the electrical systems of the game.
   - Sensing
   - Elevator
   - Motor Driver
   - Scoreboard


Sensing
The game required several sensors: ones mounted in each hole to detect when a ball went through, and one on the ball return path to let the Handy Board know when a ball entered the ball return cup so the Handy Board could start the motor. We initially were planning on using emitter-detector pairs, and when the ball rolled between the pair it would trigger a voltage we would read. However, we found that the phototransistors responded to any light, not just the infrared light from the emitter, so unless we could isolate the pair from ambient light, we could not use them. Consequently we decided to just use the photo reflector components in the lab, which worked very well. The circuit we used is shown below:
As you can see it was a very simple circuit, and it worked well. When a ball rolled in front of the photoreflector, we read a voltage on the signal line on the Handy Board. The Handy Board could then inrease the player's score. The same sensor was placed on the ball return path, right before the ball entered the cup on the return arm. When this sensor was tripped, the Handy Board knew the ball was out of play, and would then initiate the ball return motor.

Elevator
The elevator raised and lowered the launcher shaft. Each button, up and down, consisted of a pair of switches. When one set was pressed, the motor driving the elevator would receive GND and +5V, and when the other pair was pressed, the signals were reversed, to drive the motor in the other direction. The circuit that accomplished this is below:
When the top two switches were pressed, the red lead receives +5V, the black GND, raising the launcher. When the bottom two are pressed, they receive the opposite signals, and the motor runs in the other direction to lower the launcher.

Motor Driver
We ended up using a stepper motor to run the ball return arm (see mechanical section for more information on this part). However, we couldn't use the Handy Board motor outputs alone to drive it, because they can only supply about 9.6V and the motor required 12V to give full torque. Thus we had to essentially build another H-bridge circuit which was powered by 12V, took inputs from the Handy Board motor outputs, and outputted these signals to the motor. The circuit is below:
This circuit was soldered onto a printed circuit board.

Scoreboard
The scoreboard turned out to be much harder to implement than originally though. We used 7-segment displays to show the score, but each digit had to be driven separately. In order to drive the display, we used 74LS48 BCD to 7-segment decoders. These chips take as input a 4-bit binary number, then give as output the appropriate 7 signals for the displays to show the number. We used 74HC161 4-bit counters to drive the decoders. When the user scores, the Handy Board would send pulses to the counters to increase the value stored in the counter. This value was sent from the counter to the decoder, and the decoder sent out the appropriate signals to the 7-segment displays to show that number. A block diagram of this circuit is show below:
The actual scoreboard had 4 digits, but the other 2 were simply there to multiply the score by 100, and all we had to do was put in 2 7-segment displays with the appropriate pins connected to +5 to show 0. The Handy Board only ran the first two digits, which displayed 0 through 9.

We first prototyped this circuit on a breadboard, and after numerous attempts got it working properly. The amount of wiring it requires was one source of problems, because one misplaced wire and the circuit would not work as expected. Also, the counter inputs have to be eithe high or low, if they are floating they act erratically. Once we soldered the circuit onto a printed circuit board, it was working perfectly.

The CLK and CLR bits were connected to the Handy Board digital outputs. The Handy Board does not have actual digital outputs, but has 4 ports that can be configured as outputs, which we used. The program would send a pulse to the CLK pins to increment the counter. The CLK pin is edge-triggered, so it did not matter how long the pulse was, it would only increment when the signal went from low to high.

Unfortunately, we could not use the scoreboard along with the ball return mechanism. When the scoreboard was plugged in, the motor would suddenly become weaker, which would imply a current problem. Even if we powered the scoreboard from a 12V adapter plugged into the wall, the motor would still not give enough torque. Also, the digits would change whenever the motor ran, implying that the Handy Board just couldn't handle the current draw. Interestingly, the only part of the scoreboard plugged into the Handy Board were the inputs to increment and clear the counters, so these digital outputs must have been drawing some current even when they were off.