3. The Main Controller Section:
The main controller section: The controller used here is the 89S52 belonging to the 8051 family. This microcontroller has a classic 8051 core but has much advancement. The chip has an inbuilt 8kB flash ROM so that it can be programmed easily many times. This controller also boasts a RAM of 256 bytes. The programming voltage of this chip is also +5V which makes it quite easy to program and even giving it in system programming capability.
The use of the micro controller has simplified the circuit to a great extent. This circuit would have even been possible to construct using discrete components/ digital ICs but it would have been very complicated and difficult to implement. The usage of the micro controller also allows for further advancement of the project with ease at any date. The microcontroller has been connected in standard fashion. Its pin 9 has been connected to the power on reset network. It also has a push to on switch for manual reset. The controller has been furnished with a 12MHz crystal as a source of clock pulses. The four data out pins of the decoder 1 are directly connected to the lower nibble of the port 1. The VT terminal has also been utilized to interrupt the controller.
As the architecture of the controller does not allow interrupts which are low to high, the VT signal is applied to the controller after inverted by a single transistor. The software installed in the controller is such that whenever an interrupt arrives at the controller, it reads the data on the lower nibble of the port 1. After that the output port pin corresponding to that data is complemented, that is, 0 is converted to 1 and 1 is converted to 0. This will reflect in switching on or off a corresponding device.
The relay driver section: a bank of four relays has to be driven from the outputs of the controller. As the relays do demand quite a large amount of current and the controller is only capable of delivering a meager amount of current. Thus drivers are mandatory. Here we have implemented a ULN2803 Darlington driver chip as the driver. This chip has eight high gain transistor Darlington pairs inside it which can drive loads up to 500 mA.
The driver transistors also have inbuilt freewheeling diodes so that they can directly drive large inductive loads. The outputs of these drivers are used to drive relays.