PDA

View Full Version : Reset problem



leonel
- 21st March 2006, 10:36
Hi...
Sorry to be out so long!
I'm facing a big problem with reset condition on PIC16F57, this is, when i turn on a motor by a relay sometimes my microcontroller makes a reset. I faced the same problem in PIC16F872 and i solved with a 4,7uF capacitor in MCLR pin, but in PIC16F57 doens't work.
Does anybody had this kind of problem?
What i have to do?

DynamoBen
- 21st March 2006, 19:29
Try putting a .01uF cap near the PIC between Vdd and Vss. You also may want to try a 10uF cap at the output of your voltage regulator.

Do you have a diode between the relay coil contacts?

If none of these suggestions work a schematic is going to be nesscary.

modifyit
- 21st March 2006, 19:36
If you can, check the STATUS register after the reset occurs and see if it tells you why the processor reset. It may be caused by power flucuations when the relay turns on the motor, and not by the mclr pin at all.

mischl
- 21st March 2006, 20:24
you are really sure that is a reset and not a undebounced input which executes an unexpected part of the code?
how is the BROWN-OUT RESET configure?

good luck

leonel
- 22nd March 2006, 15:50
Well, i think i solve my problem.
I have a 78L05 well regulated output with a 10nF ceramic capacitor between +5V and GND, also i also have flyback diodes across inductive loads.
What i did was to increase a little bit my MCLR pin with a diode. (likely the cause was the MCLR pin voltage decrease a little bit), I saw in datasheet and Voltage on MCLR with respect to VSS can go to +13.5V. Also, put a 10nF cap between Vss and GND (near my PIC).

sayzer
- 28th April 2006, 09:44
Here is something to add as a solution for those who still have reset problems.

1: Use 47K trimpot on MCLR pin.
2: Adjust the trimpot untill the resetting stops. Requires hard reset after each change.
3: Remove the trimpot, measure the resistance value, and use a resistor at the same value.
4: Done.

BOD_OFF did not work for me but a trimpot at MCLR pin solved the problem.

GoTo 1

--------------------------

Melanie
- 28th April 2006, 16:53
I've never designed a circuit that, where MCLR required connecting, nailing it directly to Vdd was a problem (excluding of course ICSP applications). If you have got so much crap coming down your Supply line that trips out your PIC, then it's time you seriously thought about redesigning your Supply circuit. Because if you go and smooth-out MCLR on it's own, the rest of your PIC is still getting a rubbish supply... then that's going to affect Voltage References, Comparators, ADC's, the point at which your I/Os switch etc etc.

Acetronics2
- 29th April 2006, 10:03
Hi, Leonel

One simple solution is to bring the 5 v to the PIC ( only the PIC ...) through a diode ( Low drop Schottky if required ) and havind a BIG capacitor ( say 470 - 1000µF ) connected to the Cathode. This doesn't keep you from having the usual 10µF and .1µF decoupling caps.

This will filter spikes, and allow powering the PIC if supply voltage falls too low.

This also permits to shut down all peripheral components BEFORE the Pic goes to bed ... always having known peripheral states at power off.

Alain

Hi, Mel

When you design an Electronic Ignition or a High Voltage device from a battery , you DO NOT have the choice for a "nice and clean" supply !!! ...

Melanie
- 29th April 2006, 10:51
I disagree Alain

The electronics that you design-in between the PIC and the incomming Power Source, be it vehicular or Battery sourced always ensures the PICs supply is clean. If it's not, then you have a disaster waiting to happen - the TGV will derail, the Président de la République Française will resign, the Government will fall, the Guilotine will be taken out of storage and sharpened - and it will all be your fault.

Acetronics2
- 29th April 2006, 11:01
the Président de la République Française will resign, the Government will fall, .

Do you REALLY think it would be a disaster ???

It's evident you don't live here !!! And you do not know anything about Jacques ( Old friend of mine ... )

Alain

PS: aboard your car, you take a diesel generator for the electronics to work ??? ...

Melanie
- 29th April 2006, 12:44
Aboard my car I design-in circuitry between the Supply and the PIC so that the PICs supply is clean. I ensure the raw supply tracks and components are away from the clean-side tracks and components. I ensure the PCB is well designed to absorb induced transients harmlessly. I ensure all I/O's (Analogue or Digital) that go off my PCB are filtered accordingly. But, most importantly, I ensure my public liability insurance is paid-up.

Jacques is a Gaullist... it is well known they prefer Atmel...

I didn't really want to mention it but... recent Reuters photograph shows rioting in Paris street after PIC controlled model airplane slams into street toilet on Rue de Sevres... Journal Le Monde quotes "the devastating methane explosion scattered toilet paper across a wide area and flash-backed down the sewers starting fires in several city suburbs"... see... it's all caused by bad PSU design.

sayzer
- 29th April 2006, 12:51
Here is an experience for free.

- Seven 24V/1A motors are connected to power supply along with PIC.
- PIC drives tiny relays directly, pulls 23mA, and tiny relays drive 24V relays for motor loads.
- "Sometimes", PIC resets, but not due to the drop in supply voltage. Pls see below.

1. I used separate power supply for PIC. = No change.
2. I used battery only for PIC. = No change
3. I used BOD_ON and OFF and got crazy around its configs. = No change
4. I used forum search, online search, data sheets, the other ones, all the other other ones, and yes those too. = no change
5. Finally, I used a trimpot on MCLR pin, as mentioned above, and fixed the problem adjusting it.
6. No more reset.

Even though once there was no connection between PIC circuit and motors (separate power supply), I still had reset issue.

Now, motors and PIC (BOD_ON) are on the same power supply, no reset occurs.

Meanwhile, BOD_OFF creates LCD problems while it is not supposed to.

Acetronics2
- 29th April 2006, 14:45
Jacques is a Gaullist...

> Sorry ... he's just an opportunist ... in 68' De Gaulle had called the army tanks ( to be precise they were waiting in Rambouillet ... 50 kms from Paris ) ; here, for the CPE Jacques just lost his pair of trousers ...

Always remember being Gaullist means being a real man ...

it is well known they prefer Atmel ... ( ?????? )

I didn't really want to mention it but... recent Reuters photograph shows rioting in Paris street after PIC controlled model airplane slams into street toilet on Rue de Sevres... Journal Le Monde quotes "the devastating methane explosion scattered toilet paper across a wide area and flash-backed down the sewers starting fires in several city suburbs"... see... it's all caused by bad PSU design.


I'd rather think "THE" model airplane was slammed down due to a huge methane release into the street toilets.

Those toilets vents surely could not bear the induced internal overpressure.

But I know you're joking : Have you ever seen any toilet paper available in our country street toilets ???

Us, We do not have the "Times" to read ...

Cheers

Alain

mister_e
- 29th April 2006, 18:35
Have you ever seen any toilet paper available in our country street toilets ???

mmm as Colonel Harland Sanders (KFC) said... "Finger licking good!"

I wasn't aware that you have any toilet in France anyway :)

sayzer
- 1st May 2006, 06:27
I wasn't aware that you have any toilet in France anyway :)


Steve,

We should be thankful to France having no toilet anyway (if that is true of course).

The best perfumes were invented in France and today's best perfume brands come from there, remember?

Acetronics2
- 1st May 2006, 09:57
Hi, Sayzer

Sorry once more, but perfumes were invented very, very long times ago, and not so far from your country ...

It's easy to understand why : try the "turkish" toilets, and you'll discover how elders were trying to wash their feet during "uptide".

Perfume was an absolute need then, as perfume alcohol ( what does the Coran say about that ??? I'm curious to know ...) could remove most of glued organic stuff from the feet.

Best inventions always come from simple needs ...

Alain

mister_e
- 1st May 2006, 13:26
The best perfumes were invented in France and today's best perfume brands come from there, remember?

Probably. But hey, perfumes, in french, are also called "eau de toilette" = Toilet water LMAO!

Acetronics2
- 1st May 2006, 14:35
Probably. But hey, perfumes, in french, are also called "eau de toilette" = Toilet water LMAO!

Hi, Steve

If you wanna keep a girl home, it's time to learn the difference between "eau de toilette" and "parfum"...

Not only the price ...

héhé ...

Alain

mister_e
- 1st May 2006, 14:44
ahhh this is the reason why!! mmm thanks Alain!

sayzer
- 1st May 2006, 15:08
It's easy to understand why : try the "turkish" toilets, and you'll discover how elders were trying to wash their feet during "uptide".

Yes, they were at least trying to wash; and started doing it more then 1000 years ago Alain!



If you wanna keep a girl home, it's time to learn the difference between "eau de toilette" and "parfum"...


ahhh this is the reason why!! mmm thanks Alain!

I have to admit and agree with Steve . I did not know that fact Alain. I will get back to you if that does not work. Thanks for the tip.


---------------------------

NavMicroSystems
- 1st May 2006, 18:14
And if the girl still browns out or resets, put a POT on her.

mister_e
- 1st May 2006, 19:01
Or simply flush her!

sayzer
- 2nd May 2006, 06:46
And if the girl still browns out or resets, put a POT on her.

I used BOD_ON and had a loooong I/O connection with short pauses after each reset.

However, after fifth or sixth reset which I could not count quite precisely, it becomes quite difficult to keep the output port HIGH as the PSU gets quite hot and supply voltage drops dramatically. I did not observe this at the input port as it kept accepting the incoming packets!

Ohh almost forgot;
The result: “If you wanna keep a girl home”, in addition to Alain’s suggestion above, having a good PSU with optional internal cooling fan could also help.


Any other suggestions for longer I/O connections?



-----------------------------