Met deze schakeling kan je een relais aansturen met je paralelle poort:
Maar als ik deze schakeling zo bouw,
dan gaat het relais ALTIJD aan als ik de VCC en GND aansluit;
terwijl het de bedoeling is dat hij pas aangaat als de
paralelle poort 5V geeft!
Weet iemand hoe dat komt?
(ik ziet trouwens wel dat de voeding VCC diréct door het relais naar de gnd loopt. zou dat het kunnen zijn?)
De hele schakeling is te vinden op:
http://www.linuxdoc.org/HOWTO/mini/Home-Electrical-Control/
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
| | Vcc for Relay
|
|
/ -------+--------| |---------|
P data 4.7K B / c | 1N4002 |_| |-------
-----------/\/\/\/\---------+-----| NPN _____ | relay |home device
| \ e /_\ |-| |-------
LED X \ +--------| |---------|
P Ground | | |
----------------------------+-------+--------+
Relay Ground |
---------------------------------------------+
Below is the key to the diagram above:
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 |
Maar als ik deze schakeling zo bouw,
dan gaat het relais ALTIJD aan als ik de VCC en GND aansluit;
terwijl het de bedoeling is dat hij pas aangaat als de
paralelle poort 5V geeft!
Weet iemand hoe dat komt?
(ik ziet trouwens wel dat de voeding VCC diréct door het relais naar de gnd loopt. zou dat het kunnen zijn?)
De hele schakeling is te vinden op:
http://www.linuxdoc.org/HOWTO/mini/Home-Electrical-Control/