|
Analog to Digital
Converter:
An A/D converter is used to convert analog
signals to digital quantity. The digital output
is fed to parallel port through multiplexer. The
most popular method of analog to digital
conversion is successive approximation method.
This method has excellent compromise between
accuracy and speed. We need not have to trade
one thing for other. An unknown voltage Vin
is compared with a fraction of reference voltage
Vr. For n bits digital output
comparison is made n times with different
fractions of Vr and the
value of a particular bit is set to 1, if Vin
is greater than the set fraction of Vr.
The bit is set to 0 if Vin is
less than the set fraction of Vr.
Light Dependence
Resistance:
The
resistance of LDR increases with decreasing
intensity of incident light. When intensity of
incident light decreases the voltage across LDR
increases.
Rectifying Diodes
(1N4007):
These diodes
have been used for rectification purposes.
Rectification is the process of converting
alternating signal into direct signal. It is
generally complemented by a RC filter to clip
off the ripples.
Small Signal
Diode (1N4148):
It is used
for voltage regulation purposes. These diodes
prevent circuit overloading. These also help in
protecting the circuit from static charges.
3-Terminal Positive Voltage Regulator (LM7805):
The 3-terminal positive voltage regulators
employ built in current limiting, thermal
shutdown and safe-operating area protection
which make them virtually immune to damage from
output overloads.
3.6.2 Relay
:
The following circuit is the simples interface
you can use to control relay from parallel port:
Vcc

The circuit can handle
relays which take currents up to 100 mA and
operate at 24V or less. The circuit need
external power supply which has the output
voltage which is right for controlling the relay
(5..24V depending on relay). The transistor does
the switching of current and the diode prevent
spikes from
the relay coil form
damaging your computer (if you leave the diode
out, then the transistor and your computer can
be damaged).
Since coils (solenoids and relay coils) have a
large amount of inductance, when they are
released (when the current is cut off) they
generate a very large voltage spike. Most
designs have a diode or crowbar circuit designed
to block that voltage spike from hitting the
rest of the circuit. If that diode is bad, then
the voltage spike might be destroying your
"sink" transistor or even your I/O card over a
period of time. The mode of failure for the sink
transistor might be short circuit, and
consequently you would have the solenoid tap
shorted to ground indefinitely.
The circuit can be also used for controlling
other small loads like powerful LEDS, lamps and
small DC motors. Keep in mind that those devices
you plan to control directly from the transistor
must take less than 100 mA current.
Opto isolator
:
If you want to have a very good protection of
the parallel port you might consider
opto-isolation using the following type of
circuit:
The opto-isolator is there to protect the port.
Note that there are no connections between the
port's electrical contacts. The circuit is
powered from external power supply which is not
connected to PC if there is no need for that.
This arrangement prevents any currents on the
external circuits from damaging the parallel
port.
The opto-isolator's input is a light emitting
diode.R1 is used to limit the current when the
output from the port is on. That 1kohm resistor
limits the current to around 3 mA, which is well
sufficient for that output transistor driving.
The output side of the opto-isolator is just
like a transistor, with the collector at the top
of the circuit and the emitter at the bottom.
When the output is turned on (by the input light
from the internal LED in the opto-coupler),
current flows through the resistor and into the
transistor, turning it on. This allows current
to flow into the relay.
Turning the input on the parallel port off
causes the output of the opto-isolator to turn
off, so no current flows through it into the
transistor and the transistor turns off. When
transistor is off no current flows into the
relay, so it switches off. The diode provides an
outlet for the energy stored in the coil,
preventing the relay from back feeding the
circuit in an undesired manner.
The circuit can be used for controlling output
loads to maximum of around 100 mA (depends
somewhat on components and operation voltage
used). The external power supply can be in 5V to
24V range.
|