As part of a final year project for uni i want to control a desk lamp
from my pc. i've sorted the code which will control the Parallel port
and need the SIMPLEST circuit diagram explaining how to wire the lamp to
the comp. Ive looked at various other sites, but the stuff i found
seemed....well, overkill. im a bit of a dunce when it comes to this
electronics malarkey so i'd be soooooo grateful if you could explain
things well. maybe someone knows a web page i should look at.....
well thanx alot anyways
B gratefull if you could mail me with replys.... dwa...@mdisystems.com
dan in distress XX
As part of an ongoing project I have to do other peoples' homework for
them... :-)
I've found that most PC parallel ports are capable of directly driving a
Radio Shucks 275-232 5vdc reed relay on the data port. This is far
outside the specs for the port if you use only one pin, and not a great
engineering solution if you parallel several pins, but it's simple and
it works. (And it's not _my_ PC.)
The contacts in the reed relay probably aren't up to directly switching
the AC line (but they might be; check the specs) so you may need to
cascade to a beefier relay. You can steal enough 5vdc to run the second
relay from your keyboard port. But be careful with that! There's a
soldered-in fuse on the motherboard for keyboard power, and if you blow
that then there's no more keyboardage.
Since you confess to being a dunce I'd suggest trying a project which
doesn't involve the AC line, though.
--
Gordon S. Hlavenka www.crashelex.com nos...@crashelex.com
Grammar and spelling flames welcome.
Yes, that's really my email address. Don't change it.
Alright.... I'll do your homework.....
From port ,--. | | AC in
D0 4.7k .--.'C | | |
-------'\/\/\/`---(-|< ) | | |
GND B "--`.E | | |
--------o--------------' | | |
| ,-------------' | |
From ps | | -------------' |
+12 | | o------------. |
--------(-. o--(===) | |
GND | | _V_ (===) | |
--------' `--o--(===) | | To lamp
Info:
D0 means data bit 0.
The transistor should be a high gain NPN type, rated at a little above
the relay coil current.
The resistor is to provide current limiting and to prevent any mistakes
in your circuit from cooking your parallel port.
The reverse-biased diode across the coil is to prevent to voltage
spike when the relay is turned off from frying the transistor.
The relay is a 12v coil with SPST contacts, rated at least at your line
voltage and at a couple of amps.
The Power Supply can be either taken off the computer or off a seperate
one. A small 12v dc "Wall Wart" (plug-in transformer) might be a good
choice.
You should probably use polorized plugs and put the relay in the hot
side, or use a DPST relay and switch both the hot and netural.
There, is that simple enough? :-)
All you have to do to control it is set the bit high or low.
Now, remember to say on your report that Randy Gardner did all your
work for you.... :-)
Hope this helps, Randy.
--
--ran...@slip.net (Randy Gardner)
--http://www.slip.net/~randyg/index.htm - *New* Download a maze
program that lets you actually walk *inside* the maze!!
> As part of a final year project for uni i want to control a desk lamp
> from my pc. i've sorted the code which will control the Parallel port
> and need the SIMPLEST circuit diagram explaining how to wire the lamp to
> the comp. Ive looked at various other sites, but the stuff i found
> seemed....well, overkill. im a bit of a dunce when it comes to this
> electronics malarkey so i'd be soooooo grateful if you could explain
> things well. maybe someone knows a web page i should look at.....
I`ve found the book, Computer Interfacing (or something like that...) by
R.A Penfold (I think...) invaluable for this type of thing and is also
cheap, I got mine at Maplins, http://www.maplin.co.uk the UK compnent
suppliers who seem to be the best for cost and range, their catalogue
might give you a few ideas. The actual circuit is simple but be VERY
careful with the mains voltages and overloading the computer.
P.S I`ve recently begun using a PC for this type of stuff instead of my
now ageing Amiga and found where interfacing to the parallel port is
concerned, the Amiga is far superior with a Bi-directional port and 5V
present on one of the pins. On the PC, you seem to have to multiplex the
few input pins if you want to recieve 8 bits and take power either
externaly, internaly or from another port which seems to me to be a very
messy way to do things.
Mike W
dan walker wrote:
> right...im in a bit of a hole...i need some..err genius to help me out.
>
> As part of a final year project for uni i want to control a desk lamp
> from my pc. i've sorted the code which will control the Parallel port
> and need the SIMPLEST circuit diagram explaining how to wire the lamp to
> the comp. Ive looked at various other sites, but the stuff i found
> seemed....well, overkill. im a bit of a dunce when it comes to this
> electronics malarkey so i'd be soooooo grateful if you could explain
> things well. maybe someone knows a web page i should look at.....
>