Searching \ for 'Intermittent Problems' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=intermittent+problems
Search entire site for: 'Intermittent Problems'.

Truncated match.
PICList Thread
'Intermittent Problems'
1997\04\05@175314 by John Waterman

flavicon
face
I am a newcomer to PICs and have been having problems with my first
project. I am using a 16C84 with Port A as all inputs and Port B as all
outputs. Initially the PIC was just controlling LEDs, and although it
worked fine most of the time, occasionally an output would come on for no
apparent reason. The only interrupt I am using is the RTCC overflow one,
and I take the precaution of saving W and STATUS at the beginning of the
interrupt routine and restoring them at the end.

I carried on with the project and connected the outputs to solid state
relays which in turn control contactors using 110volt a.c. coils. Whenever
the 110volts was turned on the problem became considerably worse. I then
discovered that by replacing a sequence such as

BCF             PORTB,0
BSF             PORTB,1
with
MOVLW   2
MOVWF   PORTB
the problem decreased dramatically.

I have a subroutine which redefines the TRISs and OPTION, and I call this
before virtually all I/O read or writes as recommended in the data sheet
for a noisy environment. I also discovered that by putting a delay of
around 50mS at the end of this subroutine the program then became virtually
trouble free. An occasional problem would occur at just one part of the
cycle, but this was 'side-stepped' by changing the sequence of events and
then everything appeared to be fine.

I carried on further, and connected the outputs from the contactors to
415volt 3phase motors, and with these motors running under no load
conditions everything still appeared to be fine, although testing at this
stage was rather limited. When however the machine was put on load,
problems returned. Sometimes it will work fine but at other times it will
go wrong in an unpredictable manner. I have put varistors across the
110volt coils but with little or no effect. The PIC is inside a metal box
maybe around 10cms from the nearest contactor, and all the input cables are
screened - what more can I do?

Please help or I think I may soon be looking for another job!

John Waterman

1997\04\05@230837 by Peter Grey

picon face
At 11:48 PM 5/04/97 +0100, you wrote:
{Quote hidden}

John,

This sounds like a noise problem which may also be unpredictable in many
cases. I had similar problems with switching motors and relays and this was
only at 12 volts!! I found a lot of problems disappeared when I delayed
performing any instructions after switching a motor or relay. I also put
non-polarised capacitors from both terminals of the motors to ground.
Screened cables were used throughout. When I look back in hindsight a lot of
problems were due to not enough care being taken with isolating the motors
(power) from the microprocessor side. I was given a lot of useful
suggestions from this mailing list. Another suggestion I remember is to
optically isolate the motors and their drive. Putting the drive signals
through ferrite cores can also help as can a liberal sprinkling of 0.1uF
caps. If after having done as much isolation as you can and the noise still
persists you may care to implement the delays as mentioned above. Try delays
initially of 0.5 secs and then reduce them as necessary. Another thing to
try is back to back schottky diodes on all I/O lines as well as a diode in
line with the signal. Again, more bypass caps may also assist.
I hope this may provide some help and things to try.


Best of luck,

Peter Grey
Neosystems
Australia

1997\04\06@213734 by Steve Hardy

flavicon
face
> From: John Waterman <spam_OUTjohnTakeThisOuTspamNEUTRINO.SOFTNET.CO.UK>
> [cut]
> I carried on with the project and connected the outputs to solid state
> relays which in turn control contactors using 110volt a.c. coils. Whenever
> the 110volts was turned on the problem became considerably worse. I then
> discovered that by replacing a sequence such as
>
> BCF             PORTB,0
> BSF             PORTB,1
> with
> MOVLW   2
> MOVWF   PORTB
> the problem decreased dramatically.

Not surprising.  The output of port B did not have time to change in
time for the next read-mod-write instruction.  This happens with
high clock speeds and moderate capacitive loading of the output, of the
order of a nF or so.  I always prefer to keep a shadow register for
the desired state of a port if there is the slightest doubt about the
port's ability to respond to command.

> [cut]
> go wrong in an unpredictable manner. I have put varistors across the
> 110volt coils but with little or no effect. The PIC is inside a metal box
> maybe around 10cms from the nearest contactor, and all the input cables are
> screened - what more can I do?

If you can't get rid of induced noise by using ferrite beads (as others
have suggested) then as a last resort you can try using feed-through
capacitors in conjunction with the other measures you are taking.  Note
that every cable going into the metal box, except ground, will need
this treatment.

You mentioned shielded cables.  Check that you are not creating a
ground loop by inadvertently using the cable shield as a current
path.  I.e. connect only one end of the shield, and ground everything
at a common point or at least on a substantial conductor such as the
chassis.  Remember that noise can be bourne in on ground just as
easily as signal or supply.

Also, if you haven't already done so, you should put suppression
capacitors/resistors (say 1uF, 10ohms) across the contactor points,
since this will reduce fast risetimes of the inductive flyback
voltage (as well as lengthening the contactor lifetime).  In a similar
vein, and if the application permits, use of thyristors will reduce
commutation noise because they switch off at zero current.

Motors can be difficult beasts to tame.  I made a garage door opener
which used a single phase AC motor and discrete logic.  It worked -
most of the time.  The occasional problem caused the door to open and
close a couple of times before coming to rest.  Well, it turned out to
be just plain old EMI coupling back through all the control lines.
To this day I always stop the car before entering and ensure the
door is staying put!

Please keep me informed as to how you get on, since I am about to
encounter on a very similar problem -- driving a PWM-controlled DC
motor.

Regards,
SJH
Canberra, Australia

1997\04\07@043858 by Tim Forcer

flavicon
face
At 23:48 05/04/97 +0100, you wrote:
{Quote hidden}

May seem trivial, but are you decoupling properly?  In my experience, PICs
can behave erratically if not closely decoupled.  Note that decoupling
capacitors should connect DIRECTLY to the power pins of the IC to be
decoupled, NOT simply across a convenient point on PCB power rail tracks -
otherwise transient behaviour can actually get worse!  Due to PIC power pins
being central, my usual preferred option of decoupled sockets can't be used.

Don't go looking for another job - unlike the designers of too many products
you are actually trying to achieve a solid fix for observed problems.  In
time, this attitude should bring benefits.

Good luck.

Tim

Tim Forcer            Tel: (+44) (0)1703 593362
                     Fax: (+44) (0)1703 592053
                   email:  .....tmfKILLspamspam@spam@ecs.soton.ac.uk
Department of Electronics & Computer Science
Room 3005, Building 35
The University, Southampton, SO17 1BJ     UK

1997\04\07@054411 by Tim Forcer

flavicon
face
At 23:48 05/04/97 +0100, John Waterman wrote:
{Quote hidden}

May seem trivial, but are you decoupling properly?  In my experience, PICs
can behave erratically if not closely decoupled.  Note that decoupling
capacitors should connect DIRECTLY to the power pins of the IC to be
decoupled, NOT simply across a convenient point on PCB power rail tracks -
otherwise transient behaviour can actually get worse!  Due to PIC power pins
being central, my usual preferred option of decoupled sockets can't be used.

Don't go looking for another job - unlike the designers of too many products
you are actually trying to achieve a solid fix for observed problems.  In
time, this attitude should bring benefits.

Good luck.

Tim

Tim Forcer            Tel: (+44) (0)1703 593362
                     Fax: (+44) (0)1703 592053
                   email:  tmfspamKILLspamecs.soton.ac.uk
Department of Electronics & Computer Science
Room 3005, Building 35
The University, Southampton, SO17 1BJ     UK

1997\04\07@073121 by Paul Waterfield

flavicon
face
{Quote hidden}

Also are you using a proper brown out chip. I had similar problems
until I put a TC54VC4302EZB RS stock no 207-0067 3 pin TO-92 brownout
chip. I now use one on all my PIC projects.
Paul Waterfield
Exhibit designer
Techniquest
Stuart Street
Cardiff CF1 6BW
UK
T +44 (0) 1222 475 475
F +44 (0) 1222 482 517

1997\04\07@091015 by Harrison Cooper

flavicon
face
Looks like it could be EMI or perhaps RFI problems. Even tho its
shielded. Watch the power supply for ripples and spikes. Might need a
storage scope for it.  Only part that doesn't make sense is the normal
LED stuff....have you made sure the WDT is disabled or at least being
reset?

1997\04\13@145442 by John Waterman

flavicon
face
Thanks to everyone who responded to my plea for help.

Incredibly since I wrote, our machine has been behaving very well without
altering anything! During four days of use it only faltered once.

One of the most common (and easiest) suggestions was to fit ferrite beads
to the input leads and this I did on Friday, so now I am keeping my fingers
crossed.

John Waterman

1997\04\14@152108 by John Waterman

flavicon
face
> Thanks to everyone who responded to my plea for help.
>
> Incredibly since I wrote, our machine has been behaving very well without
> altering anything! During four days of use it only faltered once.
>
> One of the most common (and easiest) suggestions was to fit ferrite beads
> to the input leads and this I did on Friday, so now I am keeping my
fingers
> crossed.
>
> John Waterman

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...