8 Channel Quiz Buzzer Circuit using Microcontroller

8 Channel Quiz Buzzer Circuit using Microcontroller

In this project, I’ll show you the design and working of an 8 Channel Quiz Buzzer Circuit using Microcontroller (8051), which tells us which team has pressed the button first in a quiz or game show. 
Quiz buzzers are used often at places like educational institutions and game shows, where it is required for the organizers to know who pressed the button first. Conventional systems require human intervention to decide which team has pressed the button and this system can be erroneous and even biased.
Another problem arises when two members pressed the button at a negligible interval and it is difficult to guess who has pressed the buzzer first.
Here in this project, I designed an Automatic Quiz Buzzer System in which, when more than one team presses the buzzer, the delay between the two button presses is accurately taken into account and the corresponding number is displayed.
8 Channel Quiz Buzzer Circuit using Microcontroller Image 3
8 Channel Quiz Buzzer Circuit using Microcontroller Image 1
8 Channel Quiz Buzzer Circuit using Microcontroller Image 2
8 Channel Quiz Buzzer Circuit using Microcontroller Image 3
8 Channel Quiz Buzzer Circuit using Microcontroller Image 1
I have designed the circuit using 8051 microcontroller, which scans the input from push buttons and displays the corresponding number on a display device (7-Segment Display). It is a simple circuit with minimum number of components and sans any complexities. Even though this system is designed for only for 8 teams, more teams can be added by using another set of 8 push buttons.

Principle Behind the Quiz Buzzer Circuit

The 8 Channel Quiz Buzzer Circuit using Microcontroller is a simple embedded system with a set of 8 push buttons being the input devices, a microcontroller as the main controller and the output devices being a buzzer and a display.
The whole operation is carried out by a microcontroller through a program written in C language and dumped inside the microcontroller. When one of the buttons is pressed, the buzzer starts ringing and the corresponding number is displayed on the 7 segment display.

Circuit Diagram of 8 Player Quiz Buzzer using Microcontroller

8 Channel Quiz Buzzer Circuit using Microcontroller Circuit Diagram

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

The whole design process involves five steps.
  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 involves using five major components – 8051 Microcontroller, SPST Push Buttons, a buzzer and a common anode 7 segment display.  The microcontroller used in this case is AT89C51, an 8 bit microcontroller manufactured by Atmel (now Microchip).
Reset Circuit Design: The reset resistor is selected such that the voltage at the reset pin, across this resistor is at minimum of 1.2V and the width of the pulse applied to this pin is greater than 100 ms.  Here we select a resistor of 10KΩ and a capacitor of 10μF.
Oscillator Circuit Design: The oscillator circuit is designed using a crystal oscillator of 11.0592 Mhz and two ceramic capacitors each 33pF. The crystal is connected between pins 18 and 19 of the microcontroller
Microcontroller Interfacing Design: The set of 8 push buttons are interfaced to port P1 of the microcontroller and a buzzer is interfaced to the port pin P3.3. The 7 segment display is interfaced to the microcontroller such that all the input pins are connected to port P2. 
Microcontroller Code: The code can be written using C language or assembly language. Here, I have written the program in C language using Keil μVision software. This is accomplished by the following steps:
  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;
}
}

ความคิดเห็น

โพสต์ยอดนิยมจากบล็อกนี้

7 Segment Display Interfacing with PIC Microcontroller

arduino Project (อ้างอิง : https://www.prometec.net/control-acceso-clave/)

Digital Thermometer using LM35 and PIC Microcontroller