Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC Controller Hanging

Status
Not open for further replies.

venkates2218

Full Member level 6
Joined
Sep 30, 2016
Messages
354
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Activity points
4,306
lcd2.jpeg
Hai,
please refer the image
There is an 3rpm servo motor in machine.Limit switch is used to identify the position of the motor's shaft.The motor will operate with 230VAC by G2R2 type relay(optocoupler is used to drive the relay).
I'm using PORTRB1 in PIC18F4520 controller to sense the position of the motor.Sometimes the circuit is working fine,but sometimes the controller is malfunctioning.Some unwanted datas or fully blank in LCD.During remaining process there is no error is found in controller's operation and in LCD also.

Error occurring while trying to find the position of the motor only.
For opamp circuit,+5VDC and ground is given for power supply.
 

is the motor controller malfunctioning or is the display controller malfunctioning?

what is different between the sometimes it works and sometimes it doesn't work?

what is the criteria for working?

what are the remaining processes that seem to work fine?

please provide a circuit diagram

please show some measurement, such as a 'scope trace of motor drive (voltage and current) and LCD display when it is working and
another 'scope trace of the motor drive (voltage and current) and LCD display when it isn't working
 

1.Display controller only malfunctioning.
2.Based on limit switch position,motor shaft location will displayed on LCD display.
3.Sometimes controller perfectly identity the position and displayed on screen,but sometimes error occurs at display as like above image.
4.I don't have any schematics regarding opamp circuits,because it designed by manufacturer.

The output from the limit is either zero or +5VDC only.
 
Last edited:

Most importantly, does it recover by itself? Is this a fault that only happens occasionally then continues to work afterwards or does it cease to function until the processor is reset?

I am trying to establish whether the problem is only in the display interfacing or in the processor as a whole.

Brian.
 

No it not recovering automatically,if we reset the controller manually means only controller starting to work.after resetting controller will started to work normally.If any changes in limit switch status means only,this issue occuring
 

Very little substantial information yet, although it can be easily get by performing differential diagnosis. E.g. disconnecting the motor power and operating the limit switches manually.

My first guess is contact arcing of the motor relays, causing electrical interferences. If it's a bidirectional drive, do you protect the relays circuit against shorting the motor capacitor by an appropriate dead time? Do you have RC snubbers for the contacts?

If the problem is only in display image, a quick and dirty solution could be to refresh the display more frequently or even to readback the content and perform a reset and refresh in case of differences.

Nevertheless it can be a pure software bug as well.
 

Hi,

I also expect EMC problems.
Bad PCB layout, no EMC filters, bad wiring...how can we know?

Klaus
 

Image_004.jpg
This is the snubber circuit used with motor.But if we connect snubber means.,the motor started to operate even the relay in OFF condition.
If we removed the snubber means it working fine(If relay switched ON motor work,if switched OFF,motor won't work).
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top