1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Controller reset

Discussion in 'Microcontrollers' started by piccontrollerlearner, Jul 26, 2017.

  1. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,320
    Likes:
    653
    Location:
    Derbyshire, UK
    ONLINE
    Then move back to the PIC, why change something that's already working?.
     
  2. piccontrollerlearner

    piccontrollerlearner Member

    Joined:
    Dec 31, 2015
    Messages:
    34
    Likes:
    0
    ST provides us more facility in terms of pin numbers and at equal or lower cost
     
  3. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    6,056
    Likes:
    519
    Location:
    Cleveland, OH, USA
    ONLINE
    It is possible for glitches to cause other resets. For example, they may fire an interrupt or interrupt a communication like I2C. Depending on your software, those false signals might cause a reset.

    Presumably, however, the same software that works on a PIC has simply been moved to the new processor. A software-based cause would require the new processor to be more susceptible than a PIC, which I assume in unlikely. I have no experience with ST processors, though.

    Since your new design works with battery power but not with the AC power supply, that suggests to me that it is related to the power supply, not software or board layout per se, unless that layout affects the power supply differently than it did with the PIC.

    John
     
    • Thanks Thanks x 1
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,320
    Likes:
    653
    Location:
    Derbyshire, UK
    ONLINE

    But the PIC works, the ST doesn't :D

    There are also plenty of higher spec PIC's available - although ST devices seem to be available at 'give away' prices.
     
  6. piccontrollerlearner

    piccontrollerlearner Member

    Joined:
    Dec 31, 2015
    Messages:
    34
    Likes:
    0
    Ok. Got it.
     
  7. piccontrollerlearner

    piccontrollerlearner Member

    Joined:
    Dec 31, 2015
    Messages:
    34
    Likes:
    0
    You are right, Sir. But we have spent months behind the project, from selecting the controller, IDE etc., to reaching to the final stage, as we did not know much about ST.

    Almost everything went well and the project is almost ready except for this issue.

    That's why we are willing to get it done anyhow.

    THANK YOU.
     
  8. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    6,056
    Likes:
    519
    Location:
    Cleveland, OH, USA
    ONLINE
    When confronted with similar problems of erratic results in real life, the most important step was to find out how to reproduce the problem. As it turned out, the problem was often some detail that seemed unimportant initially.

    So far, we have shot suggestions based on experience at solving similar problems. That has not worked. At this point, my advice would be to take a step back and try to make the problem happen consistently. Leave no detail out of consideration, even if it seems illogical at the moment. Can you scope the VDD lines of both the PIC and ST boards? If that is not productive, I would scope pins having the same function on both chips (if possible). Of course, be prepared for the problem to disappear as soon as you add the scope in the mix.

    John
     
    • Thanks Thanks x 1
  9. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,315
    Likes:
    1,230
    Location:
    Cardiff, Wales
    Those are nothing like the 10uF and 100uF that were suggested! Have you tried those suggested values?
     
  10. piccontrollerlearner

    piccontrollerlearner Member

    Joined:
    Dec 31, 2015
    Messages:
    34
    Likes:
    0
    My mistake in posting. Yes, I have tried 10,100,1000 uf capacitors that were suggested.
     
  11. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    Forgive me if I'm wrong but what st micro are you using cause if the TSSOP20 is it it's not going to work as you have it on the sch.

    You need something like this on power rail

    uC.png
     
    Last edited: Jul 30, 2017
    • Thanks Thanks x 1
  12. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    6,056
    Likes:
    519
    Location:
    Cleveland, OH, USA
    ONLINE
    All we have is the schematic, not the board. I've seen decoupling caps put almost anywhere on the schematic, including up in some isolated corner.

    That is not to disagree that they should be very close to the requisite pins. Please note, your 100 uF capacitor seems to be reversed.

    Edit: Now the polarity of the electrolytic capacitor in post #30 has been fixed.
     
    Last edited: Jul 30, 2017
    • Thanks Thanks x 1
  13. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    I fixed that I forgot the flip it top to bottom
    But this mess will not work I help someone fix this almost same problem .
    mess.png

    The power rail needs to run parallel with the caps across it 104 and 100uf works well
    then if needed add a zener diode to clamp the power to 5 volts a head of the caps.
     
    Last edited: Jul 30, 2017
    • Thanks Thanks x 1
  14. RadioRon

    RadioRon Well-Known Member

    Joined:
    Oct 7, 2005
    Messages:
    1,758
    Likes:
    53
    Location:
    BC, Canada
    The board layout was posted in post #4 above.
     
  15. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    6,056
    Likes:
    519
    Location:
    Cleveland, OH, USA
    ONLINE
    Not in any format I could understand or view. The PDF is unlabeled.

    Perhaps, if you could circle and label p7 in that image it would save us all a lot of time.

    John
     
  16. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    The board doesn't have caps in right place. Like I said I helped fix this same problem but they was using a pic 12f chip

    Here something I had laying around that shows good layout of caps.
    20170730_181740.jpg
     
    Last edited: Jul 30, 2017
  17. piccontrollerlearner

    piccontrollerlearner Member

    Joined:
    Dec 31, 2015
    Messages:
    34
    Likes:
    0
    Ok. I will post it again.
     
  18. piccontrollerlearner

    piccontrollerlearner Member

    Joined:
    Dec 31, 2015
    Messages:
    34
    Likes:
    0
    Sorry to all for late response. I have posted screenshot of the PCB design, in which P7 and P8 capacitors are highlighted.
    We have replaced p8 by a through hole 10/50 capacitor, and 1117 regulator IC by 7805 and found that the frequency of reset is decreased.

    Also, we have made a single sided PCB in which all the components are the same as that shown in the design but are placed on one side of the PCB and that circuit is working properly.
     

    Attached Files:

    • ckt.jpg
      ckt.jpg
      File size:
      179.8 KB
      Views:
      20
  19. piccontrollerlearner

    piccontrollerlearner Member

    Joined:
    Dec 31, 2015
    Messages:
    34
    Likes:
    0
    There are few other points that I would like to mention

    1. The reset occurs mostly when the relay is tripped OFF rather than tripped ON.
    2. We have two motors. First, The ac synchronous motor, which is being operated by the relay, and other one is small motor running at 8 rpm through TRIAC. Now, there is no reset when both motors are attached (We have tested for 500 ON/OFF cycles), but as soon as only the small motor is attached, the reset takes place (once in every 50 ON/OFF cycles).
     

Share This Page