relay screwing up microcontroller operation

Status
Not open for further replies.

babash88

Newbie level 3
Joined
Feb 2, 2008
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,307
i need help. I'm using a ds89c450 microcontroller to operate a 12V compressor. The relay that i'm using is a regular 12V relay used in auto electronics. When the relay is not connected the microcontroller functions as it should, however, when the relay is connected, the microcontroller begins to malfunction, giving all sorts of wacky outputs. The relay is connected using a transistor. A diode is also connected across the relay input terminals for back emf protection. I asked around and was told to connect small capacitors across power terminals of all IC's. I've used 0.1uF capacitors. this unfortunately has not worked. Can anyone help me?
 

Hi,
You have to find out if the disturbance to the micro is caused by the power supply loading or due to the radiated noise from the relay contacts/ compressor.

1. Are you using the same 12V source for generating 5V for the micro? How much current the relay + compressor take fron 12 V? Does the same thing happen if you only turn on the relay without connecting the compressor? Can you observe the 5V level with an oscilloscope when the relay/compressor is turned on?
The best practice is to use a separate power supply for such high current devices and make the common grounding between the two supplies only at one point. Also use adequate filtering for the micro Vcc supply.

2. If the noise coupling is due to radiated noise from relay contacts use a spike suppressor across the compressor. Use shielding for the micro circuits. Physically move the relay and compressor away from the control circuits.

Regards,
Laktronics
 

try to connect a small resister serial with the relay
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…