12V Motor Control - Fried BS2 :(
lleblanc
Posts: 15
That's right, my BS2 is fried after a quick test of trying to control my motors. I have another 2 on order just in case, but I figured I should post my circuit and see if anyone can tell me if this will work before I throw another $50 down the drain.
I'm using IRL510 MOSFETs with DPDT switches to control my motor. The yellow wires go to pins on my basic stamp. One to turn on the power and one to switch the relay (fwd/rev) for each motor.
After my quick test the motors worked fine until I tried to switch direction so I'm guessing that I got a noise spike that fried my stamp. I added in the IN4001 diodes where my stamp is connected to the circuit to try and alleviate this (can't test until I get my new stamps) but I'm also concerned that I'm powering the Development Board with the same 12V supply (see the top power connecters).
I'm using the 9V battery plug from radio shack which must be wired wrong internally as it was trying to provide my dev board with negative voltage which is why I had to reverse the wires...
Does anyone have any suggestions? I'm somewhat over my head with this stuff as my Boe-bot was my first experience with circuits but I feel like I'm close to getting this working.
--
Lenny
Post Edited (lleblanc) : 5/29/2008 4:11:46 PM GMT
I'm using IRL510 MOSFETs with DPDT switches to control my motor. The yellow wires go to pins on my basic stamp. One to turn on the power and one to switch the relay (fwd/rev) for each motor.
After my quick test the motors worked fine until I tried to switch direction so I'm guessing that I got a noise spike that fried my stamp. I added in the IN4001 diodes where my stamp is connected to the circuit to try and alleviate this (can't test until I get my new stamps) but I'm also concerned that I'm powering the Development Board with the same 12V supply (see the top power connecters).
I'm using the 9V battery plug from radio shack which must be wired wrong internally as it was trying to provide my dev board with negative voltage which is why I had to reverse the wires...
Does anyone have any suggestions? I'm somewhat over my head with this stuff as my Boe-bot was my first experience with circuits but I feel like I'm close to getting this working.
--
Lenny
Post Edited (lleblanc) : 5/29/2008 4:11:46 PM GMT
Comments
Like I said I have no formal experience with this and pretty much everything I know is what I read in the Boe-Bot book and from this forum. The stamp worked fine after the reverse voltage (thankfully), and worked fine being hooked up to the circuit, but fried when I added my motors to the mixing pot.
Can a spike from the motors travel through the DPDT and back through my power source to my development board? This is the only other place that I can see the spike getting to the stamp.
Yes, a spike from the motors can travel back into the development board. The relay coils can also also generate a spike.
FYI, you can buy BS2e stamps on ebay for ~$23 until the supply is exhausted. Parallax blew them out and they are a real bargain. Tastes (and programs) just like the BS2 with more space to program. Worth considering if you're in the market for more Stamps any time soon. Here's one volume seller:
http://cgi.ebay.com/Parallax-Basic-Stamp-BS-2E-Module_W0QQitemZ250251889900QQihZ015QQcategoryZ4663QQssPageNameZWDVWQQrdZ1QQcmdZViewItem
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
But if you use them to make connections to another 9-volt battery connector (such as on a BoE or carrier board), everything gets reversed. Sparks fly and chips die. You're not the first, and you will not be the last.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
That makes sense Mike. Thanks for taking the time to look at this. I'll have my new stamps tomorrow so I'll be able to try this out...
Note that motor braking IS hard on the motor brushes and relay contacts, so don't push the limits of your relay's ratings with a huge DC motor. Per Mike's warning, arcing can occur.
Apologies, my initial wiring sketch was wrong, but I have corrected it now.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
Post Edited (erco) : 5/30/2008 3:33:11 PM GMT
Good little circuit, but the transistors short out the 5 volt supply when they're on.
I suspect the transistors are meant to be in the relay connections to ground?
Cheers,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
Ken
Ken
Ken
·
I am running into a problem when I hook up both my motors though. My IRL510 transistors get extremely hot and after a few seconds of working properly one dies off and starts letting the voltage through even when I put my BS2 pin to LOW. I'm assuming that when I have both motors hooked up I am exceeding what this transistor can handle and maybe I need to go to the IRL520 or IRL530 to keep things running
Anyway, more fiddling around with my circuit here. I've gone through the IRL510s that I ordered so I need to place another order to replenish my parts before I can continue testing. I really like the idea of the Optocouplers as well bunkley. Hopefully I'll be posting in the completed projects forum soon!
Thanks again everyone for the help to date. I don't know how many stamps I would've fried before I got things under control.
I do suggest that you connect a 10K resistor between the MOSFET gates and ground to keep them turned off until the Stamp initializes its I/O pins.
You can have the 2nd IRL510 for each motor to turn it on and off. Put it in the Motor Bat - lead between that and ground (and connect the Motor Bat - lead to ground). The diode mentioned will protect that transistor.
Unlike with junction transistors which are current controlled, MOSFETs are voltage controlled and don't need a series resistor in the gate lead.
Post Edited (Mike Green) : 6/3/2008 1:13:29 AM GMT
The diodes are fine, only if they are placed in the correct location. In the schematic that you provided they are not placed correctly. I would however place a resistor in series on the gates in addition to a resistor to ground... even though the MOSFET gates are capacitive by nature, a series resistor can help limit the inrush current which can eventually damage the transistor. Also, if your driving the gate with a 5V supply, the gate (inside the MOSFET) can actually "see" 10V during a transition from HIGH to LOW or LOW to HIGH because of the capacitive nature of the gate. According to the spec sheet, 10V is the absolute maximum voltage allowed between the Gate and Source. The resistor to ground does not need to be much, but enough to keep the gate from floating and causing an unintentional turn on.
The schematic that you provided in general is a solid design, one that I have used many times without fail. I did take the liberty to re-draw half of your schematic so that it might be better represented.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
1. Right now I have the wire leading from my BS2 pin to the gate on the MOSFET but it doesn't connect to the gnd so I'm not sure where to place the 1M resistor. Should I have this connected to the GND with the 1M resistor?
2. Should the diode that you have around the relay connect from one side to the other as you have it in the diagram or am I mis-interpreting the schematic? Is there a chance that the relay could be damage by placing it like this?
I hope that these questions make sense...
The 1M resistor should go between the Gate and Ground.· A much smaller resistor (4.7K) should go between the gate and the BS2 I/O pin.· Although you could eliminate this resistor, having it there helps to limit the inrush current when you transition from LOW to HIGH or vise-versa.
The diode on the relay is correct.· It's function is to "snub" the voltage spike generated from the collapsing magnetic field when you remove power from the relay.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Excited, I put the wheels on my motors and put the robot down on the ground and I didn't get anything. After some quick analysis my MOSFET controlling the on/off of the motor had stopped working. I replaced it and tried again and it worked for a little while moving quite slow but eventually the MOSFETs that control the on/off of the motor stop working.
I know the motors have enough juice to move the robot as I can plug the motor directly into the battery and the robot moves like crazy, but for some reason when I have the circuit setup the transistors can't handle the load.
Could this be that the motors are trying to draw too much initial current to get the robot moving causing these transistors to stop working? I'm using salvaged DC gear head motors out of cordless drills (14.4V although I'm running them at 12V).
Post Edit -- There's no good reason that the "Direction" FET should crater because it only switches the Relay on/off, motor current doesn't·flow through it.
Post Edited (PJ Allen) : 6/6/2008 5:53:40 PM GMT
That's exactly what I'm thinking is that it is trying to draw too much current when it's initially trying to get going, frying the IRL510.
Seems that's it.· I think that you need a beefier FET.
You could put them in parallel, the current will divide between them, but you need to find out what you're drawing initially, or you'll burn two (or three?)·at once.
Ken
I'm going to pick-up some heatsinks and hopefully that will resolve my overheating issue.