Thanks for your swift responseSince 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?
Have you looked at the signal from the opto to the pic with an oscilloscope so see if that looks correct?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
It's from center tapped transformers 9-0-9 dual diode 7805 and well filtered,smoothed ... it's linear not smps.What about the PSU itself?
Wish I could post it,but I've been doing this plenty of time.....and I nearly put it directly into pcb.....How about a basic schematic , component details etc? in order for anyone to make an educated guess??![]()
It's ok since the delay in the operation is in the range of fraction of secondsHave you looked at the signal from the opto to the pic with an oscilloscope so see if that looks correct?
The signal from opto to the pic is+4.67 high and 0v low as the object nears and leavesIt'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.
Components I used are discrete not smd resistors, optos LEDs obviously Darlington transistors at outputs coupled via optos of course...No relays.How about a basic schematic , component details etc? in order for anyone to make an educated guess??![]()
You designed a circuit but can't post a schematic because it's only in your head?Wish I could post it,but I've been doing this plenty of time.....and I nearly put it directly into pcb.....
Thanks for the tips I'll chk for some solder loose... But continuity test looks fine between Vdd pin and 7805 ground pin.You designed a circuit but can't post a schematic because it's only in your head?
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?
I really appreciate your advice I've overlooked some of what u listed.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.