+ Post New Thread
Results 1 to 8 of 8
  1. #1
    Full Member level 5
    Points: 2,044, Level: 10

    Join Date
    Sep 2016
    Posts
    319
    Helped
    1 / 1
    Points
    2,044
    Level
    10

    PIC Controller Hanging

    Click image for larger version. 

Name:	lcd2.jpeg 
Views:	4 
Size:	72.6 KB 
ID:	156366
    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.

    •   AltAdvertisement

        
       

  2. #2
    Advanced Member level 1
    Points: 2,263, Level: 11

    Join Date
    Jan 2019
    Posts
    416
    Helped
    107 / 107
    Points
    2,263
    Level
    11

    Re: PIC Controller Hanging

    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



    •   AltAdvertisement

        
       

  3. #3
    Full Member level 5
    Points: 2,044, Level: 10

    Join Date
    Sep 2016
    Posts
    319
    Helped
    1 / 1
    Points
    2,044
    Level
    10

    Re: PIC Controller Hanging

    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 by venkates2218; 5th November 2019 at 15:01.



    •   AltAdvertisement

        
       

  4. #4
    Super Moderator
    Points: 81,767, Level: 69
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,410
    Helped
    4472 / 4472
    Points
    81,767
    Level
    69

    Re: PIC Controller Hanging

    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.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  5. #5
    Full Member level 5
    Points: 2,044, Level: 10

    Join Date
    Sep 2016
    Posts
    319
    Helped
    1 / 1
    Points
    2,044
    Level
    10

    Re: PIC Controller Hanging

    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



    •   AltAdvertisement

        
       

  6. #6
    Super Moderator
    Points: 261,317, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    45,654
    Helped
    13881 / 13881
    Points
    261,317
    Level
    100

    Re: PIC Controller Hanging

    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.



  7. #7
    Super Moderator
    Points: 78,516, Level: 68
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,931
    Helped
    3610 / 3610
    Points
    78,516
    Level
    68

    Re: PIC Controller Hanging

    Hi,

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

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  8. #8
    Full Member level 5
    Points: 2,044, Level: 10

    Join Date
    Sep 2016
    Posts
    319
    Helped
    1 / 1
    Points
    2,044
    Level
    10

    Re: PIC Controller Hanging

    Click image for larger version. 

Name:	Image_004.jpg 
Views:	1 
Size:	29.9 KB 
ID:	156431
    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).



--[[ ]]--