Simon Says Game

Introduction

Remember those times before you could just download an app and have almost any game under the sun? This month’s kit is an electronic classic: A DIY Simon Says Game, complete with audio. Push your memory to the limits and see how far you can go to imitate the machine in this memory game!

 

20150901_151723

Overview

In this project, we will be using LEDS, buttons, a piezo buzzer, and a microcontroller to recreate a classic memory game. This is just one of the uses of the microcontrollers that have been showing up in your kit lately. Whenever you want a small, dedicated device that serves one use well, it’s a microcontroller to the rescue. Here, this ATMega8 is programmed to generate a random sequence of buttons for you to press and you interact with it via the push buttons. It records your presses and if you succeed it blinks a victory pattern into the LEDS. If you fail, it plays a defeat tone.

By the end of this project, you’ll have a neat portable game that you can take on the go, similar to the Gaming Kit, except this kit should be simpler to complete. There is not as much intricate soldering that you have to do, so let’s jump right in!

As always, the forums are a great place to post any issues you may have.

Materials

Here are the items you’ll need:

Tools you will need

  • Soldering Iron with Solder
  • Wire Cutter
  • Wire Stripper

Tools that will help

  • Helping Hands

Beginner

  • 2 x 5x7cm PCB
  • 1 x Small Speaker
  • 1 x Battery Holder (3 x AA)
  • 1 x 28-Pin IC Socket
  • 1 x Pre-programmed ATmega8-16PU Microcontroller
  • 1 x 16MHz Crystal Oscillator
  • 4 x Large Pushbuttons
  • 4 x #4-40 Machine Screw (1″)
  • 4 x #4-40 Hex Nut
  • 4 x Nylon Spacer (5-3-19)
  • 2 x 22pF Ceramic Capacitor
  • 1 x 10K Resistor
  • 1 x 100 ohm Resistor
  • 1 x Slide Switch
  • 1 x 5mm Red LED
  • 1 x 5mm Yellow LED
  • 1 x 5mm Blue LED
  • 1 x 5mm Green LED

Hobbyist

  • 2 x 5x7cm PCB
  • 1 x Small Speaker
  • 1 x Battery Holder (3 x AA)
  • 1 x 28-Pin IC Socket
  • 1 x Pre-programmed ATmega8-16PU Microcontroller
  • 1 x 16MHz Crystal Oscillator
  • 4 x Large Pushbuttons with built-in LEDs
  • 4 x #4-40 Machine Screw (1″)
  • 4 x #4-40 Hex Nut
  • 4 x Nylon Spacer (5-3-19)
  • 2 x 22pF Ceramic Capacitor
  • 1 x 10K Resistor
  • 1 x 100 ohm Resistor
  • 1 x Slide Switch

20150901_151723

 

Beginner Assembly Instructions

1 Buttons)  We’ll begin by making a frame for the rest of our components with the large buttons.  Keep in mind your buttons will be bigger, but the pin positions will be the same.

step1a

A) First insert each of the large pushbuttons into the board as shown. Be sure to leave room for other components, things will soon get tight.

step1b

B) The buttons will be soldered here, your board should look like the picture.

2 LEDs)  .

step2a

A) Place each of the LEDS into the board, I kep mine slighly elevated off the front of the board so that they rested nicely on the buttons. Feel free to change the position of the colors. Make sure the long ends (anode) of the LEDs are on the right.

step2b

B) The LEDs can be soldered in to hold them in place.

 .

step3a

A) Next, add the 28-pin IC socket.

step3b

B) And solder these connections.

 .

step4a

A) Both of your 22pF capacitors can go in next, notice that they are sharing a hole.  These pins of the capacitors will be soldered together.  Your Capacitors will be smaller than shown in the picture

step4b

B) Notice the hole that the capacitors shared.  Through this hole, they will be electrically connected.  Go ahead and solder the connections.

 .

step5.5a

A) Next we will be adding the 16MHz crystal.  There should be enough room on your board to fit these components in nicely like in the picture.

step5b

B) The underside of the board, where the pins of the crystal will go.

 .

step5.5a

A) Next, we will be soldering the crystal to the capacitors.  No other components are added to the board in this step.

step5.5b

B) One technique is to bend the legs of the crystal across to meet the capacitors and then solder them together as shown.

 .

step6a_fixed

A) Now we will be adding the resistor for the LEDs as shown.  We will be using one resistor for 2 LEDs.  One of the legs of the resistor goes in the hole right next to the LED to make soldering a bit easier.

step6b_fixed

B) For now we will leave the resistors unconnected to the LEDs.

 .

step7a_fixed

A) Your board will now look similar to this.  No other external components are added in this step.

step7b_fixed

B) We can now connect the LEDs to each other and to the resistor via a black wire for ground.  These are the shorter leads (-) of the LED that are being connected to each other for ground.  The top LEDs will go through a resistor.

 .

step8b_fixed

A) Next we will be adding a rail for ground.  This wire gets soldered onto the other end of the resistors as shown.

 .

step9a_fixed

A) Now we are adding the speaker.  The speaker is non-directional, so it does not matter that we will be connecting red to ground.

step9b_fixed

B) The bottom of the speaker is soldered on.

 .

step10a_fixed

A) The on/off switch is added to the right side of the circuit in the second-to-last column of the board.

step10b_fixed

B) That completes all of the components we will be adding except for the battery pack, which we will save for last.

 .

step11b_fixed

A) Let’s now begin soldering all of the connections together.  Start with connecting the left push button to the right one.  Then, connect the right button (looking from the bottom) to ground.

 .

step12b_fixed

A) Let’s finish wiring the LEDs by connecting each of the positive leads to a pin on the microcontroller.  It is helpful to use a different colored wire for this.

 .

step13b_fixed

B) Now we will finish connecting each of the buttons.  Each of the buttons gets their own pin on the microcontroller.

 .

step14b_fixed

A) In this step, we are connecting the crystal + capacitors to the pins on the microcontroller.  Be careful to not include the middle pin shared by the capacitors in your connection.

 .

step15b_fixed

A) Now we are connecting the speaker to pin 4 of the microcontroller.  Again, the colors of the speakers wires might be different, but as long as one end goes to ground and the other goes to the microcontroller, it’s okay.

 .

step16b_fixed

A) Add the battery pack to the switch as shown.  Then, the middle pin of the switch gets connected to the microcontroller’s 7th pin (refer to the picture). We will also attach ground to the microcontroller’s pins.  The ground wire between the bottom LEDs was moved for a better view of the penultimate connections.

 .

step17b_fixed

B) Finally, complete the circuit by adding a 10k resistor to the microcontroller’s pin 1.  Then, solder the other end to the same middle pin of the slide switch for power.  The circuit is complete!

 .
20150714_123830

A) Here is my completed circuit with the battery pack.

 .

20150901_152008

A) Now we will be sandwiching the battery pack between two PCB’s to make it a more complete system.  Place all 4 of your screws into the top of your PCB and be careful not to break any of the wires you soldered on.

20150714_124155

A) With the screws all in the other PCB, screw the hex nuts into place, securing your kit together.

 

20150901_151859

A) A top view of the finished product!  Your kit will have green, red, blue, and yellow LEDs, slightly different from the picture.


Hobbyist Assembly Instructions

1 Buttons)  We’ll begin by making a frame for the rest of our components with the large buttons.  Keep in mind your buttons will be bigger, but the pin positions will be the same.  The LEDs are built into these buttons and for some reason, the red marking on the LED pin indicates GND. We will be orienting this end upwards in our circuit.

SS_H_step1a

A) First insert each of the large pushbuttons into the board as shown. Be sure to leave room for other components, things will soon get tight. Remember that the red markings on the button are on top.

SS_H_step1b

B) The buttons will be soldered here, your board should look like the picture.

2 IC Socket)  .

 

SS_H_step2a

A) Next, add the 28-pin IC socket.

SS_H_step2b

B) And solder these connections.

 .

SS_H_step3a

A) Both of your 22pF capacitors can go in next, notice that they are sharing a hole.  These pins of the capacitors will be soldered together.  Your Capacitors will be smaller than shown in the picture

SS_H_step3b

B) Notice the hole that the capacitors shared.  Through this hole, they will be electrically connected.  Go ahead and solder the connections.

 .

SS_H_step4a

A) Next we will be adding the 16MHz crystal.  There should be enough room on your board to fit these components in nicely like in the picture.

SS_H_step4b

B) The underside of the board, where the pins of the crystal will go.

 .

SS_H_step5b

A) Next, we will be soldering the crystal to the capacitors.  One technique is to bend the legs of the crystal across to meet the capacitors and then solder them together as shown.

 .

SS_H_step6a

A) Now we will be adding the resistors for the LEDs and the microcontroller as shown. The 100 ohm resistor goes to the LEDs and the resistor by the microcontroller is 10k ohms. 

SS_H_step6b

B) For now we will leave the resistors unconnected.

 .

SS_H_step7a

A) Let’s now add the final two components – the slideswitch and the speaker.

SS_H_step7b

B) Here is a picture of the underside of the board before we begin connecting things together.

 .

SS_H_step8a

A) This is all we’re adding to the top of the board, so this is the last version of the top of the board.  Go ahead and double-check your connections and make sure everything is how you want it to look like in the final version.

SS_H_step8b

B) Let’s now begin soldering all of the connections together.  Next we will be adding a rail for ground and connecting the LEDs (-) lead to ground.  Remember this is the side of the button with the red marking.  Use the bare copper wire in your kit for the ground rail (long wire on the right) since we will be soldering other wires to this in the future.  Only the top LEDs have a resistor connecting them to ground.

SS_H_step9b

A) Continue with connecting the left push button to the right one.  Then, connect the right buttons (looking from the bottom) to ground.

 .

SS_H_step10b

A) Let’s finish wiring the LEDs by connecting each of the positive leads to a pin on the microcontroller.  These are the first wires that we are putting on that won’t be going to ground.  We’ll be using yellow wires here to distinguish them.

 .

SS_H_step11b

B) Now we will finish connecting each of the buttons.  Each of the buttons gets their own pin on the microcontroller.

 .

SS_H_step12b

A) In this step, we are connecting the crystal to the pins on the microcontroller.  The shared hole of the capacitors goes to ground.  Again, the wires that are blue in the picture should have a short enough distance for you to just bend the legs of the crystal to connect that onto the microcontroller (if you haven’t snipped it off by now).

 .

SS_H_step13b

A) Now we are connecting the speaker to the micrcontroller.  One of the leads goes to pin 4 on the micrcontroller, the other goes to ground.  Again, it doesn’t really matter which speaker lead you use for ground.

 .

SS_H_step14b

A) Add the battery pack to the switch as shown.  Then, the middle pin of the switch gets connected to the microcontroller’s 7th pin (refer to the picture).  Leave room on the switch, we’ll be adding one more thing onto the middle pin.

SS_H_step15b

B) Next, solder the 10k resistor to pin 1 of the microcontroller and then the other end to the middle pin of the slideswitch.

 .

SS_H_step16b

B) Finally, complete the circuit by soldering pins 8 and 21 of the microcontroller to ground.  We’re now done with the circuit!

 .
20150901_152149

A) Here is my completed circuit with the battery pack.

 .

20150901_152130

A) Now we will be sandwiching the battery pack between two PCB’s to make it a more complete system.  Place all 4 of your screws into the top of your PCB and be careful not to break any of the wires you soldered on.

20150901_151745

B) Slide the nylon spacers onto each of the screws, and screw the hex nuts into place. Voila! Your kit is secured together.

20150901_151729

B) A side view of my kit.

 .

20150901_151723

A) A top view of the finished product!


20150901_151717

B) Now you can turn on the game and see how far you can go!


Resources

Arduino Code: (Authors: Robert Spann and digimike)
simon_says_audio
Schematic:

SimonSaysSchematic2.0


  • Richard

    If there is one led button not lighting but it does register when you push it does that mean the led is not working? i have the hobbyist kit

    • David Fries

      The LED and push button are together in the same part, but are electrically independent, that one function is working or not doesn’t imply anything about the other function. You can use your multimeter to see if the LED is getting power and that one side is grounded.
      When it is off the diode test for the multimeter should light it up (it does for me). Did you test the LEDs before you installed them?

    • Tommy Riffe

      Check the pins on your led button that they are going though to your solder connection that’s what I had to do I ran a same wire to the button on the front then the back then it worked for me

  • Kevin

    That was a fun and easy project. the games are awesome

  • Tommy Riffe

    How do I test the LED buttons my bottom 2 do not flash

    • Tommy Riffe

      But every thing else works fine

    • Tommy Riffe

      Fixed it

  • David Galloway

    I am having an odd problem. The green LED is only partially lit. I have checked it out with a continuity tester and it is connected ok and I rechecked the whole board and I can’t find anything I missed. Any ideas?

    • David Fries

      It sounds like the green is much dimmer than the others? The kit instructions have green and red on top connected through a resistor, is that the way you have it wired? Is it always dim or is it only when all the LEDs are on?

      • David Galloway

        Yes the green is top left and the only one with the resistor. I tested all the LEDs and I am thinking the green is just not as bright as the rest of the LEDs. Everything works great and I checked everything twice under 5x magnification and I don’t see any I missed and then had a friend check it for me too. A fresh set of eyes and he couldn’t find anything wrong either. So I am going with it just isn’t as bright as the rest. I could see if kip will send me another green and see if that is the case. Thanks. Oh yes it is the same brightness regardless if all are lit or just that one. Thanks David.

        • Joshua Post

          Happen to have a small coin battery you could test directly on the leds to see if it truly is dimmer or has something to do with your wiring?

          • David Galloway

            Yes I did try that except with my lab power supply set at 2.6 volts 20ma and only the green was dim. The red, blue, yellow were nice and bright. So I am thinking the LED? Has anyone else noticed this or had this happen to them? Thanks for helping.

          • Dly736

            I just made the kit today and i just so happens that my green LED button is also a lot more dim than the others. Please let me know if you find a solution

          • David Galloway

            I have put two of the Simon kits together and both kits the green LEDs are much dimmer them the others. I think it is the properties of the green LED. I tested all LEDs before I put them in the kit and it was still much more dim then the other ones.

          • David Fries

            I did a breadboard test on the LEDs in my kit, 32 mA going through the Green LED and 6.6 mA through the Yellow LED and found the Yellow clearly outshining the Green even though Green was taking much more current (332 Ohm and 50 Ohm resistors using 4.1 V for power). I sent off an e-mail, I’ll report back when I hear something.

          • David Fries

            The original designer was seeing the same problem with the green LED being dimmer than the rest. It’s unexpected, but that just seems to be the way it is for green. You haven’t done anything wrong if green comes out more dim than the rest.

  • David Fries

    I took apart both a Green and a Blue LED Push Button from the hobbyist kit seeing if I could tell why the Green LED is so much dimmer than the others. I was hoping that maybe something in the push button part wasn’t letting the light out, but no, it is the LED, it takes more current and puts out less light than the others. I tested it with the multimeter diode and 3 AA batteries (making 4V) and a 330 Ohm resistor, comparing both the green and blue outside of the push button case.

    For those who are curious, here’s a breakout of what’s in the push button. There’s the colorful lens and white plastic covering the top, the LED which rests inside pointing up, a piece to hold the LED in place and push on the dome, a metal dome, and the base. The metal dome when pressed makes contact between the outside and the middle, which are connected to the leads in the base.

    The remaining images are using the multimeter’s diode test, which is to say not a lot of current. The two similar pictures are one second exposures one green one blue, the green is barely on.

    For my kit I put a separate resistor for each LED which let me reduce the current and brightness for the other LEDs to help balance them out. Green is still more dim, but it isn’t glaringly obvious now.

    Here’s the resistors I used and calculation for resulting current draw. (Vcc – LED forward voltage) / resistance = current. The forward voltages are values I found, they aren’t specific to these parts.

    red 2Vf, 510 Ohm, 5.8 mA

    green 3.2Vf, 150 Ohm, 12.0 mA

    blue 3.1Vf, 1500 Ohm, 1.27 mA

    yellow 2.1Vf, 510 Ohm, 5.7 mA

  • David Fries

    Here’s a video of my kit. At the end of the video I give a couple suggestions for how to mount the LED Push Buttons better on the perfboard (for those with the Hobbyist kit). I also show what you can do with an extra three resistors, two diodes, the right cable, and some software.

    • Joshua Post

      Amazing work. Great improvements and the tip at the end about the push button modification is a great idea.

  • I’ve been missing kits for quite a while, and after emailing support and messing kipkay on facebook, both of which said they’d send the kits out, it’s been months without any further replies and still no kits that have been paid for. What going on, what does one have to do around here get some service?

  • Pingback: Best Writing Service()

  • Pingback: Best Writing Service()