Author Topic: Can unprotected relay circuit damage Microcontroller??  (Read 5294 times)

0 Members and 1 Guest are viewing this topic.

Offline BANETopic starter

  • Supreme Robot
  • *****
  • Posts: 639
  • Helpful? 4
  • E=roboticsC^2
Can unprotected relay circuit damage Microcontroller??
« on: July 03, 2008, 05:23:12 PM »
Can an unprotected relay circuit damage Microcontroller?  If so, then I'm screwed!!   I just made a relay circuit to control the power to the servos and sequencer on my biped.  However, I did have the right diode handly and didn't include it in my circuit because it was a 5v relay and i had it a NPN transistor in there.  About 30 min of using my biped my microcontroller started restarting like crazy!  I check to see if anything was shorting it out but everythings is fine. ???

Bane

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline BANETopic starter

  • Supreme Robot
  • *****
  • Posts: 639
  • Helpful? 4
  • E=roboticsC^2
Re: Can unprotected relay circuit damage Microcontroller??
« Reply #2 on: July 03, 2008, 06:23:24 PM »
Can Back EMF get past a NPN transistor though?  (I'm still trying to convince myself that I'm not screwed!)  If that did happen, is there a componet that can be replaced or something?
 :'( :'( :'( :'( I liked my Atom 28 pin too!
Bane

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Can unprotected relay circuit damage Microcontroller??
« Reply #3 on: July 03, 2008, 06:26:30 PM »
check if your MC board is still good - it probably is


always use a diode man!
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline BANETopic starter

  • Supreme Robot
  • *****
  • Posts: 639
  • Helpful? 4
  • E=roboticsC^2
Re: Can unprotected relay circuit damage Microcontroller??
« Reply #4 on: July 03, 2008, 07:15:12 PM »
i just took the chip out and ran a simple test which it passed, then put it back in and every thing works fine......... :D :D......... ??? ???

Does the magnetic field wear off and everythings fine?

Bane

Offline emmannuel

  • Full Member
  • ***
  • Posts: 87
  • Helpful? 0
Re: Can unprotected relay circuit damage Microcontroller??
« Reply #5 on: July 03, 2008, 07:28:38 PM »
What happens is when you the relay coil gets voltage some power is stored magnetically and it releases that power out very fast once the coil gets no voltage.

What happens is that power is release several times larger in a very short amount of time.  From a test I did in school I could see that a 9V battery powering up a coil had a back EMF of like 110V.  If you don't use the protection diode that 110V for a fraction of a sec can fry your microcontroller.

Offline BANETopic starter

  • Supreme Robot
  • *****
  • Posts: 639
  • Helpful? 4
  • E=roboticsC^2
Re: Can unprotected relay circuit damage Microcontroller??
« Reply #6 on: July 03, 2008, 07:36:15 PM »
Thanks, i just learned something new.  Is there a special type of diode or can i use one from like an H-bridge or something?  Its a 5v relay controlled by a 9v bat after a 5v regulator.

Bane

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Can unprotected relay circuit damage Microcontroller??
« Reply #7 on: July 03, 2008, 08:01:09 PM »
regular diode that can fits your power supply on your circuit

all a diode does is make sure electricity flows one way only ( away from your MC and not towards it) , lol
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline BANETopic starter

  • Supreme Robot
  • *****
  • Posts: 639
  • Helpful? 4
  • E=roboticsC^2
Re: Can unprotected relay circuit damage Microcontroller??
« Reply #8 on: July 04, 2008, 06:03:26 AM »
Quote
all a diode does is make sure electricity flows one way only ( away from your MC and not towards it) , lol

Pos and Neg going to relay.  White line on diode pointing towards Neg.......right?

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Can unprotected relay circuit damage Microcontroller??
« Reply #9 on: July 04, 2008, 06:54:57 AM »
the side with the line on it blocks positive current from going in that way ( allowing only negative )


this might interest you

http://www.powerdesigners.com/InfoWeb/design_center/articles/Diodes/diodes.shtm
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Can unprotected relay circuit damage Microcontroller??
« Reply #10 on: July 20, 2008, 06:08:17 PM »
Quote
Can Back EMF get past a NPN transistor though?
Nope your microcontroller is fine.

The back EMF could fry your MOSFET, however. So you may need a diode with it, unless the built in diode is sufficient enough.