Introduction: Home Automation/ Control a Relay With Your Parallel Port

About: Why would i buy something ready made when i can make it myself with half the features for twice the money? DIY!

This is my version of controlling external devices with your computer. Namely with the LPT or parallel port.
The software is from Lalim, version 3.0.6. The patent was no longer valid scenes 2009 and the direct link to this controller is no longer working. You can get to a Lalim software company, but not for this program.  
So where did i get it? From the endless hours of research i do online i just found it. 
But do not worrie i have it available for download.

This program does a lot more than i use it for. I mainly use manual mode and turn lights on and off as needed.
There is 8 ports available but as of now i am only using four. 3 for lights and 1 for an exhaust fan.
That gives me 4 more for some future use, or nothing. 

As with most of the stuff i build it is rarely all from one place. I will take part of something from here and part from there. The parts i feal would be the best to fit me and make something out of it. Such as this LPT controller.

This method does take a lot of wiring. So if you choose to do this you have been warned.


 ****** This Instructable uses 220 AC so take extra procation when working with mains ******

Step 1: Tools and Safety

There are 4 pictures of things you want to use.

There are 4 pictures of things you dont want to use.

Be-Careful so you can choose the 4 of these you want to use. 

You wouldn't want to be forced to choose the 4 you dont want to use.

                                             !!!      KEEP IT SAFE     !!!



Step 2: Bread-Boarding and Testing

This is the circuit diagram of my Relay Boards with the exception of the wiring block connectors in picture 1.

There is description in the breadboard pictures.  


BOM:
  • 12v Relay
  • LM7812 Voltage Regulator
  • 1N400X diode
  • 4K7 Resistor
  • 470R Resistor ( 3 )
  • #103 Capacitor
  • #202 Capacitor
  • 2N3904 Transistor
  • #817 Optocoupler
  • LED
  • 2 wire junction blocks ( 3 )
  • Perf Board
  • Standoffs  ( 4 ) 
  • D25 Female connector

The capacitors values i have used are not " by the book " for the regulator, but without caps the voltage will not be correct. I have found these do work well tho.
The optocoupler i used is not the 4N33 in the diagram. It is the one in the BOM, #817

Step 3: Bios & LPT Com Port Settings

                       Testing the Printer Port

If you do not know what a Parallel port is or just need an addition description then check here first.

  First we will check the LPT port directly by taking a reading.
Procedure for taking a reading , Use you DMM and connect ground to the LPT ground. Use the pos test leed and touch it to the port you want to check. Say we are going to check D1 port then we connect the tester to PIN2, see diagram. Then when sending a HIGH or LOW to the port the DMM will read either 0v or 5v. If everything is working. 
Now be careful about the ground. Some D25 ports will have the ground pins 18 - 25 grounded to the outside case and some do not. You will need to make sure you are actually grounded to the pins, 18 - 25. If you don't check this it may cost you many hours until l you figure it out. Yes many hours!   
If you get a reading of 0v and 5v then you are finished with this part. Good! 
One tool that can help with testing the port can be found in this ible.

What can I do if my printer port is not working?


If you do not get a reading then you are not finished and keep reading. 

Make sure the end of the L{T cable you are working on is plugged into the PC.
If you  can not get any readings from D-25 port you may need to check the setting in Bios.
To do that you need to, restart your pc and while it is booting continually press delete key ( about a bajillion times ) until the Bios screen comes up. The mouse no longer works in Bios so it will all be done with the keyboard. Scroll down to Integrated peripherals, hit enter. Scroll to I/O devices, hit enter. Check if Parallel port 378 is selected.           If not, select or enable it.


  Now Mode options.

Normal is more for out communications, but will work in or out. This is the slowest of any options. But most reliable.
ECP is next fastest and can be used without any supporting programs, well integrated.
Next is EPP, this is the faster data transfer your PC has. It also can have some problems with communications. My need supporting programs to run. You can choose this and try it, if you have problems with data transfer you will need to choose a different option.
Last there is ECP & EPP. If you choose this your PC is supposed to determine what one is optimal to run, automatically. I never have tried this, i suppose it works the way it says. If you dont know or are not sure set it to NORMAL.

To finish up press ESC until you are at the original first screen. Press F10 to save and exit. Hit enter and your pc will reboot. I dont think a person could tell the difference in the speeds if they are using the port for general use, triggering LED's, sending signals for a CNC ect. The only time the fastest setting will really be needed is if you are transferring massive amounts of data. The only 2 practilcal choices in my opinion is either NORMAL or ECP.
These settings procedures are specific for MSI 41 series Main boards. Every manufacture does there a little bit differently. 
Next look in the device manager for errors. Click on ports. Make sure the printer port  LPT1 is there and does not have a yellow question mark on it. If no GOOD!
 The shortest way to open the device manager i know of is, right click on My Computer, click on manage, then click on device manager and you are there.
If you do not see any Yellow question marks then you are good to go, if there is Yellow question marks then go back through step 3. 

Step 4: Status Indicator

  What is this thing?

This my visual indicator of weather a pin has been activated and of the corresponding peripheral has been turned on or not.
Yes you can look at the LPT program on the screen. If it is not up then you will of course click on it to be able to see it.
So with this Status Indicator it is easy to just glance over and see what is on or off.
.
The Pin Indicator LED's are connected directly to the pins of the LPT port, via 100R resistors with the exception of the Red power indicating LED. It has a 470R resistor. The grounds are riveted directly to the aluminum angle. 
There is 8 LED's for indicators. 1 for every port. Only the first 4 are in use. The other 4 are reserve for future use.   

Step 5: B.O.B Break Out Board

I have read about connection directly to a Parallel Port  without a buffer can be hazardous and i am sure it can cause some damage if there is some feedback or a short of some kind.
I have used  opto-isolator on the Relay boards for some protection.

Really there should be a buffer such as an 74HCT245. It not only buffers it will also take a week signal and output it at 5v and a low signal will be 0v. So that gives you a better signal than can be had from the LPT.
I have such a buffer but not completed at this time.

Everything is in a BETA stage or just temporary. ( Temporary for 10 years ). 

Computers nowadays don't have the parallel port as standard equipment as before. If you do not have one you will need to install one of these add on cables. It plugs into the motherboard and fits in the slots on the back of the computer. 

Step 6: Junction and Relay Box

I guaranty you it is much easier to complete an ible as soon as you finished the project. If you choose to finish your ible some months or almost a year later you are giving your self more work to try and reproduce schematics and figure out how you routed everthing ect.        Yes it has been that long, eek.

The picture with the white junction blocks i call my Junction Box.  The other box with the relays i call my Relay box, go figure.

When there is DC applied then the LED's will light indicating power is present. One RED LED in the Junction box and one Green LED's for each the relay boards.

While there is only 4 Relay boards in use now. The space above gives me room to add 4 more if needed.

Step 7:

 Thanks for looking!


UP! Contest

Participated in the
UP! Contest