View previous topic :: View next topic |
Author |
Message |
dilip
Joined: 08 Mar 2016 Posts: 1 Location: kolkata, India
|
brownout reset problem |
Posted: Tue Mar 08, 2016 12:44 pm |
|
|
Hi, I am doing a small project to ON and OFF a incandescent lamp by using a relay. and bulb is on or off is display in 3-digit seven segment by message. I am using a 12VDC relay for switching purpose.
My problem is that when relay is switching microcontroller is reset. And it is shown that it is brownout reset. If i disable brpwmout reset in fuse bit, then it is also reset and shown some other cause and if it display in seven segment it is shown 63.
Can anyone tell what is the problem? I am using microcontroller PIC16F676. with internal RC oscillator. _________________ as |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9221 Location: Greensville,Ontario
|
|
Posted: Tue Mar 08, 2016 12:59 pm |
|
|
Classic back EMF from relay is causing the PIC to reset. Normally you have a diode across the relay coil.
Also
What design is the power supply? PIC needs a stable, clean 5 volts, well decoupled from the relay supply voltage.
You also need great grounds proper use of decoupling caps at PIC power leads.
Jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19497
|
|
Posted: Wed Mar 09, 2016 2:15 am |
|
|
Temtronic has given the basic answer.
It has been covered here many times.
Switching 'off' is normally the problem. You have to understand that the inductor (the coil in the relay), stores energy, and this has to go _somewhere_ when the relay is turned off. Unless you have circuitry to handle this, it ends up resulting in a huge voltage being generated (this switching is the basis of high voltage generators like those used in flash guns), and then through the drive transistor breaking down, and into the PIC. The result can be anything.....
Trap diode, snubber, etc. etc.. All methods of cleanly dissipating this energy. |
|
|
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Wed Mar 09, 2016 7:18 am |
|
|
Is the 12V supply for the lamp also supplying the regulator for the PIC?
Mike |
|
|
|