📄 tranmistor.htm
字号:
<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head><body>
<blockquote>
<a name="PPRIC"></a>
<center><h3>Parallel Port Relay Interface</h3></center>
<p>
Below are three examples of controlling a relay from the PC's parallel printer
port (LPT1 or LPT2). Figure A shows a solid state relay controlled by one of
the parallel port data lines (D0-D7) using a 300 ohm resistor and 5 volt power source.
The solid state relay will energize when a "0" is written to the data line.
Figure B and C show mechanical relays controlled by two transistors. The
relay in figure B is energized when a "1" is written to the data line and
the relay in figure C is energized by writing a "0" to the line. In each
of the three circuits, a common connection is made from the negative side
of the power supply to one of the port ground pins (18-25).
</p><p>
There are three possible base addresses for the parallel port You may need
to try all three base addresses to determine the correct address for the port
you are using but LPT1 is usually at Hex 0378. The QBasic "OUT" command can
be used to send data to the port. OUT, &H0378,0 sets D0-D7 low and OUT,
&H378,255 sets D0-D7 high. The parallel port also provides four control lines
(C0,C1,C2,C3) that can be set high or low by writing data to the base
address+2 so if the base address is Hex 0378 then the address of the control
latch would be Hex 037A. Note that three of the control bits are inverted so
writing a "0" to the control latch will set C0,C1,C3 high and C2 low.
</p><p>
<img src="TRANMISTOR_files/printer2.gif">
</p><center><a href="http://ourworld.compuserve.com/homepages/Bill_Bowden/homepage.htm#menu">Menu</a></center>
<p>
<a name="p_input"></a>
</p><center><h3>Reading Data From The Parallel Port</h3></center>
<p>
The diagram below shows 5 switches connected to the 5 input lines
of the parallel port. An external 5 volt power supply is used to
provide high logic levels to the input pins when the switches are open.
Three 1.5 volt batteries in series can be used to obtain 4.5 volts
which is close enough. The 330 ohm resistors in series with the port
connections provide some protection in case a connection is made to the
wrong pin. If you are sure of the connections, the 330 ohm resistors
can be left out and the switches connected directly to the input pins.
The negative side of the power supply should be connected to the ground
point, or any pin from 18 to 25.
</p><p>
The following short QBasic program can be used to read the state of the
switches. QBASIC.EXE can be found in the "OLDMSDOS" directory of the
Windows 95/98 CD Rom. Note that there are three possible printer port
address that correspond to LPT1, LPT2 and LPT3 and LPT1 is usually the
one to use which is at address decimal 889. The program waits for the
user to press the enter key before reading the state of the 5 input lines.
The state of the 5 lines is received as a single 8 bit number between 0-255
which is stored as the value of (V). Each switch input represents a decimal
value of 8,16,32,64 and 128 which correspond to pins 15,13,12,10 and 11.
The last 3 bits (1,2 and 4) are not used and should return a high level,
so the value received with all switches open should be 1+2+4+8+16+32+64=127.
If a switch is closed and the input is at ground, the value will be 0 except
for pin 11 which is inverted and yields a value of 128 and 0 when high,
so the value received when all switches are closed should be 1+2+4+128=135.
<br>
-----------------------------------------------------------------------
</p><p>
CLS
<br>DEFINT A-Z
<br>Address = 889: REM 889 = port address, other addresses could be 633 or 957
<br>PRINT "Press the enter key to read printer port pins (15,13,12,10,11)"
<br>PRINT "A (0) reading indicates the pin is at ground level, (1) indicates"
<br>PRINT "the pin is at a high level or unterminated."
<br>INPUT A$
<br>V = INP(Address)
<br>PRINT V
<br>P11 = 1
<br>IF V > 127 THEN P11 = 0: V = V - 128
<br>IF V > 63 THEN P10 = 1: V = V - 64
<br>IF V > 31 THEN P12 = 1: V = V - 32
<br>IF V > 15 THEN P13 = 1: V = V - 16
<br>IF V > 7 THEN P15 = 1
<br>PRINT
<br>PRINT "Pin 15 ="; P15
<br>PRINT "Pin 13 ="; P13
<br>PRINT "Pin 12 ="; P12
<br>PRINT "Pin 10 ="; P10
<br>PRINT "Pin 11 ="; P11
<br>END
</p><p>
<img src="TRANMISTOR_files/p_input.gif">
</p><center><a href="http://ourworld.compuserve.com/homepages/Bill_Bowden/homepage.htm#menu">Menu</a></center>
<hr>
<a name="amtrans.gif"></a>
<center><h3>Micro Power AM Broadcast Transmitter</h3></center>
<p>
In this circuit, a 74HC14 hex Schmitt trigger inverter is used as a
square wave oscillator to drive a small signal transistor in a class C
amplifier configuration. The oscillator frequency can be either fixed by
a crystal or made adjustable (VFO) with a capacitor/resistor combination.
A 100pF capacitor is used in place of the crystal for VFO operation.
Amplitude modulation is accomplished with a second transistor that controls
the DC voltage to the output stage. The modulator stage is biased so that
half the supply voltage or 6 volts is applied to the output stage with no
modulation. The output stage is tuned and matched to the antenna with a
standard variable 30-365 pF capacitor. Approximately 20 milliamps of
current will flow in the antenna lead (at frequencies near the top of the
band) when the output stage is optimally tuned to the oscillator frequency.
A small 'grain of wheat' lamp is used to indicate antenna current and
optimum settings. The 140 uH inductor was made using a 2 inch length of
7/8 inch (OD) PVC pipe wound with 120 turns of #28 copper wire. Best
performance is obtained near the high end of the broadcast band (1.6 MHz)
since the antenna length is only a very small fraction of a wavelength.
Input power to the amplifier is less than 100 milliwatts and antenna length
is 3 meters or less which complies with FCC rules. Output power is somewhere
in the 40 microwatt range and the signal can be heard approximately 80 feet.
Radiated power output can be approximated by working out the antenna
radiation resistance and multiplying by the antenna current squared. The
radiation resistance for a dipole antenna less than 1/4 wavelength is
</p><p>
R = 80*[(pi)^2]*[(Length/wavelength)^2]*(a factor depending on the form of the current
distribution)
The factor depending on the current distribution turns out to be
[(average current along the rod)/(feed current)]^2 for short rods, which
is 1/4 for a linearly-tapered current distribution falling to zero at
the ends. Even if the rods are capped with plates, this factor cannot
be larger than 1. Substituting values for a 9.8 foot dipole at a frequency
of 1.6 MHz we get R= 790*.000354*.25 = .07 Ohms. And the resistance will be
only half as much for a monopole or 0.035 Ohms. Radiated power at 20 milliamps
works out to about I^2 * R = 14 microwatts.
</p><p>
Reference: <a href="http://www.ee.surrey.ac.uk/Personal/D.Jefferies/radimp.html">
Radiation impedances of wire and rod antennas. </a>
</p><p>
<img src="TRANMISTOR_files/amtrans.gif">
</p><center><a href="http://ourworld.compuserve.com/homepages/Bill_Bowden/homepage.htm#menu">Menu</a></center>
<hr>
<a name="fm.gif"></a>
<center><h3>FM Beacon Broadcast Transmitter (88-108 MHz)</h3></center>
<p>
This circuit will transmit a continuous audio tone on the FM broadcast
band (88-108 MHz) which could used for remote control or security
purposes. Circuit draws about 30 mA from a 6-9 volt battery and can
be received to about 100 yards. A 555 timer is used to produce the
tone (about 600 Hz) which frequency modulates a Hartley oscillator.
A second JFET transistor buffer stage is used to isolate the oscillator
from the antenna so that the antenna position and length has less effect
on the frequency. Fine frequency adjustment can be made by adjusting the
200 ohm resistor in series with the battery. Oscillator frequency is
set by a 5 turn tapped inductor and 13 pF capacitor. The inductor was
wound around a #8 X 32 bolt (about 3/16 diameter) and then removed by
unscrewing the bolt. The inductor was then streached to about a 3/8 inch
length and tapped near the center. The oscillator frequency should come out
somewhere near the center of the band (98 MHz) and can be shifted
higher or lower by slightly expanding or compressing the inductor.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -