Noise

crutschow

Joined Mar 14, 2008
38,503
Since most of us are not clairvoyant, how can we help when you have given us no information on what is the possible noise source and what problem the noise is causing on you pic?
 

Thread Starter

ilfish

Joined Jun 10, 2024
32
Since most of us are not clairvoyant, how can we help when you have given us no information on what is the possible noise source and what problem the noise is causing on you pic?
Thanks for your swift response
Problem is I built a pcb myself with input and output boards.
Installed in a factory for packing machine
There is only one sensor whose input to the pic is connected via optocoupler.
This sensor works fine but the micro starts randomly excuting its program without receiving the required input signal
 

crutschow

Joined Mar 14, 2008
38,503
Thanks for your swift response
Problem is I built a pcb myself with input and output boards.
Installed in a factory for packing machine
There is only one sensor whose input to the pic is connected via optocoupler.
This sensor works fine but the micro starts randomly excuting its program without receiving the required input signal
Have you looked at the signal from the opto to the pic with an oscilloscope so see if that looks correct?
 

Thread Starter

ilfish

Joined Jun 10, 2024
32
How about a basic schematic , component details etc? in order for anyone to make an educated guess?? :(
Wish I could post it,but I've been doing this plenty of time.....and I nearly put it directly into pcb.....
Pic is 16f877a..... 8.867mhz X-TAL + 22 pF caps.... obviously a 0.1 micro at Vcc pin.
 

Thread Starter

ilfish

Joined Jun 10, 2024
32
Have you looked at the signal from the opto to the pic with an oscilloscope so see if that looks correct?
It's ok since the delay in the operation is in the range of fraction of seconds
not even in milis. So the signal at primary side of opto is from sensor ( proximity detector active high...+12 v....and 0 v for no object detected).
So the signal input frequency is way too low to cause high frequency related noise.
 

Thread Starter

ilfish

Joined Jun 10, 2024
32
It's ok since the delay in the operation is in the range of fraction of seconds
not even in milis. So the signal at primary side of opto is from sensor ( proximity detector active high...+12 v....and 0 v for no object detected).
So the signal input frequency is way too low to cause high frequency related noise.
The signal from opto to the pic is+4.67 high and 0v low as the object nears and leaves
 

sghioto

Joined Dec 31, 2017
8,634
Wish I could post it,but I've been doing this plenty of time.....and I nearly put it directly into pcb.....
You designed a circuit but can't post a schematic because it's only in your head? :rolleyes:
Anyway I would check for open ground connections on the pcb specifically the ground pin on the micro.
Personally seen this type of issue.
Could there be interference from other equipment nearby?
 
Last edited:

Thread Starter

ilfish

Joined Jun 10, 2024
32
You designed a circuit but can't post a schematic because it's only in your head? :rolleyes:
Anyway I would check for open ground connections on the pcb specifically the ground pin on the micro.
Personally seen this type of issue.
Could there be interference from other equipment nearby?
Thanks for the tips I'll chk for some solder loose... But continuity test looks fine between Vdd pin and 7805 ground pin.
As for interference i tried to supply the 220 v input to the transformer from independent wall socket.....
Problem is the board is located in a factory where temperature is 33...35 degree Celsius...... although not at a vicinity there are relays and contactors operating around.
 

trebla

Joined Jun 29, 2019
599
Most common problems are bad grounding, noisy PSU, missing proper pullups/pulldowns on GPIO, missing pullup for MCLR pin, long and unshielded sensor connections. And of course bad connections.
 

Thread Starter

ilfish

Joined Jun 10, 2024
32
Most common problems are bad grounding, noisy PSU, missing proper pullups/pulldowns on GPIO, missing pullup for MCLR pin, long and unshielded sensor connections. And of course bad connections.
I really appreciate your advice I've overlooked some of what u listed.
Thanks
 
Top