lectronic Construction

electronic
game
project


About the project
This years electronic construction project is an electronic game, which has 4 LEDs and 4 buttons. It can either be used as a memory game or as a reactions game

Electronic projects
In order to record the information about an electronic circuit, you need several different things:

Schematic diagram

How it works
A set of three resistors is used to make up a potential divider. As each of the resistors is the same value the amount of voltage across each of these resistors will be the same. The top two resistors also have a switch across them. When the switch is pressed the voltage across the resistor will become zero. So depending upon which of the two switches is pressed will depend upon what the voltage is at the point where it is fed into the PIC micorcontroller. The third resistor is used to prevent the batteries being rapidly flattened should both switches be pressed at the same time. The other two switches on the board work in the same way.

The microcontroller is a small computer, the switches are connected to an analogue to digital converter so that it gets a digital representation of the voltage on the input. From this it is able to work out which button is pressed. This may sound overly complicated however it uses less input pins than a switch with pull up resistor.

The LEDs are driven by three outputs. Because the LED only works when current flows through it in one direction the four LEDs can be turned on by changing the outputs to make one high, whilst another is low. More than one LED can be turned on if a little dimmer by taking it in turns to turn the LEDs on hundreds of times a second.

PCB layout

Parts list
PCB Ref(s) Description Quantity
R1 - R7 680R resistor7
R8 47R resistor1
IC1 PIC 12F675 (microcontroller)
8 pin DIL socket
1
1
LED1 5mm Yellow LED1
LED2 5mm Green LED1
LED3 5mm Orange LED1
LED4 5mm Red LED1
SW1 - SW4Push button switch4
SW5 Rt angled switch1
Conn1 x2 AA battery pack1

Operating instructions

Memory game
  • The LEDs will flash a sequence. Simply copy this sequence.
  • If you get it correct the LEDs will quickly flash in turn, before the sequence is shown again with an extra LED on the end.
  • When you do get it wrong the LEDs quickly flash in turn three times then your score is shown. The more LEDs you light the better you have done!
Reactions game
  • After a random amount of time one of the four LEDs will be illuminated. Simply press the button next to the LED.
  • If you have pressed the button fast enough then LEDs will quickly flash in turn, to show your still in the game.
  • A short while later a new LED will turn on, but you have less time to press the button to stay in the game.
  • When you don't manage to press the LED fast enough the LEDs quickly flash in turn three times then your score is shown. The more LEDs you light the better you have done!

Back to electronic construction index