old-www/HOWTO/Home-Electrical-Control/circuit.html

220 lines
4.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Electronic Circuit</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Home Electrical Device Control HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="System Requirement"
HREF="sysrequirements.html"><LINK
REL="NEXT"
TITLE="Examples of Relays"
HREF="relay.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Home Electrical Device Control HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="sysrequirements.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="relay.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="CIRCUIT"
></A
>3. Electronic Circuit</H1
><P
>The data line of the parallel port can provide between 0 and 5 volts.
Therefore, we can use this line to control a relay and let that relay control
an electrical device.</P
><P
>Use pins 2 through 9 to get +5V</P
><P
>Use pins 18 through 25 as the Ground</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
>&#13; ____________________________________________________________
/ \
\ 13 12 11 10 9 8 7 6 5 4 3 2 1 /
\ /
\ 25 24 23 22 21 20 19 18 17 16 15 14 /
\______________________________________________________/
| Vcc for Relay
|
|
/ -------+--------| |---------|
P data 4.7K B / c | 1N4002 |_| |-------
-----------/\/\/\/\---------+-----| NPN _____ | relay |home device
| \ e /_\ |-| |-------
LED X \ +--------| |---------|
P Ground | | |
----------------------------+-------+--------+
Relay Ground |
---------------------------------------------+
</PRE
></FONT
></TD
></TR
></TABLE
><P
>Below is the key to the diagram above:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
>P data parallel port data line(pin 2 to pin 9, use any)
P Ground parallel port ground (pin 18 to pin 25, use any)
Vcc depends on the type of your relay. I'm using 12VDC
Relay Ground the ground for 12VDC
4.7k 4.7K resistor
NPN C2235 NPN transistor
1N4002 1N4002 diode
LED light emitting diode
relay a coil relay</PRE
></FONT
></TD
></TR
></TABLE
><P
>+5 volts from parallel port will turn on the relay. Once the relay is on,
the device connected to that relay will be on. When the parallel port's data
line goes back to 0, it will turn off the relay, and device is off.</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="sysrequirements.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="relay.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>System Requirement</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Examples of Relays</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>