Buzz Wire with Score Counter

The good old buzz wire game, this time with score counter (as well as indicator lights).

Nov 12, 2019

45130 views

50 respects

Components and supplies

1

Buzzer

1

Shift Register- Serial to Parallel

1

7 Segment LED Display, Red

1

9V battery (generic)

1

5 mm LED: Red

10

Resistor 221 ohm

1

Arduino Nano R3

1

5 mm LED: Green

Tools and machines

1

Drill, Screwdriver

1

Soldering iron (generic)

Project description

Code

score_display.ino

arduino

game.ino

arduino

nervous_meter_score.ino

arduino

score_display.ino

arduino

game.ino

arduino

Downloadable files

Schematic

Just keep in mind the D10 getting connected to the 5V, will constitute a failure causing the buzzer to beep and counter to count. In the schematic there wasn't a way to show it. So build up your wires and structure accordingly :)

Schematic

Schematic

Just keep in mind the D10 getting connected to the 5V, will constitute a failure causing the buzzer to beep and counter to count. In the schematic there wasn't a way to show it. So build up your wires and structure accordingly :)

Schematic

Comments

Only logged in users can leave comments

tylerryan

a year ago

Hey behrooz66. I am trying to make this for a high school class but am struggling with the Schematics. Is there anyway you could take a series of photos of where everything goes underneath the board that we can't see. Or a very quick tutorial of how it is soldered together etc? It would make a huge difference for me. Cheers

generalgavs101

a year ago

behrooz66

generalgavs101

a year ago

MP should be connected to 5v?

generalgavs101

a year ago

Should the 7 segment indicator be with a common anode or cathode?

generalgavs101

a year ago

Are there any other changes to the layout?

generalgavs101

a year ago

where to connect the wire, when closed, the value of the counter changes

Anonymous user

2 years ago

Hi. I am wanting to do this project for shop class. I am fairly new to this all so looking for a bit of help. Can someone that had success creating this reach out to me please? I am willing to compensate for you time if needs be. To start I have two questions. What breadboard should we use? Will this shift register work? https://www.newark.com/nexperia/74hc595d/8-bit-sipo-siso-shift-register/dp/26M7771?MER=sy-me-pd-mi-alte Hopefully someone can help! Thanks in advance.

Anonymous user

2 years ago

Hello, I am new to all of this and I will make this for a school project but I cannot understand anything, can someone help me ASAP? What wires should I use? Should the wires be M-M or M-F? Also, will it be okay if I use a breadboard instead of a protoboard?

Anonymous user

2 years ago

@wayne021 @user1618881 @behrooz66 can you all please help me?

Anonymous user

2 years ago

Hi ! This simulation can be made in Proteus ?Thanks !

Anonymous user

2 years ago

I just have a question, im new to all this. Is the actual 'crooked' wire and the wire with a key chain connected to anything? if so where, im looking at the schematics and looking at the project but I can't seem to make the connections on where exactly they should go. Help??

Anonymous user

2 years ago

Yes, the crooked wire is connected to 5V and the key chain to D10. As soon as D10 reads HIGH, the buzzer goes off etc.

Anonymous user

2 years ago

I have a problem for the TOUCH pin I connect the direct wire of arduino but it does not recover the change of state.

Anonymous user

2 years ago

Fun!

Anonymous user

2 years ago

int latchPin = 3; // ST_CP [RCK] on 74HC595 int clockPin = 4; // SH_CP [SCK] on 74HC595 int dataPin = 2; // DS [S1] on 74HC595 const int STOP_LED = 6; const int GO_LED = 7; const int BUZZ = 8; const int TOUCH = 10; const int fail_threshold = 9; enum Status { STOP = 0, GO = 1 }; void setup() { Serial.begin(9600); displayInitialSetup(); gameInitialSetup(); } Status status = GO; int failCounter = 0; void loop() { while (failCounter > fail_threshold) { gameover(); } switch (status) { case GO: digitalWrite(GO_LED, HIGH); digitalWrite(STOP_LED, LOW); digitalWrite(BUZZ, LOW); if (digitalRead(TOUCH) == HIGH) { status = STOP; } break; case STOP: digitalWrite(GO_LED, LOW); failCounter++; if (failCounter > fail_threshold) break; displayDigit(failCounter); Serial.println(failCounter); failAlarm(); status = GO; break; } } byte seg_spin[6] = { B10000000, B01000000, B00100000, B00010000, B00001000, B00000100 }; void gameover() { for (int i=0; i<6; i++) { digitalWrite(BUZZ, HIGH); delay(5); digitalWrite(BUZZ, LOW); delay(50); digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, LSBFIRST, seg_spin[i]); digitalWrite(latchPin, HIGH); delay(10); } }

Anonymous user

2 years ago

``int latchPin = 3; // ST_CP [RCK] on 74HC595 int clockPin = 4; // SH_CP [SCK] on 74HC595 int dataPin = 2; // DS [S1] on 74HC595 const int STOP_LED = 6; const int GO_LED = 7; const int BUZZ = 8; const int TOUCH = 10; const int fail_threshold = 9; enum Status { STOP = 0, GO = 1 }; void setup() { Serial.begin(9600); displayInitialSetup(); gameInitialSetup(); } Status status = GO; int failCounter = 0; void loop() { while (failCounter > fail_threshold) { gameover(); } switch (status) { case GO: digitalWrite(GO_LED, HIGH); digitalWrite(STOP_LED, LOW); digitalWrite(BUZZ, LOW); if (digitalRead(TOUCH) == HIGH) { status = STOP; } break; case STOP: digitalWrite(GO_LED, LOW); failCounter++; if (failCounter > fail_threshold) break; displayDigit(failCounter); Serial.println(failCounter); failAlarm(); status = GO; break; } } byte seg_spin[6] = { B10000000, B01000000, B00100000, B00010000, B00001000, B00000100 }; void gameover() { for (int i=0; i<6; i++) { digitalWrite(BUZZ, HIGH); delay(5); digitalWrite(BUZZ, LOW); delay(50); digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, LSBFIRST, seg_spin[i]); digitalWrite(latchPin, HIGH); delay(10); } }

behrooz66

2 years ago

Just wondering why have you copy pasted code here?!

tariqfarooq543210

2 years ago

Hi Behrooz, i really liked your project, and i want to make the same one. I am new learner, and want to know, can this be done on the Arduino Uno with same code?

Anonymous user

2 years ago

Nice and fun project! I made it, the buzzer and the game are working fine, but the led count doesn't work... I replaced the 8 segment display by 8 leds with 220 Ohm resistors... Can you help ?

Anonymous user

2 years ago

It works! I just had to add 5V to the MR pin on the 74HC595! (I did change a bit the code so the leds shows a water mark) Very fun project, Many thanks!

behrooz66

2 years ago

Hi! Are you using a 74HC595 as well? Can you confirm that you are able to manage 8 LEDs using that 74HC595 (regardless of the game completely, just make sure you can actually control the 8 LEDs using that IC). If you can separate out that part and confirm the LEDs functionality, then it will be easy to just add that piece to the game later. Maybe look at this tutorial or something: https://www.arduino.cc/en/tutorial/ShiftOut

behrooz66

2 years ago

Hey buddy I'm so glad you got it working! Thanks for looking at my project :)

behrooz66

2 years ago

Also, I think the `OE` pin of the 74HC595 should also be connected to the ground, I might have missed it in my schematics.

Anonymous user

2 years ago

Hello, Behrooz66, Thanks for your reply. I condirm that the 74GC595 does support led as per the datasheet, But I just realized that the value of the resistors between ground and the leds must be 560 Ohm... or 470 as per the site you advised. I'll go on searching... I already grounded the OE pin; no change except that the led flash on power on...

Anonymous user

2 years ago

Hello I want to ask, how do you assemble all of the components? I am currently making this buzz wire with miss counter as my school project. Please answer me! @behrooz66

Anonymous user

2 years ago

Use wayne021's schematic, connect the copper wire to 5v and the ring/keychain to D10 and it should work. I am creating a 3D printed base for this right now, if you're interested I can share my design and my breadboard design. Will test it first.

Anonymous user

2 years ago

I just want to say thank you for responding to my question! I was confused but also Im interested in your design and breadboard design! and id like to see how you go about it.

Anonymous user

2 years ago

I need your guidance :)

Anonymous user

2 years ago

Hello man do you have a social media so I can contact you personally?

Anonymous user

2 years ago

This looks great. The link to the buzzer model # is broken - can you tell me the part you used? I am ordering for a class and don't want to make a mistake. Thanks!!

behrooz66

2 years ago

Hi, the buzzer can be any "5v Active Buzzer". You don't have to be super picky :)

Anonymous user

2 years ago

Hey! I want to do the same, only bigger. Can you help??

Anonymous user

2 years ago

Hi, this is a great project and looking forward to building it with the students at school. A couple of questions: your picture shows resistors to the segment display that are not in your circuit, assuming the photo is correct and 470 ohms? I also see someone talking about applying 5v to the MR pin that you have tied to ground. I would like to update the circuit so the kids can work from it completely through. Thanks for your help.

behrooz66

2 years ago

Hi Kevin. Yes the resistors seem to be absent from the diagram. My bad. But the ones I used are 220 Ohms. You can use almost any resistor, all the difference it makes is how shiny the LEDs will be. I think the MR should be connected to 5v. This should be something very easy to test though, if you have a 74HC595 hanging around.

Anonymous user

2 years ago

My mistake, I just assumed all connections were shown in this diagram, but obviously all the 74hc output pins are not connected to each other. Its just confusing because in other areas it is literal, but becomes incomplete in the segment area, good thing i didnt just pass it along to the kids without explanation.

Anonymous user

2 years ago

The schematic is confusing. So, you're saying that Q1 goes to pin 7, Q2 goes to pin 6, Q3 goes to pin 4, etc...? Where does Q0 connect?

Anonymous user

2 years ago

That confused me as well

Anonymous user

2 years ago

Q0-7, Q1-6, Q2-4, and so on down the line. Works great on mine,

Anonymous user

2 years ago

Nice project Sir , but how can I get double digits in counter .

Anonymous user

2 years ago

Hello, I have a student who would like to make this for a final project in class. I am not well versed on how to decode the schematic. Would you be able to provide a breadboard schematic or a picture of the bottom of the portoboard?

Anonymous user

2 years ago

Hello, where is connected segment display katode and anode? 1 to Q1 2 to Q2...

Anonymous user

2 years ago

Hello! I find a mistake in this code. In ‘game.ino’,there should be :pinMode(TOUCH,INPUT). Then delete digitalWrite(TOUCH, LOW). I has built this project on protues. Thanks for your share!

Anonymous user

2 years ago

would you give me the schematic

Anonymous user

2 years ago

It seems like two functions are missing. displayInitialSetup(); AND gameInitialSetup(); I am Using Arduino IDE 8.1.1 I got these error messages. Anyone else have this problem? In function 'void setup()': BareMinimum:20: error: 'displayInitialSetup' was not declared in this scope displayInitialSetup(); ^ BareMinimum:21: error: 'gameInitialSetup' was not declared in this scope gameInitialSetup(); ^ C:\\Users\\mcraf\\AppData\\Local\\Temp\\arduino_modified_sketch_554465\\BareMinimum.ino: In function 'void loop()': BareMinimum:53: error: 'displayDigit' was not declared in this scope displayDigit(failCounter); ^ BareMinimum:55: error: 'failAlarm' was not declared in this scope failAlarm(); ^ exit status 1 'displayInitialSetup' was not declared in this scope

Anonymous user

2 years ago

No. My mistake. Not paying attention to detail. Thanks.

Anonymous user

2 years ago

Has anyone used a common cathode 7 segment display? What change to the code would be needed?

behrooz66

2 years ago

I have included three code files, are you sure you have looked (and copied) through all three of them?

Anonymous user

2 years ago

hello I don't understand

Anonymous user

2 years ago

Hello were is cabled hook

Anonymous user

2 years ago

hello please give me updated schematic, I confused about wiring.

scr1p

3 years ago

Hey! I want to do the same, only bigger. Can you help??

Anonymous user

3 years ago

hello please give me updated schematic, I confused about wiring.

Anonymous user

4 years ago

Hi I was wondering if I can make this exact project with an Uno R3.Im new to arduino and I was wondering if I can make it

ranini

4 years ago

Hello were is cabled hook

Anonymous user

4 years ago

Hi. I am wanting to do this project for shop class. I am fairly new to this all so looking for a bit of help. Can someone that had success creating this reach out to me please? I am willing to compensate for you time if needs be. To start I have two questions. What breadboard should we use? Will this shift register work? https://www.newark.com/nexperia/74hc595d/8-bit-sipo-siso-shift-register/dp/26M7771?MER=sy-me-pd-mi-alte Hopefully someone can help! Thanks in advance.

Anonymous user

4 years ago

Hello, I am new to all of this and I will make this for a school project but I cannot understand anything, can someone help me ASAP? What wires should I use? Should the wires be M-M or M-F? Also, will it be okay if I use a breadboard instead of a protoboard?

Anonymous user

2 years ago

@wayne021 @user1618881 @behrooz66 can you all please help me?

Anonymous user

4 years ago

Hello! I find a mistake in this code. In ‘game.ino’,there should be :pinMode(TOUCH,INPUT). Then delete digitalWrite(TOUCH, LOW). I has built this project on protues. Thanks for your share!

Anonymous user

2 years ago

would you give me the schematic

Anonymous user

4 years ago

Hello I want to ask, how do you assemble all of the components? I am currently making this buzz wire with miss counter as my school project. Please answer me! @behrooz66

Anonymous user

2 years ago

I need your guidance :)

Anonymous user

2 years ago

Use wayne021's schematic, connect the copper wire to 5v and the ring/keychain to D10 and it should work. I am creating a 3D printed base for this right now, if you're interested I can share my design and my breadboard design. Will test it first.

Anonymous user

2 years ago

Hello man do you have a social media so I can contact you personally?

Anonymous user

2 years ago

I just want to say thank you for responding to my question! I was confused but also Im interested in your design and breadboard design! and id like to see how you go about it.

Anonymous user

4 years ago

I just have a question, im new to all this. Is the actual 'crooked' wire and the wire with a key chain connected to anything? if so where, im looking at the schematics and looking at the project but I can't seem to make the connections on where exactly they should go. Help??

Anonymous user

2 years ago

Yes, the crooked wire is connected to 5V and the key chain to D10. As soon as D10 reads HIGH, the buzzer goes off etc.

Bhaskar0336

5 years ago

Nice project Sir , but how can I get double digits in counter .

Anonymous user

5 years ago

Hi ! This simulation can be made in Proteus ?Thanks !

Anonymous user

5 years ago

I have a problem for the TOUCH pin I connect the direct wire of arduino but it does not recover the change of state.

Anonymous user

5 years ago

Hello, where is connected segment display katode and anode? 1 to Q1 2 to Q2...

Anonymous user

5 years ago

Fun!

Anonymous user

5 years ago

Hello, I have a student who would like to make this for a final project in class. I am not well versed on how to decode the schematic. Would you be able to provide a breadboard schematic or a picture of the bottom of the portoboard?

Anonymous user

5 years ago

My mistake, I just assumed all connections were shown in this diagram, but obviously all the 74hc output pins are not connected to each other. Its just confusing because in other areas it is literal, but becomes incomplete in the segment area, good thing i didnt just pass it along to the kids without explanation.

Anonymous user

2 years ago

The schematic is confusing. So, you're saying that Q1 goes to pin 7, Q2 goes to pin 6, Q3 goes to pin 4, etc...? Where does Q0 connect?

Anonymous user

2 years ago

That confused me as well

Anonymous user

2 years ago

Q0-7, Q1-6, Q2-4, and so on down the line. Works great on mine,

Anonymous user

5 years ago

Hi, this is a great project and looking forward to building it with the students at school. A couple of questions: your picture shows resistors to the segment display that are not in your circuit, assuming the photo is correct and 470 ohms? I also see someone talking about applying 5v to the MR pin that you have tied to ground. I would like to update the circuit so the kids can work from it completely through. Thanks for your help.

behrooz66

2 years ago

Hi Kevin. Yes the resistors seem to be absent from the diagram. My bad. But the ones I used are 220 Ohms. You can use almost any resistor, all the difference it makes is how shiny the LEDs will be. I think the MR should be connected to 5v. This should be something very easy to test though, if you have a 74HC595 hanging around.

Anonymous user

5 years ago

It seems like two functions are missing. displayInitialSetup(); AND gameInitialSetup(); I am Using Arduino IDE 8.1.1 I got these error messages. Anyone else have this problem? In function 'void setup()': BareMinimum:20: error: 'displayInitialSetup' was not declared in this scope displayInitialSetup(); ^ BareMinimum:21: error: 'gameInitialSetup' was not declared in this scope gameInitialSetup(); ^ C:\\Users\\mcraf\\AppData\\Local\\Temp\\arduino_modified_sketch_554465\\BareMinimum.ino: In function 'void loop()': BareMinimum:53: error: 'displayDigit' was not declared in this scope displayDigit(failCounter); ^ BareMinimum:55: error: 'failAlarm' was not declared in this scope failAlarm(); ^ exit status 1 'displayInitialSetup' was not declared in this scope

Anonymous user

2 years ago

hello I don't understand

Anonymous user

2 years ago

Has anyone used a common cathode 7 segment display? What change to the code would be needed?

Anonymous user

2 years ago

No. My mistake. Not paying attention to detail. Thanks.

behrooz66

2 years ago

I have included three code files, are you sure you have looked (and copied) through all three of them?

Anonymous user

5 years ago

``int latchPin = 3; // ST_CP [RCK] on 74HC595 int clockPin = 4; // SH_CP [SCK] on 74HC595 int dataPin = 2; // DS [S1] on 74HC595 const int STOP_LED = 6; const int GO_LED = 7; const int BUZZ = 8; const int TOUCH = 10; const int fail_threshold = 9; enum Status { STOP = 0, GO = 1 }; void setup() { Serial.begin(9600); displayInitialSetup(); gameInitialSetup(); } Status status = GO; int failCounter = 0; void loop() { while (failCounter > fail_threshold) { gameover(); } switch (status) { case GO: digitalWrite(GO_LED, HIGH); digitalWrite(STOP_LED, LOW); digitalWrite(BUZZ, LOW); if (digitalRead(TOUCH) == HIGH) { status = STOP; } break; case STOP: digitalWrite(GO_LED, LOW); failCounter++; if (failCounter > fail_threshold) break; displayDigit(failCounter); Serial.println(failCounter); failAlarm(); status = GO; break; } } byte seg_spin[6] = { B10000000, B01000000, B00100000, B00010000, B00001000, B00000100 }; void gameover() { for (int i=0; i<6; i++) { digitalWrite(BUZZ, HIGH); delay(5); digitalWrite(BUZZ, LOW); delay(50); digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, LSBFIRST, seg_spin[i]); digitalWrite(latchPin, HIGH); delay(10); } }

behrooz66

2 years ago

Just wondering why have you copy pasted code here?!

Anonymous user

5 years ago

int latchPin = 3; // ST_CP [RCK] on 74HC595 int clockPin = 4; // SH_CP [SCK] on 74HC595 int dataPin = 2; // DS [S1] on 74HC595 const int STOP_LED = 6; const int GO_LED = 7; const int BUZZ = 8; const int TOUCH = 10; const int fail_threshold = 9; enum Status { STOP = 0, GO = 1 }; void setup() { Serial.begin(9600); displayInitialSetup(); gameInitialSetup(); } Status status = GO; int failCounter = 0; void loop() { while (failCounter > fail_threshold) { gameover(); } switch (status) { case GO: digitalWrite(GO_LED, HIGH); digitalWrite(STOP_LED, LOW); digitalWrite(BUZZ, LOW); if (digitalRead(TOUCH) == HIGH) { status = STOP; } break; case STOP: digitalWrite(GO_LED, LOW); failCounter++; if (failCounter > fail_threshold) break; displayDigit(failCounter); Serial.println(failCounter); failAlarm(); status = GO; break; } } byte seg_spin[6] = { B10000000, B01000000, B00100000, B00010000, B00001000, B00000100 }; void gameover() { for (int i=0; i<6; i++) { digitalWrite(BUZZ, HIGH); delay(5); digitalWrite(BUZZ, LOW); delay(50); digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, LSBFIRST, seg_spin[i]); digitalWrite(latchPin, HIGH); delay(10); } }

Anonymous user

5 years ago

This looks great. The link to the buzzer model # is broken - can you tell me the part you used? I am ordering for a class and don't want to make a mistake. Thanks!!

behrooz66

2 years ago

Hi, the buzzer can be any "5v Active Buzzer". You don't have to be super picky :)

Anonymous user

5 years ago

Nice and fun project! I made it, the buzzer and the game are working fine, but the led count doesn't work... I replaced the 8 segment display by 8 leds with 220 Ohm resistors... Can you help ?

Anonymous user

2 years ago

Hello, Behrooz66, Thanks for your reply. I condirm that the 74GC595 does support led as per the datasheet, But I just realized that the value of the resistors between ground and the leds must be 560 Ohm... or 470 as per the site you advised. I'll go on searching... I already grounded the OE pin; no change except that the led flash on power on...

Anonymous user

2 years ago

It works! I just had to add 5V to the MR pin on the 74HC595! (I did change a bit the code so the leds shows a water mark) Very fun project, Many thanks!

behrooz66

2 years ago

Also, I think the `OE` pin of the 74HC595 should also be connected to the ground, I might have missed it in my schematics.

behrooz66

2 years ago

Hi! Are you using a 74HC595 as well? Can you confirm that you are able to manage 8 LEDs using that 74HC595 (regardless of the game completely, just make sure you can actually control the 8 LEDs using that IC). If you can separate out that part and confirm the LEDs functionality, then it will be easy to just add that piece to the game later. Maybe look at this tutorial or something: https://www.arduino.cc/en/tutorial/ShiftOut

behrooz66

2 years ago

Hey buddy I'm so glad you got it working! Thanks for looking at my project :)