voltage spike?

Discussion in 'The Projects Forum' started by hotpointer, Apr 15, 2015.

  1. hotpointer

    Thread Starter New Member

    Apr 15, 2015
    3
    0
    Hello
    could somebody look at the circuit diagram attached pcb picjpg.jpg

    the problem i am having is intermittently the Atmega chip resets ...
    this only happens when the relays are d energised supplying the two solonoid valves

    i think that maybe its a voltage spike ... i do have the circuit protected by flyback diodes(1N4004)

    5volts to the relay ...........12volts to the valves

    any ideas

    thanks
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,542
    2,369
    I assume both -ve sides of each supply are common?
    If so make sure there is a direct return path for the 12v common.

    These spikes are the worst.! :eek:
    Max.
     
  3. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,789
    945
    are you sure that is your schematic? i cant find 12 volts anywhere on it. Your relay will do nothing the way it is drawn. you cannot feed a 7805 with 5 volts and get 5 volts out. i found more problems but dont want to try typing that much with this phone. perhaps you posted an older working diagram, do you have other files that are more in line with your described circuit?

    suggest a seperate 5 volt supply that is dedicated to your micro and not connected to any relay.
     
  4. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,542
    2,369
    What current are the Solenoids, you may be able to drive them with a Mosfet instead of a relay?
    Max.
     
  5. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    Standard beginner problem. The cure is not in the schematic, it is in the physical world. Make dedicated wires for each relay, add bypass capacitors to your processor chip, isolate your power sections with things like a diode and a capacitor or a 100 ohm resistor and a capacitor, etc. Glitch happens. Learn how to redirect or absorb the energy in safe ways.
     
  6. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,542
    2,369
    BTW as well as the relays, you also need a 1N4004 across the solenoids, which could well be the problem!.
    Max.
     
  7. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    Caught me assuming again. A relay coil is the same as a solenoid (in my mind) so I did not differentiate for the TS. :oops:
     
  8. hotpointer

    Thread Starter New Member

    Apr 15, 2015
    3
    0
    As i have already had some Pcbs made .... because i have only just spotted this problem :(
    do you thing decoupling cap would be a good start point because i can add these to the board....
     
  9. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,542
    2,369
    Decoupling is important as well as the BEMF diodes mentioned.
    Did you design for diodes across the solenoids, these are normally at the coil rather than the board, anyway.
    Max.
     
    hotpointer likes this.
  10. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    You only have 3 choices: Try some band-aids, learn and do all the math, redesign the board.
    Pick one.
     
  11. hotpointer

    Thread Starter New Member

    Apr 15, 2015
    3
    0
    hi yes the Solenoids have diodes.
    but i can see now that decoupling is needed on the atmega
    do you think a voltage drop could be resetting the atmega would the decoupling help with this?

    this is my first ever electronic project so don't really know what i am doing

    the diodes are on the board
     
  12. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    Optimally, Move the diodes.
    Voltage drop, sagging glitch, ground plane bump...no difference to a capacitor across the processor.

    It all ends up at, "exactly where in the physical world is that current causing a glitch?".
     
  13. crutschow

    Expert

    Mar 14, 2008
    13,009
    3,233
    You can help isolate the micro with a capacitor directly across the power pin to the common pin, and a series resistor a ferrite bead in series with the power line from the micro (and only the micro) to the supply.
     
    #12 likes this.
  14. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    Good. Another, physically tiny, isolation method from crutschow.
     
Loading...