How the Simon Game works

CeladonPost2Image1
Here’s the circuit schematics for the Simon game’s input/output. We put four LEDs as output, and each LED was wired as an input as illustrated above. Transistors were used here for two reasons: we might have all four LEDs on at once, and transistors can handle all that current while the A3BU might not. Also, the LEDs from Adafruit ran on 12V, and the A3BU’s 3.3V would not light them. (We discovered that these LEDs have an integrated resistor, that’s why 12V doesn’t blow them up). The transistor can be connected to the ground side, and will switch fully on at 3.3V, completing the circuit through the LED to ground.

The project code is available at our github project repository.

Each PN2222 transistor has three pins: base, the one in the middle, the emitter, in this case the one with the arrow going to ground, and the collector, which is where the lamp is connected. The base has a 1 kΩ resistor which is there to protect the transistor from excess current, the lamp receives 12V and then is connected to the collector of the transistor. Each lamp consists of an LED and a resistor (the resistor is inside the LED). The lamp operates on 12V. When a voltage is applied across the leads of the Light Emitting Diode, the depletion zone of the diode shortens, and current flow is allowed. The LED emits light depending on how much voltage is applied, and therefore how much current is flowing. If a voltage of, say, 3.3 V is applied across the LED, a small current will flow, and the light will be very dim. In order to have the brightest, clearest illumination, we provided a full 12 V to the LED. We realize that in this configuration (RTL) the transistor gives the A3BU control over the lamp; if the 3.3V is set to ground (or disconnected) the lamp will not turn on, so it is basically a switch that is activated by the 3.3 V.