8
\$\begingroup\$

I am very new to electronics and working with Arduinos, I am learning a lot and would appreciate any help.

I am making a heating pad system for a high-altitude weather balloon science experiment. The circuit (sorry for the hand-drawn circuit diagram) is shown below. It is two Sparkfun heating pads powered by four 9 V batteries controlled by a MOSFET and an Arduino Uno.

Currently the heating pad circuit works without the MOSFET, but I want to be able to control the heating pads with the Arduino using the MOSFET.

What I intend to happen

  • MOSFET receives 5 V from Arduino and turns on the heating pads. At some point the Arduino pin is set to LOW and the heating pads should turn off and cool down.

Problems:

  • The MOSFET is overheating (the slightest touch will burn me and it melts any wire that brushes up against it) and damaging the MOSFET, causing the switch function to stop working.
  • The MOSFET starts heating up when the switch for the heating pads is turned on.
  • A new MOSFET works as intended, but over time it acts less and less reliable.
  • The MOSFET is exposed to open air and is not touching anything.

My assumptions:

  • I am assuming that I am doing something wrong that is causing the MOSFET to get hotter than what it is designed for, this damages the MOSFET causing it to stop working properly.

Troubleshooting and tests:

  • Heating pads draw up to 1 A of current
  • Replaced this type of MOSFET three times, tried different types of MOSFETs, similar results
  • Replaced and tested batteries several times, similar results

Current Code that is relevant

  • Declare with: pinMode(11, OUTPUT)
  • Turn on with: digitalWrite(11,HIGH)
  • Turn off with: digitalWrite(11,LOW)

Tutorials I have been referencing:

Circuit Diagram

Solution:

Thank you so much for all the help and suggestions! I especially appreciate the commenters that took time to explain their suggestions, that was extremely helpful. After trying a few things, connecting the Arduino ground to the MOSFET stopped the MOSFET from heating up. The heating pad circuit works perfectly now. The payload will be launched this weekend and I will update this if the heating pads had any trouble. My teammates and I went through every comment and learned a lot from this experience, again thank you so much for all the help!

For anyone looking up the same problem:
The FQP30N06 MOSFET worked fine with the 5 V from the Arduino once we connected the MOSFET source to the Arduino GND. The previous circuit diagram is accurate besides the change to adding a wire between Arduino GND and the wire between the MOSFET source and the battery GND. An updated circuit diagram is shown below.

Updated Circuit New Circuit

\$\endgroup\$
13
  • 3
    \$\begingroup\$ You need a logic level MOSFET that will switch on with 5V on the gate. What is the current through the heating pads? And why are you using a 5V regulator for the heating pad supply? \$\endgroup\$
    – PStechPaul
    Apr 13 at 4:14
  • 9
    \$\begingroup\$ Using a voltage regulator for the heating pad wastes about 40 % of the battery energy. \$\endgroup\$
    – Uwe
    Apr 13 at 5:04
  • 5
    \$\begingroup\$ And the 9v batteries, if they are commercial transistor batteries are not the ideal choice for providing high currents. \$\endgroup\$ Apr 13 at 5:21
  • 2
    \$\begingroup\$ Are the grounds connected? \$\endgroup\$
    – Oskar Skog
    Apr 13 at 7:06
  • 6
    \$\begingroup\$ You absolutely don't need a regulator for the heating element. Just run the heater directly from 9V. (maybe on a lower power setting) \$\endgroup\$
    – floppydisk
    Apr 13 at 12:00

5 Answers 5

5
\$\begingroup\$

The short answer

You need to connect the ground on the Arduino to the ground of the rest of the circuit.

The long answer

I think you've fallen prey to a misconception that's very common among beginners. You've been told that a MOSFET is controlled by the voltage at the gate, and you've been told that a GPIO pin of an Arduino can output a particular voltage, and so you've concluded that you can control a MOSFET by connecting a GPIO pin to the gate. That's a very reasonable conclusion, but it's not quite correct.

In my opinion, it's probably best for beginners to forget the word "voltage" and think about potential instead. After you understand how potential works, then you can learn about voltage as a useful little shortcut.

Let's talk about the potentials

Potential is a quantity that's measured in volts. Every piece of metal in the world has a potential. If you have an ideal 9 V battery, then the potential of the positive terminal is 9 V higher than the potential of the negative terminal. Another way to say that is that the potential of the negative terminal equals the potential of the positive terminal minus 9 V.

A voltmeter can tell you the difference between the potentials of two pieces of metal. The number that a voltmeter gives you is the potential of the red lead minus the potential of the black lead. There's no way to measure the potential of one piece of metal all by itself; the only thing we can measure is the difference between two potentials.

A MOSFET is controlled by the difference between the potential of its gate and the potential of its source. The quantity "potential of the gate - potential of the source" is called Vgs for short.

An Arduino Uno can control the difference in potentials between its GPIO pins and its GND pin. If you set pin 11 to HIGH, then the potential of pin 11 will be 5 volts higher than the potential of the GND pin. If you set pin 11 to LOW, then the potential of pin 11 will be the same as the potential of the GND pin.

You've connected pin 11 to the gate of the MOSFET, and that causes those two things to be at the same potential. Okay, cool. What will happen now is the following:

  • If you set pin 11 to HIGH, the potential of the gate will be 5 V higher than the potential of the Arduino's GND pin.
  • If you set pin 11 to LOW, the potential of the gate will be the same as the potential of the Arduino's GND pin.

So what will the MOSFET do? Well... I don't know. We know the relationship between the potential of the gate and the potential of the Arduino's GND pin, but we don't have enough information to figure out the potential of the source. So we can't predict what's going to happen. You've tried it out, and found out that what happens is that the MOSFET overheats.

However, we can fix that by connecting the Arduino's GND pin to the source of the MOSFET, which will cause those two things to be at the same potential as well. Now, the following will happen:

  • If you set pin 11 to HIGH, the potential of the gate will be 5 V higher than the potential of the source.
  • If you set pin 11 to LOW, the potential of the gate will be the same as the potential of the source.

Good news! Now we know what the difference between the potential of the gate and the potential of the source will be: it will be 5 V when pin 11 is set to HIGH, and it will be 0 V when pin 11 is set to LOW. So that means that the MOSFET will be on when pin 11 is HIGH, and off when pin 11 is LOW, which is exactly what you want.

(...assuming that the MOSFET does, in fact, turn fully on at 5 V and conduct the amount of current you need.)

Now let's talk about the voltages

Experienced electrical engineers usually talk about voltages, not potentials. However, the way that they talk about voltages is often confusing, because they leave out some information and expect you to be able to figure out what they're saying.

A voltage is just the potential of one thing minus the potential of another thing. If someone says "the voltage of this battery," what that means is "the potential of this battery's positive terminal minus the potential of this battery's negative terminal." If someone says "the voltage of the Arduino's pin 11," what that means is "the potential of the Arduino's pin 11 minus the potential of the Arduino's ground." And if someone says "the voltage of the MOSFET's gate," what that means is "the potential of the MOSFET's gate minus the potential of the MOSFET's source."

Now, how, exactly, are you supposed to know that "the voltage of the gate" means "the potential of the gate minus the potential of the source" and not, say, "the potential of the gate minus the potential of the drain" or "the potential of the gate minus the potential of the coins in my pocket"? It's just a convention that you're supposed to learn.

You were correct in thinking that you need to make it so that the voltage of the MOSFET's gate equals the voltage of the Arduino's pin 11. But what you probably didn't know is that the phrases "the voltage of the MOSFET's gate" and "the voltage of the Arduino's pin 11" each refer to a pair of pieces of metal: the first phrase is talking about the MOSFET's gate and source, and the second one is talking about the Arduino's pin 11 and GND. So in order to make those voltages equal, you have to make a pair of connections, not just one.

\$\endgroup\$
3
  • \$\begingroup\$ voltage and potential are the same thing \$\endgroup\$
    – user253751
    Apr 14 at 13:22
  • 1
    \$\begingroup\$ @user253751 i think voltage is actually defined as the difference in electric potential between two points: this answer clearly states that when techies talk about voltage at one node in a circuit they usually refer to the potential difference between that point and the GND that has been defined for that circuit \$\endgroup\$
    – Jack
    Apr 14 at 15:07
  • \$\begingroup\$ @CassieSwett Thank you so much for the helpful explanation! I edited my post with an update. My team and I were struggling with getting this circuit to work for an entire week. Such a simple modification to the circuit fixed all of our problems. Thank you for taking the time to explain this!!! \$\endgroup\$ Apr 15 at 16:03
20
\$\begingroup\$

A single heating pad draws 750mA when powered from a 5V source (according to the web site you linked to). That's within the capabilities of the MOSFET you are using, but only just. The datasheet FQP30N06 datasheet doesn't tell us much about what happens with \$V_{GS}=5V\$, which in itself is a strong hint that this device is not really suited for such low gate drive signals. There is only one graph I can find that tells us anything useful at \$V_{GS}=5V\$, on page 3:

enter image description here

This tells us that at 750mA drain current (lower than the graph even shows), you can expect less than 0.1V between drain and source. This will keep power dissipated in the MOSFET well under 0.1W, so the MOSFET might get warm, but not as hot as you describe. Even at 0.5W of power, the transistor shouldn't get hot enough to melt plastic.

That being said, even with just a single heating pad, you are working right on the edge of the MOSFET's capabilities, and I would recommend a MOSFET with significantly lower \$V_{GS(TH)}\$, much less than the 4V for this device.

With two pads, the current that should flow, if they really do have 5V across them, is \$2\times 750mA=1.5A\$, which you obviously are not achieving (you quoted a current of 1A max), and which means that the actual voltage across those pads is more like:

$$ V = IR = 1A \times \frac{6.5\Omega}{2} = 3.3V $$

This is probably due to the batteries and/or regulator being unable to maintain 9V and/or 5V under such a load. To test this theory, you should verify that the 5V source is actually staying at 5V when the two heaters are simultaneously powered, without the MOSFET; that is, connect those pads in parallel directly between the regulator's 5V output and ground, and see what happens to battery voltage and regulator output.

This brings me to a much bigger problem. Even if the regulator and batteries are able to tolerate a 1.5A load (two pads), the regulator will be dissipating a lot of power. It will drop 4V across it (the drop necessary to go from 9V to 5V), while passing 1.5A. That's a power dissipation of:

$$P = IV = 1.5A \times 4V = 6W $$

The regulator would be heating almost as much as the heating pads, enough to destroy it in short order, if it didn't protect itself by dropping out. The fact that it doesn't blow up is telling me that the batteries or the regulator (or both) are dropping out, which is preventing the regulator from dissipating such a large amount of power. Again, check your 5V regulator output, and battery voltage, to find out if I'm right.

Now, if the regulator output drops below 5V, and the Arduino can still operate, it's obvious that the gate drive signals to the MOSFET will also be lower than 5V, and you have a situation where the MOSFET can never be fully on, which will cause it to start heating up, too! The increased on-resistance of the MOSFET will reduce heating pad current, which will reduce demand from the batteries and regulator, and the whole system will find some equilibrium in which everything is getting hot.

You can't use a single FQP30N06 MOSFET to operate both heating pads. The right MOSFET could do that, but not the FQP30N06. You can, however, use one FQP30N06 per heating pad, I believe that's within this device's capabilities. The resulting circuit might look like this:

schematic

simulate this circuit – Schematic created using CircuitLab

Firstly, notice that I reduced gate resistance R1 a lot, from 10kΩ down 470Ω. This keeps gate charging current to within the capabilities of the Arduino output (10mA or so), while causing those gates to rise and fall in potential as quickly as possible. That way, the MOSFETs spend as little time as possible in a not-quite-on, not-quite-off state, wasting battery energy and heating up.

This doesn't solve the problem of regulator over-heating, which is by far the greatest problem you have with your design. The only solution I can think of is to power the heating pads directly from 9V, instead of requiring the regulator to do all the heavy lifting.

You might say that the pads are designed to operate from 5V, but that's just SparkFun talking. It's more appropriate to say that the pads are designed to operate at \$P=I^2R = (0.75A)^2 \times 6.5\Omega = 3.6W\$.

It doesn't matter what voltage (within reason; 9V is fine) you apply across the pads, as long as on average you have 0.75A through them, for an average power dissipation of 3.6W.

Consider the following design:

schematic

simulate this circuit

I've connected the top ends of the heater pads directly to +9V insteads of +5V, bypassing the regulator altogether. Now the regulator is providing only a few milliamps to operate the Arduino and other low-current-demand systems.

Of course, this means you cannot switch the heater pads permanently on, because with 9V across them, they will pass \$\frac{9V}{6.5\Omega}=1.39A\$ and will dissipate \$ P=\frac{V^2}{R}= \frac{9^2}{6.5} = 12.5W\$ each. What you can do, however, is switch the MOSFETs on and off rapidly, using one of the Arduino's PWM outputs (at a low PWM frequency, perhaps 1kHz, for example).

By setting the PWM duty cycle to \$\frac{3.6W}{12.5W}=29\%\$, you set the average power to the prescribed 3.6W.

Beware, though, rapid switching of current demand from the 9V supply will create significant voltage dips of that supply at the PWM frequency, some of which will make it past the regulator. You must mitigate this with C1 (electrolytic) and C2 (ceramic), to decouple this switching noise from the rest of the system.

Also, don't forget the usual 10nF or 100nF (ceramic) supply decoupling capacitor, one for each and every IC, very near to the IC's positive/ground pins. The Arduino already has them, but there's no harm in adding another 100nF right across its power input.


Update

User @Rmano commented with a brilliant twist, which seems obvious in hindsight, but which I'm sad to say I didn't think of myself: wire the two pads in series, and power them directly from 9V.

The power dissipated by the pair in total would be:

$$ P = \frac{V^2}{2R} = \frac{9^2}{2 \times 6.5} = 6.2W $$

They would both share the 9V equally between them, for 4.5V and 3.1W each, a little short of the specified 3.6W, but close enough.

The current through both would be less than the 750mA through a single pad powered from 5V:

$$ I = \frac{V}{2R} = \frac{9}{2 \times 6.5} = 690mA $$

That means you can use a single FQP30N06 MOSFET to switch them both simultaneously, from a regular non-PWM on/off control signal. The idea could be implemented like this:

schematic

simulate this circuit

There is one potential gotcha here, that @Rmano alluded to, which is that this setup could fail if the pads' temperature coefficient of resistance is positive. That could lead to thermal runaway, as one pad heats up more than the other; its resistance increases faster, causing its voltage to increase while the other pad's voltage decreases, which further exacerbates the disparity, and so on, until one of the pads overheats.

It's easy to test for. Just connect the two pads in series, directly across 9V, and keep an eye on voltage across either one. If, after some time, either voltage exceeds 5V or drops below 4V, then you can't employ this series arrangement, at least not without some additional mitigating scheme.

\$\endgroup\$
16
  • \$\begingroup\$ @BenVoigt Don't forget the average voltage is also 9V×54%=5V. Any way I look at it, 750mA through 6.5Ω is 3.6W. \$\endgroup\$ Apr 14 at 3:02
  • \$\begingroup\$ @BenVoigt You are right, of course! I'm humbled, shamed, and grateful for the correction! \$\endgroup\$ Apr 14 at 5:23
  • 1
    \$\begingroup\$ Nice answer, +1. I would however use two different PWM to reduce the peak current from the batteries, and probably go with BDX33 as switches... A question, what's the thermal coeff how the heating pads? Because if there is no risk of runaway, you can explore the possibility of putting them in series... (Maybe they will get a bit shorter than 3.6 W, I didn't do the math). \$\endgroup\$
    – Rmano
    Apr 14 at 15:29
  • 1
    \$\begingroup\$ @Rmano BDX33 are bipolar transistors. Why do you think they are better for a switch application. Nowadays there are little reasons to use BJTs as switches instead of MOSFETs. They may have some advantage in high-voltage applications, but anything low voltage calls almost always for a MOSFET, especially now that logic-level MOSFETs are cheap and widely available for systems with 3.3V or even 2.5V logic levels (a Vgs(th)max of 1V is not difficult to find cheaply nowadays). \$\endgroup\$ Apr 14 at 15:42
  • 2
    \$\begingroup\$ Thank you for all your help! I provided an update on what fixed the circuit for us in my post. My team and I have been going over all of your comments and answers and it taught us a lot. Your comments have also led us down a rabbit hole of looking more things up. Thank you for taking the time to answer and teach us more about electronics! \$\endgroup\$ Apr 15 at 16:51
4
\$\begingroup\$

Two potential issues:

  1. If your diagram is accurate, your system is not connected properly (although there's a good chance that your diagram is not accurate). Your Arduino GND and your MOSFET source need to be connected together. This diagram implies that they are not.
  2. Your MOSFET has a relatively high threshold voltage. At 5 V, the datasheet says that the resistance will be around 100 mΩ, which will dissipate 100 mW. Without a heatsink, your MOSFET will heat up, and the resistance will increase, increasing the temperature. You could fix this by using a different MOSFET with a lower threshold voltage and lower resistance at 5 V gate drive.
  3. Using a linear voltage regulator will mean that it dissipates almost as much power as your heating pad. It will heat up a lot, and probably break unless it has a heatsink.
\$\endgroup\$
3
  • 1
    \$\begingroup\$ Using a heatsink on a high altitude weather balloon may require a larger heatsink due to the much lower air pressure than on ground. But air is much colder up there than on ground. \$\endgroup\$
    – Uwe
    Apr 13 at 4:17
  • \$\begingroup\$ The GND and MOSFET source are not connected, I will fix that tomorrow. From my understanding (may be totally wrong) the drain pin and source pin are connected. Would having the external power source be connected to the Arduino through the ground cause any problems? I will see what other MOSFETS are available to me and see if I can find one with lower threshold voltage and lower resistance. Also, we have not had a problem with the voltage regulator heating up. \$\endgroup\$ Apr 13 at 4:38
  • \$\begingroup\$ Is it a switching regulator? That could explain why it is not getting hot. \$\endgroup\$
    – PStechPaul
    Apr 14 at 3:28
0
\$\begingroup\$

My first idea, when looking at your handdrawn schematic : Is the ground connected? Is the minus of MOS-Transistor connected to GND of Arduino. On the other hand i suggest to buy some Voltmeter, mesure everything you can. Human beings they have no sense for electricity, so if you messure you get an idea whats happening.

\$\endgroup\$
0
\$\begingroup\$

FQP30N06L This is the answer that you seek

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.