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 support@ccsinfo.com

What can trigger normal power up restart cause?

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



Joined: 20 Jul 2011
Posts: 375

View user's profile Send private message

What can trigger normal power up restart cause?
PostPosted: Fri Jan 18, 2013 6:41 am     Reply with quote

Hi, everyone. I have a microcontroller (18F4431) put into an industrial environment. It controls high power circuit through optocouplers. Without the high voltage everything works fine, but when I turn it on it starts to reset every time when it turn on the optocouplers. The restart cause is normal power up. I'm quite sure my power supply (5V) is not going down(I tried with battery) and it's galvanic separated. Can you tell me what else can cause this? What are the standard practices to deal with such problem?
Thanks!
temtronic



Joined: 01 Jul 2010
Posts: 9161
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Jan 18, 2013 7:01 am     Reply with quote

Welcome to the nasty,dirty world of EMI.
Good news is you've found out where(more or less) the 'noise' is coming from.
Bad news is it may take you quite awhile to supress it.
Either the noise is airborne or wiring related.

Things that may work include..
1)Increasing the ground wiring. Traces on PCBs these days are thin so tack solder solid 22g wire on top of the ground and power traces.Ensure there's a solid ground perimeter.

2) add caps,MOVS,TVS devices to ALL input and output points of the PCB.This includes digital I/O AND power supply even LEDs.

3)supress the noise at the loads.again cap or MOVs may help.Use smaller gauge wires to the loads(allows more current,faster,less V drop).

4)'beef up' the MCLR line of the PIC.

5) If you have access to a 'storage scope' GREAT! It's one of the best tools to 'see' the problem and isolate it.

6)Is the PCB in a metal enclosure, properly grounded to Mother Earth or just 'laying exposed' on the bench?

7)Power supply? If you draw say 1/2A,design for 2Amps or more! A sudden power supply 'dip' can cause 'reset' problems.

In my former 'life' I designed and built minicomputers into optical emission spectrometers.They generated LOTS of HV at several AMPS yet I could read the 32 PMTs down to 2mV.
It's a process of observe,try something,run,repeat....untill you nail it down.Just be methodical,take notes and make ONE change at a time.

hth
jay
stoyanoff



Joined: 20 Jul 2011
Posts: 375

View user's profile Send private message

PostPosted: Fri Jan 18, 2013 8:05 am     Reply with quote

My power supply is simple - transformer, rectifier, electrolite cap 4700uF, regulator, electrolite cap 4700uf. I have 100uF electrolite and 100n nonelectrolite cap to the controller. I have 100nF cap on MCLR to GRD. I tried to supply the pcb with a battery and I had the same problem. So I think the problem is not in the power supply. The output pins are problem. I`m generating PWM and if I put caps on these pin this will disturb the pulses.
Is it possible the problem to be in the oscillator? If I have an oscillator fail what will happen? Reset? I connected the oscillator corpus to GRD, but it doesn`t help. The PCB hasn`t connection to Earth ground. I want to be galvanic isolated, because if I have a short circuit it could hit the microcontroller.
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Fri Jan 18, 2013 8:06 am     Reply with quote

1- is MCLR tied high or not used by fuse setup?
2- is there a high value capacitor on PIC +5V ?
( ideally i would feed +5 to pic thru a shottky diode) and add
a 100uf tantalum cap at the Vcc - ground right at the pic terminals as a start
Ttelmah



Joined: 11 Mar 2010
Posts: 19326

View user's profile Send private message

PostPosted: Fri Jan 18, 2013 8:41 am     Reply with quote

Obvious comment, is get rid of the second 4700uF capacitor. This is _not_ wanted, and indeed can kill the regulator, or is very likely to make it oscillate. The Ti application note for a standard 7805 regulator, has 1uF to 100uF on the secondary side. Bigger is not always better....

How is the rectification done?. Full wave or half wave?.
What is the AC voltage of the transformer?.
What is the regulator?.
What is the total load?.
How are the opto LED's connected. What resistor value?.

Best Wishes
stoyanoff



Joined: 20 Jul 2011
Posts: 375

View user's profile Send private message

PostPosted: Sun Jan 20, 2013 3:58 am     Reply with quote

I remove the unneccessаry parts and supplied the controller only through the PicKit 3. So now I have a new result. When I turn on the debugger for the first time the restart cause is normal power up, but after that it restarts and the arrow which shows the current instruction stays only on row 1
#include <18F4431.h>. It doesn`t reach the first break point on the restart cause.
Everytime after that when I turn on the debugging it starts and stops almost immediately and it points to #include <18F4431.h>.
It doesn`t do this when the high power voltage is off.
The resistors value are 560ohms. I tried with 330ohms but there is no change.
I tried with power supply from a battery. No chage.
Any ideas?
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