Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] When the relay in the circuit turns off MCU starts heating

Status
Not open for further replies.

burrow

Full Member level 2
Full Member level 2
Joined
Dec 15, 2014
Messages
147
Helped
3
Reputation
6
Reaction score
3
Trophy points
18
Activity points
1,148
Hai,
iam on a project using PIC MCU's, its in the final stage now. But i noticed a really weird problem. Everything is working really fine except one. on receiving some signals the MCU turns on a relay.

MCU drives BC547 transistors's base, the relay is connected to this transistor.
The relay turns on fine when it receives signal. But when the relay turns OFF everything starts going wrong.. My LCD display starts blinking rapidly and MCU starts heating. Everything gets back to normal after a restart.

What might be wrong ?
 

Try to apply a parallel diode on your relay coil. This will cutting off the impulses from coil.

relay.png
 

OK i will try that and let you know the result.. anything else to try out ?
 

I hope this thing will help for you!

The relay coils generate huge voltage impulse when the current interrupted without diode. The impulse react to the mcu.
 

hello,

you can also add a RC ciruit across the contact, and modify the cde of transistor
to limit the "parasites" sensitivity
R accross base and ground to fixe the Vbe potential.

Image1.jpg
 

As you know according to lenz law , when you turnoff the relay ,the current still wants to flow in the same direction , which in result, put a lot of stress on your bjt ,so adding a freewheeling diode at the solenoid of the relay will provide a path for that current and the stress on the bjt will be reduced.
 

What kind of load is driven by the relay contact ?
Do you have same problem if no load is connected on relay ?
 

Show your schematic!!!

Make sure that the mcu power supply is separated from the relay power supply. And the size of the capacitor that is the MCU supply source.
 

what load is connected on relay? its high voltage like 220V or low? as if 220V then may be its EMI problem.
 

Mrunal Ahirrao said:
what load is connected on relay? its high voltage like 220V or low? as if 220V then may be its EMI problem.
i don't think 220V is responsible for EMI , because line frequency is very low i.e. 50Hz. And relay also provides isolation .so EMI due to 220V is meaningless.
 

i don't think 220V is responsible for EMI , because line frequency is very low i.e. 50Hz. And relay also provides isolation .so EMI due to 220V is meaningless.
Keep on dreaming.

Or let's say it should be meaningless in case of a perfectly designed processor circuit. In a real world contact arcing is quite often generating strong radiated EMI that's picked up by the low voltage circuit. If the processor hasn't good power supply bypass, or some processor pins are exposed to radiated interferences by connected "antenna wired" without sufficient filtering and overvoltage processing, they can cause code malfunction or even IC latchup.
 
Actually my question was related to problem when their was no load. i havent tried loading it yet.

the load will be 300watt motor, should i take additional precautions other than diode?.

The rectifier circuit for PIC is made of 2200microfarad capacitor, and pic supply has an additional 10uf near its supply.
 

Put a 100 nF 16V across power pins of PIC in parallel with 10uF. In power supply put a 100 nF 50V before and after 7805 between Vin and GND and another between Vout and GND. Put a 100 nF in parallel to relay coil. A 1N4007 should also be in parallel to relay coil.
 

Getting the described behaviour without a load connected is somehow mysterious. It's not well understandable, even if you erroneously omitted a free-wheeling diode across the relay coil.
 

Actually my question was related to problem when their was no load. i havent tried loading it yet.

the load will be 300watt motor, should i take additional precautions other than diode?.

The rectifier circuit for PIC is made of 2200microfarad capacitor, and pic supply has an additional 10uf near its supply.

Well, first thing is that, Could you please share your schematic. If not completely, then only the portion which drives the relay.

Secondly, how are you powering the relay? If free-wheeling diode does not solve your problem then you can try using a separate supply to power up the relay. But since you mentioned that turning the relay ON does not cause any problem, so this might not be the case for you.

The most probable cause would be the property of inductor which tries to maintain the current across it after the power across it is removed. As you have said that it is doing problem when you turn OFF the relay, then this is most likely the problem of that inductor property. Because in my experience, if the power supply is crummy and/or the source current does not fulfil the need of relay, then the relay does not even turn ON or may even get turn ON and OFF continuously causing the MCU to reset. But if this is not the case with you, I would suggest go for the free-wheeling first.
 

Well, first thing is that, Could you please share your schematic. If not completely, then only the portion which drives the relay.

Secondly, how are you powering the relay? If free-wheeling diode does not solve your problem then you can try using a separate supply to power up the relay. But since you mentioned that turning the relay ON does not cause any problem, so this might not be the case for you.

The most probable cause would be the property of inductor which tries to maintain the current across it after the power across it is removed. As you have said that it is doing problem when you turn OFF the relay, then this is most likely the problem of that inductor property. Because in my experience, if the power supply is crummy and/or the source current does not fulfil the need of relay, then the relay does not even turn ON or may even get turn ON and OFF continuously causing the MCU to reset. But if this is not the case with you, I would suggest go for the free-wheeling first.


I have been busy with some other problems ( heating max232 ic ).. and couldnt test the relay part with free wheeling diode yet..

and u asked me about my circuit..

its something like this. its a 9v relay.
My power supply is 12v which goes into 7805 and then to microcontroller.
one of the pins of microcontrollere goes to bc547 transistor.

one terminal of the relay goes to transistor and other to +12v supply.
 

Then, in my opinion, free-wheeling should resolve your issue. Please try that when you get time.

Thanks.
MSBR
 

Hey guys, i just tried out a free wheeling diode ,a resistor , and a capacitor across relay coils. Problem seems to be solved..
havent tried connecting load yet. will get back to you tomorrow after testing with load
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top