Precise Industrial Timer Project
Industrial timers are widely used in the industry for the automatic control of electrical appliances. Most of the timers available on the market are either of complicated quality or of poor quality with an unsatisfactory cost / performance ratio. This industrial panel mount timer provides excellent time accuracy for industrial use. The 7-segment display for displaying the account is directly controlled by the microcontroller (MCU) without integrated control circuits.
Circuit and operation
The circuit diagram of the industrial timer is shown in Figure 1. It is built around the 5V 7805 voltage regulator (IC1), the AT89C52 MCU (IC2), the 5V relay (RL1), two thumbwheel switches (TWS1 and TWS2) and discrete switches. Components.
Circuit diagram of the industrial timer
Fig. 1: Diagram of connection of the industrial timer
The circuit is powered by a 230V AC network. The transformer (X1) reduces the voltage from 230V to 7.5V-0-7.5V. The diodes D1 and D2 are rectifying diodes and the capacitor C1 is connected as a filter. Filtered and regulated DC voltages are then sent to the circuit. The AT89C52 microcontroller operates with a clock frequency of 12 MHz, interfaced with two thumbwheel switches, two 7-segment common anode displays (DIS1 and DIS2) and a 5V relay.
Transistor T1 operates as a relay driver for RL1. The port pins P0 and P2 of IC2 are connected to 7-segment displays (P0 is MSB and P2 is LSB). LED2 is connected as a power-on indicator and LED1 is connected to pin P3.0 as a timer indicator.
Publicity
Switch S1 is used to turn the circuit on and off. C4 and C5 are used to suppress the high frequency signals generated by IC1. C6 and C7 are decoupling capacitors for the crystal. C2 and resistor R3 are power-on reset circuits for the ICU MCU.
DIS1 and DIS2 are used to display the time settings with TWS1 and TWS2. The details of TWS1 and TWS2 are illustrated in FIG. 2
Description of rotary switches
Fig. 2: Description of rotary switches
When S1 is closed, the display will show 00. Once the timer has started the countdown to the programmed time, it has automatically stopped and the relay has been activated to turn the load off. The display shows the last count value until the stopwatch restarts.
The maximum number indicated by DIS1 and DIS2 is 99 seconds. For example, to set the duration to 13 seconds, set 3 first with TWS1, then 1 with TWS2. Then, when you close S1, the counter starts counting 01, 02, 03 ... until you reach 13 and the LED 1 flashes. After displaying 13, the counting stops automatically, LED1 stops flashing and RL1 lights up.
Software
The program code is written in C language and compiled with the Kiel μvision 4 software. The main part of the program analyzes the settings of the rotary switches and stores the data. The program starts increment the count value from 0 to the set value with a delay of one second and displays the current values on the 7-segment display. The RL1 is activated at the end of the count and remains indefinitely in this state as long as the power is available.
The hexadecimal code generated using the Keil software is written to the MCU using any appropriate AT89C52 programmer.
Circuit and operation
The circuit diagram of the industrial timer is shown in Figure 1. It is built around the 5V 7805 voltage regulator (IC1), the AT89C52 MCU (IC2), the 5V relay (RL1), two thumbwheel switches (TWS1 and TWS2) and discrete switches. Components.
Circuit diagram of the industrial timer
Fig. 1: Diagram of connection of the industrial timer
The circuit is powered by a 230V AC network. The transformer (X1) reduces the voltage from 230V to 7.5V-0-7.5V. The diodes D1 and D2 are rectifying diodes and the capacitor C1 is connected as a filter. Filtered and regulated DC voltages are then sent to the circuit. The AT89C52 microcontroller operates with a clock frequency of 12 MHz, interfaced with two thumbwheel switches, two 7-segment common anode displays (DIS1 and DIS2) and a 5V relay.
Transistor T1 operates as a relay driver for RL1. The port pins P0 and P2 of IC2 are connected to 7-segment displays (P0 is MSB and P2 is LSB). LED2 is connected as a power-on indicator and LED1 is connected to pin P3.0 as a timer indicator.
Publicity
Switch S1 is used to turn the circuit on and off. C4 and C5 are used to suppress the high frequency signals generated by IC1. C6 and C7 are decoupling capacitors for the crystal. C2 and resistor R3 are power-on reset circuits for the ICU MCU.
DIS1 and DIS2 are used to display the time settings with TWS1 and TWS2. The details of TWS1 and TWS2 are illustrated in FIG. 2
Description of rotary switches
Fig. 2: Description of rotary switches
When S1 is closed, the display will show 00. Once the timer has started the countdown to the programmed time, it has automatically stopped and the relay has been activated to turn the load off. The display shows the last count value until the stopwatch restarts.
The maximum number indicated by DIS1 and DIS2 is 99 seconds. For example, to set the duration to 13 seconds, set 3 first with TWS1, then 1 with TWS2. Then, when you close S1, the counter starts counting 01, 02, 03 ... until you reach 13 and the LED 1 flashes. After displaying 13, the counting stops automatically, LED1 stops flashing and RL1 lights up.
Software
The program code is written in C language and compiled with the Kiel μvision 4 software. The main part of the program analyzes the settings of the rotary switches and stores the data. The program starts increment the count value from 0 to the set value with a delay of one second and displays the current values on the 7-segment display. The RL1 is activated at the end of the count and remains indefinitely in this state as long as the power is available.
The hexadecimal code generated using the Keil software is written to the MCU using any appropriate AT89C52 programmer.
Comments
Post a Comment