CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

brownout reset problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
dilip



Joined: 08 Mar 2016
Posts: 1
Location: kolkata, India

View user's profile Send private message

brownout reset problem
PostPosted: Tue Mar 08, 2016 12:44 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Mar 08, 2016 12:59 pm     Reply with quote

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: 19498

View user's profile Send private message

PostPosted: Wed Mar 09, 2016 2:15 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Mar 09, 2016 7:18 am     Reply with quote

Is the 12V supply for the lamp also supplying the regulator for the PIC?

Mike
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group