Simple Computer Control for Devices

F

Fred_M

The purpose of this experiment is to build a simple relay bank to control other devices using a computer parallel port as the controller. This is much like the home automation kits sold by companies for hundreds of dollars. I’m going to try and do it with old obsolete computer parts, reclaimed electronic parts, and less than $25. A word of warning to cover my butt and all, this is a free DIY project and should only be done on a computer that you don’t care about frying. Burn up your new P4 Dell, well to bad. I’m not responsible for my actions, let alone yours.

So to start we need an old working computer with a working parallel port and winders 95, 98, or 98se. I’m using an old IBM 486 with 32 Megs RAM and a 500-MB hard drive. A 386 with 8megs should work even. We also need this software to control the parallel port, which can be downloaded from link at bottom and scanned for Virus. We also need a couple LEDs and wires to hook them up along with some probes that fit the parallel socket holes. I’m using little nails.

After downloading the file get winzip if you don’t have it and extract all the files to a 3.5 floppy. There are 10 files. Then run setup on the machine you are setting up and follow directions. Then go to the folder on your C drive called Diyk74 and read the readme and follow the directions to install the drivers in the drivers.txt file. Then launch the Diyk74 from you programs menu and read the help files that will tell you how to operate it. I never have got the manual set (set all works) to work so don’t worry about it. We will be using the timed sets anyway. Now you can use a led to test your output between a data out port and ground. The grounds are all common and Data Bit 0 corresponds to relay 1 (etc) on the control interface. The data out port is V+ by the way, so hook the positive lead of you led to it. Avoid shorting out an active port as I’m not sure it might not do permanent damage. There will be 8 ports we can use for control. When you can get control over the led lighting we can go on to the next part, the building of the relay bank. One other note is the led can be made to flash by inputting a time on into the TOP toggle and time off into the OFF toggle. It’s a bit fuzzy in the help file.





SOFTWARE LINK http://users.mo-net.com/insspecial/k74_win.zip
 

Attachments

  • db25.jpg
    db25.jpg
    30.6 KB · Views: 474
F

Fred_M

Once the LEDs are responding the next step will be to build a relay to operate off the power from the data port. I ordered the resistors and transistors today to try it out. I already have the diode and relays. The relays I scrounged from old slow modems.
 

Attachments

  • relay bank.gif
    relay bank.gif
    3.4 KB · Views: 331
F

Fred_M

Over the weekend at the computer recycling center I picked up a nice used encloser for the relays and a DB25 cable. Inside the encloser was a nice barrier strip after I removed the circuit board. So I wired the terminals from left to right starting with D0 (relay1). I bunched some of the grounds together and attached them too. Use the chart above for pin outs, remeber, the cable plugs in to the diagram above, don't wire it backwards. I then tested it with a led probe. Got it right:D :eek: :D the first time. FRED
 

Attachments

  • box.jpg
    box.jpg
    60.7 KB · Views: 376
F

Fred_M

We will also need a 5 volt power supply for the coils. The 7805 will need a heatsink. The cap is overkill at 1000, a 220 or bigger should work.
 

Attachments

  • 5volt.gif
    5volt.gif
    5.4 KB · Views: 358
F

Fred_M

Got the power supply built and tested. Parts came in and I assembled the first of 8 relay assemblies and tested it. They work perfectly. Here's a pic of the assembled relay pack. The blue wire goes to 5+ volts, the resistor goes to D0 (relay1) from the computer, and black goes to ground. Note band on diode and pin outs on transistor. FRED
 

Attachments

  • relay module.jpg
    relay module.jpg
    13.1 KB · Views: 340

jon-monon

Active Member
Aug 15, 2002
4,590
0
36
60
Cobblers Knob, IN
www.2guyzandsumtrains.com
Sooo cool, Fred. I was wanting to do the same, some time back, and found a Linux program to control the pport, but it didn't look fun to set up and use. I fig'd I'd have to write a DOS proggy if I wanted it to fly, and gave up. I pulled down the program and saved it for if I ever go back to the idea. It seems like an ideal way to do a lot of things, even block control.
 
F

Fred_M

Jon, I can think of lots of things. The software allows you to toggle on and off from 1/10 second up to infinity in 1/10 second intervals. So using a double pole relay you can have a wigwam signal for your crossing lights. Just set up a bus and detectors to turn on-off. No more pesky 555 chips. On my list is a resort hotel, use this to turn on-off lights in rooms. Turn off the furnace/hot water heater/ lights at nite. Xmas light timer, or light animation. Blah blah. Anyway, it's working now. I got 4 channels done today and am doing some overnite reliability tests. Only things I found so far negative, the manual force ons don't seem to work (software) and the program appears only able to run one ltp at a time, and can't be launched twice, so we have a limit of 8 channels per box. And I wish it would cycle faster as i could then run stepper motors at speed off of it. But what can we expect from freeware? FRED
 
F

Fred_M

The circuits are woking great, but the relays click. As I am using white LEDs for all future lighting and replacing the current mix of christmas tree and grain of wheats with LEDs. I reflected on the need for the noisy relays. Checking the specs on the PN 2222a switching transistors I'm using I find they have a max collector input of 600 ma. So they should run 10 to 20 3.3 volt 20ma white LEDs ok alone. So I hook up a transistor and 5K resistor on the base and find with my 5volt power supply input I have a 2.9 to 3.1 volt emmiter voltage.:) :) :) Perfect for LEDs. So I tore out all but 2 relays leaving them for any heavy duty switching I might need and replace the other 6 channels with transistors outputs.
 

Attachments

  • direct.gif
    direct.gif
    2.8 KB · Views: 315
F

Fred_M

I then put in an isolated input to the two remaining relays and 8 outputs for the 8 channels, 6 being the 3 volt outputs from the transistors (the case is ground). With the wall pack I'm using the unit should power around 40 LEDs plus two indpendent channels on the relays. I can also add external relays if I find I need more power. The building I designed this for in the first place will use 20 LEDs so I should be OK. Now I'm keeping my eye out for an old laptop to run this so it will be light, compact, and quieter. For this a 386 with 8 megs of ram and a 100 meg HDD would do fine. All's it need do is run windows 95. So I declare this project finished. Now I need to do a blue LED chaser tunnel for my wife's pickup. I already put blue ground effects, blue licence plate frames, and blue LED exhaust tips on it. I'm making a blue LED tunnel that appears to be sucking inward using 48 blue LEDs ans a decade counter to pulse it.:D FRED
 

Attachments

  • complete.jpg
    complete.jpg
    47.9 KB · Views: 303
F

Fred_M

Originally posted by Matthyro
I sure would like to see a photo of the pick up truck with all those lights on it Fred. Sounds like one of the fast and furious ones
As much as i would like to comply with your request sir, the time changed and I just can't seem to stay up until after dark since. :D :D :D I tried to take a digi pix and with the flash the lights can't be seen, and with the flash off all's I get are blue blobs. So I'll break out the Minolta 35 and tripod and try some bracket shots this weekend. Hope the shutter ain't rusted shut :) :D . And I met my monetary goal, I spent 1.40 for transistors, .50 for resistors, $1 for the encloser, $1 for the cable, and $1 for the wall wart (transformer). All the rest came from the junk drawer or the salvage heap. (whistles theme for Junk Yard Wars and looks at poster of Canadian hero Red Green with hand on heart) FRED