Shop OBEX P1 Docs P2 Docs Learn Events
diode needed? — Parallax Forums

diode needed?

mikeamikea Posts: 283
edited 2012-07-05 20:06 in BASIC Stamp
Hi, i have a basic stamp switching n- channel mosfets to turn on/off 12 volt relays. I used the mosfets because they have an internal diode. When tying the stamps ground in with the 12 volt ground do i need a diode to protect the stamp from the coil field collapse, if so what is the correct way to put it in? Thanks-mike

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,560
    edited 2012-07-04 14:26
    The diode should be placed across the relay coil, with the Anode going toward Ground or Vss. The anode is the side that is NOT marked with a band.
  • mikeamikea Posts: 283
    edited 2012-07-04 14:30
    Thank you Beau.-mike
  • SapphireSapphire Posts: 496
    edited 2012-07-04 14:33
    Mike,

    You should always use a diode to dissipate the coil energy when switching relays. For your application, a 1N4001 diode should work. Put the cathode on the +12v side of the relay coil and the anode on the ground side of the relay coil.
  • mikeamikea Posts: 283
    edited 2012-07-04 14:56
    Thanks Sapphire i will have to get some of those.-mike
  • ercoerco Posts: 20,256
    edited 2012-07-04 19:27
    When in doubt, route the flyback diode directly across the relay coil connections so it's BACKWARDS relative the applied power and won't conduct when the relay is activated.
  • mikeamikea Posts: 283
    edited 2012-07-05 13:43
    ok, thanks erco.-mike
  • mikeamikea Posts: 283
    edited 2012-07-05 13:54
    So there are mosfets swithching relays that are switching motors. the motors will be going fwd and rev. i put the diode now across the relay coil, but do i need to put them across each motor also so that there are 2 per motor opposing each other in parallel since the motor will be going in both directions? -mike
  • SapphireSapphire Posts: 496
    edited 2012-07-05 14:06
    Mike,

    No, not across the motors. The diodes protect the driver circuit (i.e. the mosfet and the stamp) but the motors are isolated by the relay. When a relay turns off, the energy in the coil has to go somewhere, and without the diode it will find a path through your circuit and might damage some other components. When a motor turns off, the coil energy is dissipated by the motor slowing down, so no need for a diode. Also, two opposing diodes in parallel will short circuit the motor. .
  • mikeamikea Posts: 283
    edited 2012-07-05 15:08
    Thanks Sapphire. I was a little worried because the stamp ground is tied into 24 volt ground that powers the motors. Sounds like it will be ok.Thanks again-mike
  • ercoerco Posts: 20,256
    edited 2012-07-05 16:03
    But several filter caps across each motor is always a good idea. The delta configuation (or as I call it, every which way you can) works well to reduce interference from motor noise. Same as the 3-cap filter shown here: http://www.beam-wiki.org/wiki/Reducing_Motor_Noise
  • mikeamikea Posts: 283
    edited 2012-07-05 20:06
    Thanks erco! that link was exactly what i needed to read, good reference too.Thank you-mike
Sign In or Register to comment.