Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to test PIC hardware stability?

Status
Not open for further replies.

VictorPS

Member
I have design a PIC (16F877A) base project, with "watchdog", "power up reset" turn on.

I need help on : :?:
1. How I test the hardware & firmware stability? (prevent hay-wire)
2. How I simulate a noise, voltage spikes in lab, to see if the circuit can recover from hang ?
3. Any simple hardware design tips, to make the hardware more immune to noise?

Thank you, and Merry Christmas to everybody... :D
 

Oznog

Active Member
You don't. You have to rely on the spec sheet, they already did a lot of expensive testing.

Then in prototyping you will want to test it in-circuit, with the RESET resistor and the Vdd cap you plan to use, with the power supply you intend to use. You can try to put it in the noise environment you expect, in reality there are testing labs that handle this better if you want to do it properly.
 

VictorPS

Member
Sorry that I have ask very subjective question. :oops:

Actually the PIC base project is working perfectly when run in-house for a week without any problem.
However, when it is install at outdoor, it run fine initially, but may be a few hours, it just hang. After reset, it work again without problem, may be for a few days, it may hang again . (The PIC is not recover from hang.)

So I suspect problem may due to unstable power supply or noisy environment.
To solve the problem in-house, I need to be able to repeat and simulate problem. Hence, I am asking how to simulate noise, and throw the noise to the board and see what happened.

For firmware, I have turn on WDT, power up reset, brownout in my PIC 16F628, using internal 4MHz oscillator.
The clear watchdog is only place in main & delay routine, it shall be able to recover from hang. However, look like the watch dog is not function well.

For hardware, standard filtering on power supply, a 0.1uF cap put close to VCC of PIC.

The outdoor temperature, is less than 50deg C.

May be I ask other question:
1. Can watch dog itself hang? (it internal RC oscillator stop)
2. Can internal oscillator in PIC 16F628 stop?
3. Is PIC 100% reliable?

Thank you. :eek:
 

Nigel Goodwin

Super Moderator
Most Helpful Member
VictorPS said:
May be I ask other question:
1. Can watch dog itself hang? (it internal RC oscillator stop)

Anything is possible, but I've never heard of it!. It's far more likely the processor is stuck in a loop which includes a CLRWDT command.

2. Can internal oscillator in PIC 16F628 stop?

Again, I've never heard of it!

3. Is PIC 100% reliable?


Nothing is ever 100% reliable, but PIC's are generally reknowned for being reliable.
 

Oznog

Active Member
VictorPS said:
3. Is PIC 100% reliable?
Thank you. :eek:

Not 100%, but very reliable, and the problems it does have are well documented.

Frankly, you have done something wrong. Either your observations are off, or you have a different condition. I would suspect temp first, then different inputs (if you even have inputs). Noise is lower on list. All these involve you having made a problem with the circuit or code.

Examples:
1. Leaving a pin defined as an input, but not hooking anything up to it (floating).
2. No ceramic cap on the PIC's Vdd to gnd.
3. Funky RST pullup (10 meg or something)
4. No stability caps on the external Xtal, if used
5. Running the PIC at too high a freq for the Vdd you are using.
6. Oscillations in Vdd due to not using proper stability caps on Vin and Vout of the reg.
 

VictorPS

Member
My setup as below:
1. Yes, I leave the unused input floating, may be this cause problem.
2. A 0.1uf mylar cap put near to PIC VDD.
3. I Configure NO MCLR.
4. Using Internal 4MHz
5. What does it mean?
6. 4700uF + 0.1uf at Vin (12V), after 7805, is 10uF + 0.1uF (5V)

What is the best way to do with the unused pin?
I shall pull up/low using 4k7, tied to 5V/GND, or program the pin as output high/low?

Is 0.1uF mylar cap ok? or must be ceramic cap? Or other value like 0.01uF?

Thank you :)
 

StupidDum

New Member
In the first place you shouldnt have left ur PCB exposed to the outdoor environment.
Frog, water vapour, heat, ultraviolet ..etc will cause damage to ur PCB and IC. Maybe you should check if ur PCB is wet in the morning.
Get yourself a casing/box.
 

VictorPS

Member
The PCB is place inside a water resist metal box, but I can't guarantee the humidity is low. May be I can try to spray a layer of transparent paint to cover the PCB.

Thank you. :)
 

Oznog

Active Member
VictorPS said:
What is the best way to do with the unused pin?
I shall pull up/low using 4k7, tied to 5V/GND, or program the pin as output high/low?

Is 0.1uF mylar cap ok? or must be ceramic cap? Or other value like 0.01uF?

Define the unused pin as an output.
I have no experience with mylar, but strongly recommend ceramic. 0.1uF is fine.

Don't use normal paint. You've no idea if it will react with the metal, and may be porous and collect moisture rather than shielding. Get a can of something made for PCB coating.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Top