• AVR Freaks

Hot!Unexpected reset problem 12f675

Author
ubuntuman
Super Member
  • Total Posts : 278
  • Reward points : 0
  • Joined: 2016/05/02 15:28:40
  • Location: 0
  • Status: offline
2020/11/23 19:47:20 (permalink)
0

Unexpected reset problem 12f675

 in my project which is too big to be described in one thread i have two type of micro controllers working to control some three phase motors 380VAC 
pic12f675 and pic18f4620
 
i use opto-coupler and everything but when the 3phase motor start and stop some how faster than certain frequency of start stop operation
 
 the pic18f4620 is stable but pic12f675 reset although both of them dont have direct contact to the 3 phase motor
i used opto-coupler for both of them
i disable WDT brownout
i used 0.1uf 0.01uf between vdd and vss close to the pic itself
and pull up resistor of 10k at MCLR pin connected to VDD even if i disabled reset from MCLR active low in 12f675 and i enabled it in 18f4620 but 18f4620 is stable and 12f675 not
 
can anyone recommend any suggestion pls?
 
 should i directly connect the MCLR to VDD instead of the 10k pullup ?!
post edited by ubuntuman - 2020/11/23 20:02:44
#1

18 Replies Related Threads

    ric
    Super Member
    • Total Posts : 29435
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Unexpected reset problem 12f675 2020/11/23 21:19:47 (permalink)
    0
    I think we'd need to see your schematic to make useful suggestions.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #2
    NKurzman
    A Guy on the Net
    • Total Posts : 19106
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: Unexpected reset problem 12f675 2020/11/23 23:43:14 (permalink)
    0 (2)
    Just some three phase motors 380VAC???
    Does you Power supply dip when they turn on?
    Does you Board have a Bulk capacitor.
    2 or 4 layer PCBs?
    Are they shielded from the EMI that the Motors Generate?
    #3
    ubuntuman
    Super Member
    • Total Posts : 278
    • Reward points : 0
    • Joined: 2016/05/02 15:28:40
    • Location: 0
    • Status: offline
    Re: Unexpected reset problem 12f675 2020/11/24 06:53:54 (permalink)
    0
    Comment deleted.....
    post edited by ubuntuman - 2020/11/24 07:38:58
    #4
    ubuntuman
    Super Member
    • Total Posts : 278
    • Reward points : 0
    • Joined: 2016/05/02 15:28:40
    • Location: 0
    • Status: offline
    Re: Unexpected reset problem 12f675 2020/11/24 06:53:54 (permalink)
    +1 (1)
    The power supply which is used for both pics circuits are the same type and they are stable nothing happen to them

    I dont have EMI shield for neither the two pics circuits and i dont know from where I can get it

    The pic circuit who works wih no problem is double layer and the other one is single layer pcb

    Yes both pics circuits have bulk capacitor of 1000uf

    I have a question can the 10k pull up resistance on MCLR is not suitable and the noise can still affect the pin may be trying to put it in programming mode so the reset , so I need to connect the MCLR pin directly without any resistance to the VDD?

    Is this a good or bad idea ?
    post edited by ubuntuman - 2020/11/24 07:29:19
    #5
    ubuntuman
    Super Member
    • Total Posts : 278
    • Reward points : 0
    • Joined: 2016/05/02 15:28:40
    • Location: 0
    • Status: offline
    Re: Unexpected reset problem 12f675 2020/11/24 08:14:45 (permalink)
    0
    Both of the circuit are away from the three phase motors and 3 phase power source , they are away the same distance equal distance for both circuits
    #6
    NKurzman
    A Guy on the Net
    • Total Posts : 19106
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: Unexpected reset problem 12f675 2020/11/24 09:15:18 (permalink)
    0
    Yes you can connect the MCLR line directly to Vdd. Or you could just try a lower value resistor like 1K. That would at least let you rule it out. Big motors like that can create massive amounts of electrical noise. Directly through the wires. Or through the air like a big radio transmitter. And every PC board trace on your board an antenna.
    #7
    NKurzman
    A Guy on the Net
    • Total Posts : 19106
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: Unexpected reset problem 12f675 2020/11/24 09:15:20 (permalink)
    0
    Yes you can connect the MCLR line directly to Vdd. Or you could just try a lower value resistor like 1K. That would at least let you rule it out. Big motors like that can create massive amounts of electrical noise. Directly through the wires. Or through the air like a big radio transmitter. And every PC board trace on your board an antenna.
    #8
    ubuntuman
    Super Member
    • Total Posts : 278
    • Reward points : 0
    • Joined: 2016/05/02 15:28:40
    • Location: 0
    • Status: offline
    Re: Unexpected reset problem 12f675 2020/11/24 11:26:24 (permalink)
    0
    Just in case I connect it directly to VDD and it doesnt work and the problem keeps going , any other suggestions I may apply?
    #9
    upand_at_them
    Super Member
    • Total Posts : 765
    • Reward points : 0
    • Joined: 2005/05/16 07:02:38
    • Location: Pennsylvania
    • Status: offline
    Re: Unexpected reset problem 12f675 2020/11/24 11:52:48 (permalink)
    +1 (1)
    An oscillosope to see what's going on with the power rail and MCLR.
    #10
    PStechPaul
    Super Member
    • Total Posts : 2992
    • Reward points : 0
    • Joined: 2006/06/27 16:11:32
    • Location: Cockeysville, MD, USA
    • Status: offline
    Re: Unexpected reset problem 12f675 2020/11/24 12:34:51 (permalink)
    +1 (1)
    A detailed schematic and an image of the PCBs would help greatly. I suspect some sort of ground loop. You might be able to try temporarily shielding the circuit with aluminum foil, or possibly steel (which will attenuate a magnetic field).

     
    #11
    ubuntuman
    Super Member
    • Total Posts : 278
    • Reward points : 0
    • Joined: 2016/05/02 15:28:40
    • Location: 0
    • Status: offline
    Re: Unexpected reset problem 12f675 2020/11/24 15:29:24 (permalink)
    0
    those are the schematic and layout
     recently i removed the 10k ohm resistance and replace it with jumper named JP1 in its same place and connection
    this 10k connect a pull up resistor to MCLR and VDD
    post edited by ubuntuman - 2020/11/24 15:31:58

    Attached Image(s)

    #12
    PStechPaul
    Super Member
    • Total Posts : 2992
    • Reward points : 0
    • Joined: 2006/06/27 16:11:32
    • Location: Cockeysville, MD, USA
    • Status: offline
    Re: Unexpected reset problem 12f675 2020/11/24 15:41:22 (permalink)
    0
    Your programmer connector is non-standard (for a PICkit). And the capacitors C1 and C3 need to be as close as possible to the Vss and Vdd pins on the PIC. Try soldering a 10 nF capacitor directly on pins 1 and 8.
     


     
    #13
    ubuntuman
    Super Member
    • Total Posts : 278
    • Reward points : 0
    • Joined: 2016/05/02 15:28:40
    • Location: 0
    • Status: offline
    Re: Unexpected reset problem 12f675 2020/11/25 04:59:09 (permalink)
    -1 (1)
    Is it better to use 27pf instead of 10nf?
    #14
    ubuntuman
    Super Member
    • Total Posts : 278
    • Reward points : 0
    • Joined: 2016/05/02 15:28:40
    • Location: 0
    • Status: offline
    Re: Unexpected reset problem 12f675 2020/11/25 08:11:03 (permalink)
    +1 (1)
    ubuntuman
    Is it better to use 27pf instead of 10nf?
    or it may be a bad idea?
    #15
    upand_at_them
    Super Member
    • Total Posts : 765
    • Reward points : 0
    • Joined: 2005/05/16 07:02:38
    • Location: Pennsylvania
    • Status: offline
    Re: Unexpected reset problem 12f675 2020/11/25 08:49:11 (permalink)
    +1 (1)
    27pf is too small to be meaningful across the PIC power lines.  Microchip recommends 0.1uF (100nF) and 0.01uF (10nF), and sometimes just the 0.1uF.  They always must be as close as possible to the PIC to be helpful.
    #16
    ubuntuman
    Super Member
    • Total Posts : 278
    • Reward points : 0
    • Joined: 2016/05/02 15:28:40
    • Location: 0
    • Status: offline
    Re: Unexpected reset problem 12f675 2020/11/25 09:03:18 (permalink)
    0
    upand_at_them
    An oscillosope to see what's going on with the power rail and MCLR.
    thank you for your suggestions but I dont have oscilloscope and I cant get it
    #17
    ubuntuman
    Super Member
    • Total Posts : 278
    • Reward points : 0
    • Joined: 2016/05/02 15:28:40
    • Location: 0
    • Status: offline
    Re: Unexpected reset problem 12f675 2020/11/25 09:05:34 (permalink)
    0
    upand_at_them
    27pf is too small to be meaningful across the PIC power lines.  Microchip recommends 0.1uF (100nF) and 0.01uF (10nF), and sometimes just the 0.1uF.  They always must be as close as possible to the PIC to be helpful.
    thank you I will try it but c3 is close may be it is not shown in the layout but the actual circuit is about 4×4 cm in total so it is close
    #18
    NKurzman
    A Guy on the Net
    • Total Posts : 19106
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: Unexpected reset problem 12f675 2020/11/25 09:15:30 (permalink)
    +4 (4)
    No it is not close. Close means the connections between the capacitors and Vcc and ground must be as short as possible. Yours is not. One connection travels around the entire board before it gets back to the chip.
    Remove the caps from the board inside of them directly across the pins on the chip and see if that helps you.

    Since that appears to be a double sided board with only one connection on the other side. Putting a groundplane under the chip would be a good idea. Unless it is actually just a single sided board with a jumper.
    #19
    Jump to:
    © 2021 APG vNext Commercial Version 4.5