In live competitions and shows, each item has a predetermined fixed minimum time, maximum time and grace time. The item being presented should complete between minimum and maximum time. Sometimes, grace time for a few seconds over and above the maximum time is allowed. If it is not completed within the stipulated timeframe, the item presented by that particular team is disqualified.

Fig. 1: Author’s prototype
Fig. 1: Author’s prototype

EZA_PartsOne may use a stopwatch to monitor the competition but there are chances of inaccuracy or introduction of errors while switching on the stopwatch in the beginning or switching off at the end of a particular item. The audience or the participants can object or raise a complaint for inaccuracy in time allotment. This project comes handy to overcome these problems. It is fully automatic and programmable. It has the flexibility to program the minimum, maximum and grace time period in the database as explained in the software section. The author’s prototype is shown in Fig. 1.

This project has two parts, namely, hardware and software.

Circuit and working
The circuit diagram of programmable interval timer is shown in Fig. 2. It comprises PIC16F877A microcontroller (IC3), MAX232 converter/driver (IC4), three BC547 transistors (T1, T2 and T3), 16×2 LCD (LCD1), 230V AC primary to 15V, 500mA secondary transformer (X1), bridge rectifier module (BR1), regulator ICs 7812 (IC1) and 7805 (IC2) and some other components.

PIC16F877A. This microcontroller is the heart of the hardware section. It has an 8-bit processor with 8k (14-bit words) Flash program memory, 368 bytes data memory and 256 bytes EEPROM. In addition to this, it has three timers, namely, Timer0, Timer1 and Timer2. By using an 8-bit Timer2 having a period register (PR2) and post-scalar ratio as 1:10, interrupt frequency of 100Hz was generated.

For every interrupt, the value of timer variable is increased by one. One-second time elapses when the value of variable reaches 100. The value of one second is the base of the project. When this one second reaches 60, one minute is generated.

Fig. 2: Circuit diagram of the programmable interval timer
Fig. 2: Circuit diagram of the programmable interval timer

863_Test_pointPort B of the microcontroller is interfaced with 16×2 LCD module to display the values of minutes and seconds. Data pins D4 through D7 of the LCD are connected to RB0 through RB3 pins of the microcontroller, respectively. Port pins RB4 and RB5 of the microcontroller are connected to the register select (RS) and enable (EN) pins of the LCD, respectively. R/W is grounded to keep the write mode always enabled.

Port pins RC6 and RC7 of the microcontroller are configured as a universal synchronous asynchronous receiver transmitter (USART) by connecting to pins 11 and 12 of MAX 232 IC, respectively. Pins 14 and 13 of MAX232 are connected to pins 2 and 3 of COM port DB9 connector, respectively for the data communication with personal computer (PC). You can also use a USB-to-serial converter to connect with the PC in case you do not have a 9-pin COM port on your PC.

Green, yellow and red bulbs (15W each) are connected to RD1, RD2 and RD3 pins of the microcontroller, respectively through three relays. When a team starts presenting an item, green bulb glows. When minimum time is over, green bulb goes off and yellow bulb goes on to indicate that maximum time count started.

Fig. 3: MS Access database file
Fig. 3: MS Access database file

As soon as the maximum time is over, yellow bulb starts flickering to indicate that the grace period has started.

When the grace period is over, yellow bulb goes off and the red bulb glows; and immediately the in-built speaker of the PC produces an alert sound, indicating the grace period is over. If the item does not stop before the red bulb glows, the item being presented gets disqualified.

For the next team or contestant, you have to press reset button S1 to repeat the process.

Power supply. The power supply section comprises a 230V AC primary to 15V, 500mA secondary transformer (X1), bridge rectifier module (BR1), regulator ICs 7812 and 7805. The output of bridge rectifier is filtered by capacitor C1 and fed to input of 12V regulator IC1. The 12V drives the three relays RL1 through RL3 and is also fed to input of 5V regulator IC2. The 5V supply drives the microcontroller (IC3), LCD1 and MAX232 (IC4). Resistors R1 and R2 and capacitor C10 form power-on reset circuitry of PIC16F877A microcontroller.

Software
The software part includes two programs, that is, user-interface program and firmware for the microcontroller. Along with these programs, there is an MS Access database file (.mdb) where the user has already entered the minimum, maximum and grace timings (refer Fig. 3). User can change these timings as per requirement, as explained in the next section.

Fig. 4: First VB program output (MDI Form1)
Fig. 4: First VB program output (MDI Form1)
Fig. 6: Form2
Fig. 6: Form2
Fig. 5: Form1
Fig. 5: Form1
Fig. 7: Main user-interface program output (Form3)
Fig. 7: Main user-interface program output (Form3)

User-interface program. It is written in Visual Basic (VB) 6.0. The purpose of using this program is to connect to the database, to connect the microcontroller and to give audio-visual indication to the user who is monitoring the show.

LEAVE A REPLY

Please enter your comment!
Please enter your name here