Fun & Game Circuit Diagrams

8 Channel Quiz Buzzer Circuit using Microcontroller

In this project, I will present the design and functionality of an 8 Channel Quiz Buzzer Circuit employing a Microcontroller (8051), which aids in identifying the first team to press the button in a quiz or game show.

Quiz buzzers find common usage in scenarios where event organizers require a precise determination of which team has triggered the buzzer, such as educational institutions and game shows. Conventional methods rely on human judgement to determine which team pressed the button, which can lead to inaccuracies and even biases.

Another challenge arises when two individuals simultaneously press the button, creating ambiguity about who activated the buzzer first.

In this project, I have devised an Automatic Quiz Buzzer System that accurately calculates the time interval between two button presses, enabling the correct identification of the team that pressed the buzzer when multiple teams do so simultaneously.

I devised a circuit employing an 8051 microcontroller to register input from push buttons and showcase the corresponding number on a display device, specifically a 7-Segment Display. The circuit is uncomplicated, featuring a minimal component count and devoid of intricacies. While this system is currently designed for 8 teams, it can be expanded by incorporating another set of 8 push buttons.

Outline

  • Principle Behind the Quiz Buzzer Circuit
  • Circuit Diagram of 8 Channel Quiz Buzzer Circuit using Microcontroller
  • Components Required
  • Design Process
  • Quiz Buzzer Circuit Design
  • CODE
  • How Quiz Buzzer Circuit Works?
  • Applications of Quiz Buzzer Circuit

Principle Behind the Quiz Buzzer Circuit

The 8 Channel Quiz Buzzer Circuit with a Microcontroller is a basic embedded system comprising 8 push buttons as input devices, a microcontroller as the central controller, and a buzzer along with a display serving as output devices.

The microcontroller handles all the functions through a program written in C, which is loaded into the microcontroller’s memory. When any of the buttons is pressed, the buzzer activates, and the corresponding number is showcased on the 7-segment display.

Circuit Diagram of 8 Player Quiz Buzzer using Microcontroller

8 Channel Quiz Buzzer Circuit

Components Required

  • AT89C51 (8051 Microcontroller)
  • 7 Segment Display (Common Anode is used in this project)
  • Push Buttons – 10
  • 10KΩ Resistors – 2
  • 100Ω Resistors – 8
  • 470Ω Resistors – 2
  • 2N2222 NPN Transistors – 2
  • 5V Buzzer
  • 1N4007 Diode
  • 10μF Capacitor
  • 33pF Capacitors – 2
  • 11.0592 MHz Crystal
  • 8051 Programmer
  • 5V Power Supply

Design Process

  1. First step is designing the circuit.
  2. The second step is drawing the schematic using any software.
  3. Third step involves writing the code using high level language like C or assembly language and then compiling it on a software platform like Keil μVision.
  4. Fourth step is programming the microcontroller with the code.
  5. Finally, the fifth step is testing the circuit.

Quiz Buzzer Circuit Design

The circuit comprises five main components: an 8051 microcontroller, SPST push buttons, a buzzer, and a common anode 7-segment display. In this instance, the microcontroller is an Atmel AT89C51, an 8-bit microprocessor (now under Microchip).

Reset Circuit Design: To ensure proper operation, the reset resistor is selected to maintain the reset pin voltage at a minimum of 1.2V and provide a pulse width of over 100 milliseconds. For this example, a combination of a 10K resistor and a 10F capacitor is utilized.

The oscillator circuit employs an 11.0592 MHz crystal oscillator along with two 33pF ceramic capacitors. The crystal connects to pins 18 and 19 of the microcontroller.

Microcontroller Interfacing Design: Eight push buttons are linked to port P1 of the microcontroller, while the buzzer is connected to port pin P3.3. The 7-segment display is interfaced with the microcontroller such that all input pins are connected to port P2.

The microcontroller code can be written in either C or assembly language. In this instance, I utilized Keil Vision tools to create the program in C. Here are the steps to achieve this:

  1. Create a new project on Keil window and select the target (microcontroller).
  2. Create a new file under the project and write the code.
  3. Save the code with .c extension and add the file to the source group folder under the target folder.
  4. Compile the code and create the hex file.

Once the code is compiled and a hex file is created, next step is to dump the code into the microcontroller. This can be done with an 8051 Microcontroller Programmer.

CODE

  #include<reg51.h>
   
  #define SEGMENT P2 // PORT2 to Segments of 7-Segment Display
  #define SWITCH P1 // Input Switches (buttons) to PORT1
   
  sbit buzz=P3^0; // Buzzer
  sbit rst=P3^3; // Reset Switch (Reset the display) – not the microcontroller
  sbit digit=P3^7; // 7-Segment Display Common Pin (to enable)
   
   
  void delay (int); // Delay function
   
  int x=0,y,z;
  unsigned char ch[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x98}; // Hexadecimal values from 0 to 9.
   
  void delay (int d)
  {
  unsigned char i;
  for(;d>0;d–)
  {
  for(i=250;i>0;i–);
  for(i=248;i>0;i–);
  }
  }
   
  void main()
  {
  SWITCH=0xff;
  SEGMENT=0xff;
  digit=1;
  buzz=0;
  rst=1;
   
  while(1)
  {
  while(SWITCH==0xff); // wait until any button is pressed.
   
  while (SWITCH==0xfe) // Button 1 is pressed.
  {
  SEGMENT=ch[1];
  buzz=1;
  delay(1000); // Activate buzzer for 1 second.
  buzz=0;
  while(rst!=0); // display the digit until the reset is pressed.
  }
   
  while (SWITCH==0xfd) // Button 2 is pressed.
  {
  SEGMENT=ch[2];
  buzz=1;
  delay(1000);
  buzz=0;
  while(rst!=0);
  }
   
  while (SWITCH==0xfb) // Button 3 is pressed.
  {
  SEGMENT=ch[3];
  buzz=1;
  delay(1000);
  buzz=0;
  while(rst!=0);
  }
   
  while (SWITCH==0xf7) // Button 4 is pressed.
  {
  SEGMENT=ch[4];
  buzz=1;
  delay(1000);
  buzz=0;
  while(rst!=0);
  }
   
  while (SWITCH==0xef) // Button 5 is pressed.
  {
  SEGMENT=ch[5];
  buzz=1;
  delay(1000);
  buzz=0;
  while(rst!=0);
  }
   
  while (SWITCH==0xdf) // Button 6 is pressed.
  {
  SEGMENT=ch[6];
  buzz=1;
  delay(1000);
  buzz=0;
  while(rst!=0);
  }
   
  while (SWITCH==0xbf) // Button 7 is pressed.
  {
  SEGMENT=ch[7];
  buzz=1;
  delay(1000);
  buzz=0;
  while(rst!=0);
  }
   
  while (SWITCH==0x7f) // Button 8 is pressed.
  {
  SEGMENT=ch[8];
  buzz=1;
  delay(1000);
  buzz=0;
  while(rst!=0);
  }
   
  SEGMENT=0xff;
  rst=1;
   
  }
  }

How Quiz Buzzer Circuit Works?

The compiler takes care of various initialization tasks, such as setting up the stack pointer and initializing variables with non-zero values, before proceeding to execute additional setup routines. Subsequently, it invokes the main function and proceeds to check for button presses.

In simpler terms, the microcontroller scans its input pins on port P1, looking for any pins set to zero or logic low. Upon detecting a button press, it triggers the display function, passing the corresponding number as an argument. The microcontroller then sends the appropriate signals to the 7-segment display.

While the buzzer activates for one second and is then deactivated by the microcontroller, the number continues to be displayed continuously on the 7-segment display.

Applications of Quiz Buzzer Circuit

  1. This circuit can be used at quiz competitions organized at schools, colleges and other institutions.
  2. It can be also used for other games shows.
  3. It can be used as at public places like banks, restaurants as a digital token display system.
Tags

Leave a Reply

Your email address will not be published.

Back to top button
Close
Close