Relays- How to control them by Computer

Published: 23rd December 2011
Views: N/A

Computers these days have become an indispensable part of our life. Apart from using them for office work & playing games we rarely use them for any other significant work. Today’s computers are workhorses, we seldom use full power of our computers. But if we explore them, they can be very useful for our other purposes also. One of them is controlling. This can be control of various systems of our home, our office or our factory.
Computer basically is a number crunching machine which, with help of software does work as per our requirement. It has got various "Outputs" & "Inputs". Output is system by which a computer communicates with us for example Display, Speakers and other hardware outputs called Ports. While Input is a system, by which it "listens”. That is we talk with computer using these systems. These are Keyboard, Mouse & other devices.
Ports are the devices where computer is able to change the voltage signals as per our requirements. There are mainly 3 types of popular output ports available in our computers.
1. Parallel port
2. Serial port
3. USB port.
As far as earlier computers were concerned, Parallel ports and Serial ports were defecto standard. They were available in each Desktop & laptops. But with the development of Universal Standard Bus (USB), these ports are now less & less used. Parallel port is almost vanished while serial port also known as RS232 is totally vanished from modern laptops while Desktops still carry RS232 port. USB port has become defecto standard as far as modern laptop is concerned.
As parallel port is now a defunct part, we will concentrate on use of RS232 & USB ports to control outside world. RS232 or Serial port is a system by which computer can communicate with other devices. RS232 standard is well defined all over world and is same everywhere. One standard all over world helps to make other devices easy. This way a device developed in India can be used in US or Russia or France in same way. These devices can understand the RS232 signals and can work accordingly.
This same way USB standard is also very well defined and followed all over world. It is very well improved over the RS232 standard & more simplified then RS232 as far as port is concerned. RS232 port has 9 pins while USB port has only 4 pins and can supply power to external devices also.
Computer controlled system consists of a computer, connected with an electronic device having microcontroller & relays. The connection of computer with the device can be through RS232 or USB port. Software is developed as per requirement of controlling system in popular computer languages like Visual Basic (VB), Delphi or C++. Through various sensors connected to the device, computer with the help of software decides what kind of action has to be taken and this is conveyed to the device having relays as its output to control power.
Let us take a practical example of Home Security System controlled by a computer. In this system a computer running special software is connected with a security system. The computer monitors various sensors like Magnetic, Infrared and other sensors and if the situation is found to be different from that defined in software, a decision to operate alarm is conveyed to the security system. Security system operates alarm through operating a relay. And this way outside world is conveyed about the breach in security.

For USB relay board & other electronic kits please visit

Report this article Ask About This Article

More to Explore