# Arduino-controlled slot car set - Why are my MOSFETs burning out?

I'm attempting to control the speed of a slot car using an Arduino and a MOSFET.

I'm new to MOSFETs, however, and while my setup works for a moment, eventually the MOSFETs (N-Channel) open up, and they no longer regulate the car's speed.

I'm using this slot car set and this MOSFET.

The wiring is like this.

The slot car controller ground and the MOSFET source are connected to the Arduino's GND. The Arduino control line is connected to the MOSFET gate and the Arduino GND through a resistor. The other line from the slot car runs to the MOSFET drain, and I put a diode over the rails of the track to prevent reverse voltage spikes.

I'm able to fluctuate the speed of the car for a while, but eventually, the MOSFET goes out and no longer works. The slot car power supply is 17V DC.

Here are some more photos: http://imgur.com/a/iRL7D

What could be causing the MOSFET to burn out? The car flying off the tracks, maybe? Or, could it be heat? Would a heat sink attached to the MOSFET eliminate my problems? Do I have the right MOSFET?

• Do you know what the slotcar max current drain is? – Russell McMahon May 9 '12 at 18:04
• I understand Kevin & Jason's concerns about the MOSFETs used. I do not see the ability to read data sheets being possible only by using plotted characteristic lines as they do. You do not say which FET you are using (2 shown at the supplied link). Both MAY work OK. I would specify a lower Vth FT if doing this from scratch. BUT a good measure of whether the FET is being driven well enough is how hot it gets - as per my prior comments and query. How hot does it get. If only vaguely warm it should be OK drive wise. – Russell McMahon May 9 '12 at 18:12

I see a couple of things here; none directly obvious as the culprit.

1. How much current are you drawing from the slot car? It's hard to say whether the MOSFET (and your wiring, for that matter) is going to handle it OK.

2. Does the Arduino output 5V logic levels or 3.3V? Both parts sold by Sparkfun are 5V logic level MOSFETS -- shame on Sparkfun for saying -

This is a very common MOSFET with very low on-resistance and a control voltage (aka gate voltage) that is compatible with any 3-5V microcontroller or mechanical switch.

because it's not compatible with circuits that output less than 5V. If you have a system that outputs 3.3V, you need a MOSFET with on-resistance specified at 3.3V.

3. The freewheeling diode between MOSFET drain and the power supply is to protect the MOSFET, not the motor, from inductive voltage "kickback".

5. Breadboards are questionable for currents over 100mA; I'd keep the power supply wires off the breadboard and solder directly to the MOSFETs.

6. Yes, a heatsink would be helpful; that may be your problem. If the tab of the FET is too hot to touch, you probably need a heatsink. There are some easy clipon heatsinks at Digikey that are < 50 cents. Here's one: 591202B00000G.

7. I always put a resistor between microcontroller output and the MOSFET gate; it prevents oscillation due to inductance, and it prevents damage from propagating back to the microcontroller. (see my blog entry for more info)

8. I always put a pulldown resistor to keep the MOSFET in a defined state during reset.

9. grounding: The connection between microcontroller ground and MOSFET ground is critical; if you add inductance here, that can cause poor turn-on or turn-off in the MOSFET. Keep this short, and if you can't, then you may want to use a MOSFET driver located right at the MOSFET.

• WRT #2, the FETs are specified at 3.3V, but they have much lower saturation voltages than when driven with 5 V. Additionally, they supply 2 models of the MOSFET but one has poor performance at 3.3V. Moral of the story? Buy components from Digikey or Mouser, and use Sparkfun for modules and hard-to-get stuff. – Kevin Vermeer May 9 '12 at 16:08
• ? Neither has Rdson specified at Vgs=3.3V. The RFP30N06 has Rdson specified at Vgs=5V; the FQP30N06 has Rdson specified at Vgs=5V and 10V. If you're looking at the curves at the end of the datasheet (Fig 1 in FQP30N06, Fig 7 in RFP30N06), those are only typical characteristics and the manufacturer has no obligation to ensure that they are met by any particular part sample, and often part-to-part variation will exceed or fall short of the typical characteristics. – Jason S May 9 '12 at 16:18
• Yes, I was looking at the characteristic curves at the end of the datasheet. $R_{DS(ON)}$ is only specified at a few points for any MOSFET, it's OK IMO to operate it at other points in the range based on the curves. – Kevin Vermeer May 9 '12 at 16:23
• 3.3V is not enough to use this mosfet with high current loads. I had the same problem with a mosfet of the same family a few days ago with a NETFM board (I usually make 5V circuits, I forgot to check mosfet compatibility). Problem solved just by adding a 74xx buffer to convert the 3.3V output from NXP processoer to 5V. – Axeman May 9 '12 at 17:38
• I'll try to get a reading on current. The Arduino operating voltage is 5V, so hopefully we're good on that. I'm going to try to add a heat sink, then work on some of the improvements you mentioned, and let you know how it goes. In #3, how should a diode be connected to protect the MOSFET if not in parallel to the slot car (motor)? I'll keep you posted on what I find out! – Alan Christopher Thomas May 9 '12 at 18:47

What is the maximum current?

I think it is either:

• temperature (so a heat sink should work). Do you dare to touch the transistor (beware its temperature)?
• or the diode not properly working. What type of diode are you using? It needs to be pretty fast with PWM and it must be able to handle the max. current.

All looks OK. Power feed cannot be seen in photos but presumably 17V is fed to track via controller and MOSFET is on negative side of load so actual V+ does not appear on breadboard.

Run a V+ lead to breadboard and connect a reverse diode from FET Drain (centre terminal) to V+, Cathode to V+ so diode is reverse biased usually. I know you show a diode across the tracks BUT having one at the FET elminates several possible errors and problems.

You risk blowing up your Arduino as is. MOSFETs can short drain to gate in some failures and insert 17V into your Arduino.

If control is PWM on/off this appears fine.

Is Arduino providing 3V or 5V gate drive?
3V is a bit low for those FETs but should be OK.

Under PWM the FET should not get more than barely warm.
How hot does it get?

• I disagree with your comment on the gate drive -- technically the MOSFET manufacturers can do anything they like for on-resistance below the voltage at which they spec it. If I were going 0.5V below the Rdson specification, I'd be vaguely comfortable, but not 2V below it. – Jason S May 9 '12 at 15:40
• @JasonS - the FET is not ideal BUT may be OK - temperature in operation will be a fair measure of this, as noted. I have very considerable experience in specifying and using MOSFETs and understand 'well enough' [tm] what those datasheets are telling us. "Reading between the lines" [pun noted] is possible with due care and experience, with due allowances for confidence in results. – Russell McMahon May 9 '12 at 18:15

You need an anti-parallel diode across the slot car. In other words, from V+ driving the car to the drain of the MOSFET. This is reverse biased, so it's not a short circuit when the FET is on. However, since the slot-car is an inductive load the current will need a place to go when the FET turns off. By adding this diode the current is able to recirculate through the motor instead for driving a huge voltage spike across the FET.

This is also equivalent to using a half-bridge where the high-side switch is replaced by this diode.

First of all, stop using cheap diodes like the 2n4001-4. DC motors can create high BEMF, due to load and frequency...I would get ultrafast switching diodes like mur2020. The heat could be cause from the gate not getting enough power. Check the spec on mosfet gate input...5 to 12v range. Mosfet need to be fully on, or off...If you have it half way on, it will create heating. This could be the main problem, but also a heat sink is needed when pulling amps...