Mysterious Reset


Closed Thread
Results 1 to 25 of 25

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    skimask,

    A quick look at the datasheet would have shown that the ULN2004 does have Output Clamp Diodes. Datasheet boy.

    Joel,

    Maybe you need a snubber on the relay driving the contactor.
    I use .022uF 400V and a 47ohm 1/2w resistor in series across the output, but then I'm using SSR's

    Works good for all the contactors I've used.
    <br>
    Ya I know, I just downloaded it and looked That'll learn me for not learnin' me...
    But still, what if the '2004 isn't right next to the relays? What if it's on the PCB and the relay is X feet down the road on a cable.
    Maybe an opti-iso would be the ticket in this case...still doesn't resolve the relay spike but it might isolate it a bit better...
    How 'bout a decent cap across MCLR? If there's a pullup on MCLR, maybe it's being dropped out on occassion?

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Just wanted to add that skimask's idea of Solid State Relay's can also reduce that spike, by waiting for the Zero-Crossing point of the AC wave before turning on.

    A relay can't do that, and may turn on at the peak of the AC, causing a very large spark and spike.
    <br>
    DT

  3. #3
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Do you have MCLR tied to +5V directly or have you used a resistor ?

    Or have you done what I did on a protoype board and forgotten it. My board had been in used for months as I was developing code and was working fine. I kept adding bits of code and other circuitry and then one day started getting spurious random resets.

    I had forgotten a pull up on the MCLR pin and it was now triggering on noise picked up from the ratsnest of prototype wiring. fitted a 1K resistor and it has been fine since
    Keith

    www.diyha.co.uk
    www.kat5.tv

  4. #4
    Join Date
    Aug 2006
    Location
    brooklyn
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    OK OK OK

    The 5V relay is about 1.5 inches from the ULN2004.
    Darrel, what is the cap-resistor across the relay coil supposed to do?

    I have a 10K R pulling MCLR high
    I have a 1000uF cap across +5 and GND right at the chip, along with a .1uF there too.

    I'm going in today to place diodes across the relay coils to see if that could solve the problem...

    I imagine that some kind of back fluxing is the issue... but I don't understand how the spike could travel through the 'unconnected' parts of the relay, and how it could effect my battery powersupply...

    Joel

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    what is the cap-resistor across the relay coil supposed to do?
    From what I understand, it limits the rate of change in the voltage across the contacts.

    Here's a thread where someone had a similar problem. Snubber seems to have helped.
    http://www.picbasic.co.uk/forum/show...hlight=snubber
    DT

  6. #6
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    967


    Did you find this post helpful? Yes | No

    Default

    Joel

    I am not sure if I can be of any help here. But anyway, here it comes.

    - Have you looked at the Brown Out settings? Try to disable it for a while to see if that is the cause.

    - another item you can miss out on is the layout of your board. May happen that the heavy current is flowing past your PIC and lifting the ground. I would expect the layout to follow this route if possible or else have a star point grounding
    MCU -> ULN -> relay -> PS (ground / VCC) This keeps the heavy load near the Power Supply (PS)
    In one case I had a problem where the layout was causing problems.

    I dont know if you understand what I am saying. What has to happen is that the lowest ohmic path should be from PS to relay and then to the lighter loads.

    Excuse me if these are lame suggestions and you have them sorted out

    Jerson

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    it's common to place a few hundred nF cap in parallel with the relay coils. For the contact, if you switch DC load, the link Darrel provide is nice.

    If you switch AC load, you really want to switch them on the AC zero cross. This have tons of advantages.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. IC12F508 with Internal Oscillator and Software Reset
    By karan123 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 2nd October 2009, 16:13
  2. pic reset sometimes
    By Pedro Pinto in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 23rd January 2008, 17:27
  3. Mysterious Reset Revived!
    By JoelMurphy in forum General
    Replies: 8
    Last Post: - 16th May 2007, 00:26
  4. reset and interrupt vectors
    By dtoohey in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th February 2005, 22:02
  5. Replies: 5
    Last Post: - 1st December 2004, 12:49

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts