H
Haris
Guest
I'm trying to interface AT89C2051 mcu with a relay that inturn should
switch a 12V NC output.
AT89C2051
_____
5V________ | |
| | |
12V______ | | |
| | | |
| | | |
| | |_____|
| | |P1.7
| | |
| | |
5V NC NO | | \
| | | | | /
| | | | | / 10K Resistor
) | | | | \
( -- -- | | |
) / | | |
( / | | |
| Relay | | | |B
| | | | _
| |______| | / \ E |
|_____________________/ \_________||
|||
Transistor ||
| GND
The problem is that if device (EM lock) is connected, MCU will hang
after 1 day. I am saying that it hang since PC connected to it using
serial port unable to receive or send signal.
If the device is not connected, it works fine. At this point (and in
mydesperation to explain this) I thought that somehow the relay 12V
output is giving interference to the MCU. Since the relay is normally
open, the 12V current is there almost all the time.
Any idea?
Thanks in advance
switch a 12V NC output.
AT89C2051
_____
5V________ | |
| | |
12V______ | | |
| | | |
| | | |
| | |_____|
| | |P1.7
| | |
| | |
5V NC NO | | \
| | | | | /
| | | | | / 10K Resistor
) | | | | \
( -- -- | | |
) / | | |
( / | | |
| Relay | | | |B
| | | | _
| |______| | / \ E |
|_____________________/ \_________||
|||
Transistor ||
| GND
The problem is that if device (EM lock) is connected, MCU will hang
after 1 day. I am saying that it hang since PC connected to it using
serial port unable to receive or send signal.
If the device is not connected, it works fine. At this point (and in
mydesperation to explain this) I thought that somehow the relay 12V
output is giving interference to the MCU. Since the relay is normally
open, the 12V current is there almost all the time.
Any idea?
Thanks in advance