IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

HOWTOs

Search Howtos :Match :

4. Examples of Relays

The diagrams below are used to explain how relays work.

The relay itself is just a switch as seen in the diagram below:

relay power off                        relay power on

       |3                                    |3
       |                                     |
       |                                     |
       o                                     o
        \                                    |
       o \                                   o
       |                                     |
       |                                     |
       |                                     |
       |4                                    |4

The diagram below demonstrates the setup of a 4 pin relay.


      ____________________________
      |                          |
  1   |                          |  3
 -----|---------s     o----------|-------
      |  coil   s      \switch   |
  2   |         s       \        |  4
 -----|---------s     o- \-------|-------
      |                          |
      |                          |
      |                          |
      |__________________________|

In the diagram above, pin 3 and pin 4 are disconnected by default. When you send +12V between pin 1 and pin 2, it will turn on a switch, and pin 3 and 4 are now connected.

The following is a 5 pin relay:


           _______________________________
           |                             |
     1     |                             |       5
  ---------|---+            o------------|----------------
           |   |-----------/---- s       |
           |              /      s       |
     3     |             /       s       |
  ---------|-----------o/   coil s       |       4
           |                 o---s-------|----------------
           |                     |       |
           |                     |       |
     2     |                     |       |
 ----------|---------------------+       |
           |_____________________________|

In the above diagram pin 3 is connected to pin 5, by default. By sending +12V between pin 1 and pin 2, you will will turn on a switch. Pin 1 and pin 2 will disconnect, and pin 5 and pin 4 will connect.

 relay power off                 relay power on

     |5                                  |5
     |                                   |
     |                                   |
     o                                   o
      \                                  |
     o \                                 o  o
     |  o                                |  |
     |  |                                |  |
     |  |                                |  |
    4|  |3                              4|  |3

Some relays may have more that 5 pins. More pins just means there are more switches.

I wrote a simple program that can control 8 relays. The program is available at the following location and will need g++ in order to be able to use this program. http://edc.sourceforge.net/paralle.tar.gz

A complete circuit can control up to eight relays, that means that a complete circuit can control eight different devices. You will need a DB25 connector. Using a parallel switch cable, connect this relay board to your computer. I put the relay board in a box and use a parallel switch cable to connect it to my Linux box:

Panel: LED, Switch		Back:  DB25 connector

Below is an example of how a relay board would connect with your electrical device:

			CONNECTED RELAY BOARD
			

                         +-----+ power outlet
       1 _______3        |   __|________             ||   ||
       --|     |---------+  |  |       |             ||   ||
       2 |relay|4           | (o) (o)  |            _||___||__
       --|_____|----+       |------|---|            |        |
                    |              |                |        | 
                    | +------------+                |        | plug
            ground  | | hot                         |        |
                    | |                             |        |
                  __|_|__                           |        |
                  | | | |                           |________|
                  | | | | plug 
                  | | | |
                  |_|_|_| (i know it doesn't look like a plug, but it's a plug :-) )
                   || ||
                   || ||

To connect the system, just connect your home electrical device to the power outlet. That is it! You don't need to make any change on the electrical device. And you can connect any kind of device to that power outlet. Plug this power outlet into any wall outlet.

To see photos of what the finished product looks like, go to the following sites:

The following URL shows a complete electronic circuit (control 8 devices): http://edc.sourceforge.net/01.png

Search Howtos :Match :
My Money 2.0.53
Personal financial software
Deluge 1.2.2
Bittorrent client written in Python and GTK+
DbVisualizer 7.0.5
The Universal Database Tool
Linux Kernel 2.6 2.6.34-rc2
Linux Kernel
Postfix 2.6.6
Alternative to the Sendmail program
ImageMagick 6.6.0-7
ImageMagick image processing studio
Phorum 5.2.15
Web based discussion software written in PHP.
Wine 1.1.41
Free implementation of Windows on Unix
NVidia driver 195.36.15
Linux unified nVidia driver
Monkey HTTP Daemon 0.10.0-rc4
Monkey is a small and fast web server for linux
Free IT Magazines, White Papers, eBooks, and more !
Oracle Magazine

Contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more.

Vulnerability Management for Dummies

Get all the Facts and See How to Implement a Successful Vulnerability Management Program.

Website Magazine

Has tapped premier talent in the Internet industry for our content and each and every issue will contain practical advice and insights for website owners.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Quick Survey

Please take our survey and help us improve our website to serve you better.

Thank you.
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info