Can Heat from Heating Resistor Damage Arduino Board? - Page 1
Forum section: electronics / beginners

author: Potomac
author_rank: Regular Contributor
timestamp: December 26, 2015, 11:30:59 am
content: Hi all. Beginner question hereAs part of a project I'm working on, I'm using a power film resistor to generate heat for a PID temperature control system.The heating resistor I'm using is the Caddock Electronics MP915-20.0-1%. According to the datasheet, the MP915 part represents the model number, the 20.0 represents resistor value in Ohms (20 ohms), and the 1% represents the tolerance.I've been testing the resistor out in room temperature air and without a heat sink. On page 2 of the datasheet, Caddock says that the MP915 is rated for 1.25 watts in these operating conditions. (Room temp and no heat sink) With Joule's Law (P=V*I), I've worked out that the maximum voltage for this resistor is 5.0 volts and the max current is 0.25 amps.I tried plugging the resistor into my Arduino's 5volt pin and ground pin. The resistor heated up as expected, but the board also got very hot. I am wondering if this can damage the board?Are there other components I need to be aware of that I can use to stop the board from getting so hot? Or is this unavoidable?Relevant Links:The Digikey page is here:http://www.digikey.com/product-search/en?keywords=MP915-20.0-1%25The data sheet for the whole family of Caddock resistors is here (there are a lot of them):http://www.caddock.com/Online_catalog/Mrktg_Lit/MP9000_Series.pdfMy setup:

author: mikerj
author_rank: Super Contributor
timestamp: December 26, 2015, 11:44:23 am
content: The dissipation limit with no heat sink and 25C ambient is undoubtedly derived from the temperature the device will reach in these conditions, which will likely be close to the maximum permitted temperature of 150C. If it mount something on a PCB that gets that hot, then inevitably nearby parts are going to get hot as well. If semiconductor devices or electrolytic caps are nearby then you can expect reduced life, maybe greatly reduced.Do you have to mount the resistor on the board, or could it be mounted remotely on wires? Can't you use a heatsink?

author: Potomac
author_rank: Regular Contributor
timestamp: December 26, 2015, 11:51:57 am
content: Thanks blueskull. Makes sense now about the power jack!Mike, I think you may have answered before I uploaded that picture. Does that answer the question about mounting them on wires?

author: Richard Crowley
author_rank: Super Contributor
timestamp: December 26, 2015, 12:24:50 pm
content: Let's step back and review what is happening here....We typically do not actually source power from the Arduino board for high current loads.The Arduino board is not designed to be a power supply board. It is designed to be a micro-controller board.The voltage regulator on the Arduino board is selected to provide power for the Arduino itself.And maybe enough extra to drive small external loads. (Like a few LEDs, etc.)But it is not designed to provide high-current output from the board to an external load.Arduino is capable of controlling loads of monumental power.However, we use external power-handling devices (transistors, thyristors, relays, etc.) to actually supply and switch high-power loadsThe resistor heating up like that is normal and expected. That is what it is designed for.Although pumping that much power into it without an external heat sink isn't doing it any great good.Except for things specifically designed as heating elements, heat is generally an enemy of electronic and electrical components.The on-board regular on the Arduino heating up like that is definitely NOT normal and expected.It is a primary symptom of abuse above and beyond its design parameters.As a general rule, do not use the Arduino board to supply power to external loads. Especially big ones like your resistor.

author: retrolefty
author_rank: Super Contributor
timestamp: December 26, 2015, 12:43:14 pm
content: As said an arduino board is not designed to supply all that much extra current for external loads. The board by itself consumes <50 ma. Your resistor is drawing around 250 mA. The excess voltage that the on-board 5vdc regulator has to consume is the reason for it running hot.One thing you might try if using external DC voltage is to lower the voltage to just above the input drop out voltage rating for the regulator, say 7vdc. This will relive the regulator so that it can pass higher current with less voltage drop.However the regulator on a arduino is still a limiting factor, so the best solution is to use your external DC voltage directly (via the Vin pin) for the resistor and let the arduino output pin drive a small logic level mosfet transistor and utilize PWM ( arduino analogWrite() ) as the temperature output command for your PID control sketch. You need a output pin switching transistor anyway as you can't drive 200 mA directly from an arduino output pin as it would damage the output pin rather quickly.

author: MatthewEveritt
author_rank: Unknown
timestamp: December 26, 2015, 12:47:55 pm
content: I wouldn't be surprised if the micro was heading up too - the current per pins in rated only at 20mA. Pulling more than an order of magnitude higher current is definitely not recommended.In fact, the effective resistance of the arduino output is c.25 Ohms, meaning the micro is dissipating MORE power than the resistor. You really need to look at buffering it with a transistor or relay.

author: Richard Crowley
author_rank: Super Contributor
timestamp: December 26, 2015, 12:52:29 pm
content: Quote from: MatthewEveritt on December 26, 2015, 12:47:55 pm@Allar8 would have blown an output pin if he had connected his load to it. As you correctly observe, a load like that is orders of magnitude greater than what a micro-controller like that can handle.However, he "only" connected his large load to the output node of the on-board power regulator. That un-controlled output is capable of a much higher power capacity than any of the microcontroller output pins. Although the regulator chip heating is a primary symptom of drawing way more current through it than would be prudent and proper.

author: mikerj
author_rank: Super Contributor
timestamp: December 26, 2015, 01:08:18 pm
content: Quote from: Potomac on December 26, 2015, 11:51:57 amYes I did, and yes it does! The regulator is the part that's getting hot as blueskull says.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: December 26, 2015, 05:31:55 pm
content: So to be explicit about the solution to the "problem"...One would use one of the PWM output pins to send a signal to the Gate of a mosfet, or to the Base of an NPN transistor (through the appropriate resistor). The Source of the mosfet or Emitter of the NPN will be connected to the Negative rail (ground) of the Arduino and the power source for the Heating Resistor. The Drain of the mosfet or Collector of the NPN will be connected to the low side of the Heating Resistor, and the high side of the Heating Resistor will be connected to the Positive rail of the power source for the Heating Resistor.Then by using the analogWrite() statement to write some value from 0 to 1023 to the PWM pin, the average power to the Heating Resistor can be controlled.The power source for the Heating Resistor can be the same as the power source for the Arduino, as long as it can deliver enough current. But this power must be taken in parallel to the Power IN plug for the Arduino, not from one of the Arduino's pins. One can also use an entirely separate power supply for the Heating Resistor, but both the Arduino supply and the separate supply must share a common ground (since the Source of the mosfet or Emitter of the BJT must be connected to the Arduino ground for the PWM signal to stimulate the transistor properly.)

author: Potomac
author_rank: Regular Contributor
timestamp: December 27, 2015, 12:50:01 pm
content: Thanks Richard, retrolefty, Matthew, and alsetalokin for your suggestions. And mike again.I see what you are all saying about need for a driver for the heating resistor. And the need for a heat sink.I went through a document I have describing a similar Arduino system that has 4 heating resistors. (Same model Caddock that I have) The system includes 2 Arduino shield boards. "Board #1" actually does include a driver for the heating resistor. It connects to "Board #2" via a ribbon cable that has the 4 heating resistors. It also includes a large piece of aluminum as the heat sink. The heat sink is meant to warm up a container, which will be my application too.I pasted an annotated picture below of the Arduino system in questionThe driver on Board #1 to be a 16 pin driver made by Texas Instruments. Unfortunately, the quality of the picture isn't great. I can make out the state of Texas logo, but I can't make out the text of the model number. Also, the document doesn't list the specific model. (Really crappy documentation from the author, I know).My questions now are:1). Can anyone, by chance, make out the text of that Texas Instruments driver? Hoping someone with more experience than me can make a more educated guess.2). If not can you suggest a specific FET or MOSFET or NPN to drive a single heating resistor that I can buy? I just want something that I can test out the PID control system with, and get the hang for PID in general(I'm posting the Digikey page again here with the heating resistor specs:http://www.digikey.com/product-search/en?keywords=MP915-20.0-1%25)

author: Potomac
author_rank: Regular Contributor
timestamp: December 27, 2015, 02:23:07 pm
content: Update. Think I may have located the Texas Instruments chip. Does this seem like it could be the one to drive the heating resistor based on the specs?SN754410NE:http://www.digikey.com/product-detail/en/SN754410NE/296-9911-5-ND/380180Also would still appreciate a FET/MOSFET/NPN/solid state relay recommendation just so I can get the hang of PID control of a single resistor

author: Richard Crowley
author_rank: Super Contributor
timestamp: December 27, 2015, 05:15:25 pm
content: Yes, that SN754410NE looks correct. It was made for much more sophisticated things like H-bridge PWM control of speed and direction of a DC motor, etc. It is rather over-kill for something as simple as driving a simple resistor heating element. But it is cheap enough and will do the job.If i were doing this I would use one of these...http://www.allelectronics.com/make-a-store/item/tip120/npn-to-220-darlington/1.htmlhttp://www.allelectronics.com/make-a-store/item/rfp15n05l/n-channel-mosfet/1.htmlThis is the general circuit.Note that the heavy current never passes through the Arduino board.

author: aaronwiz
author_rank: Contributor
timestamp: December 27, 2015, 07:16:52 pm
content: The arduino's maximum output current on a pin is something like 20mA, so definitely do not hook it directly to the heating resistor or you can fry your microcontroller.Also ditch the BJT power transistor. For this application, there is little benefit to using a BJT. A mosfet is a far better choice. A BJT requires a large base current, has a higher resistance, requires a correctly sized base resistor, is more likely to require a heatsink, and can not handle as much current. Most of these drawbacks result in heating up the transistor rather than the load resistor.Find any logic level n-channel mosfet that can handle the current you need. Hook the resistor to Vcc and the other end to the drain of the mosfet, then hook the source of the mosfet to ground. Connect the gate of the mosfet to the microcontroller pin through a ~200 Ohm resistor, and finally hook a ~10K resistor between the gate and ground to discharge any gate capacitance and you are good to go. You can switch very large loads, use analogWrite(), and draw very little current from the microcontroller pin.Here is a good mosfet from sparkfun that will work well:https://www.sparkfun.com/products/10213.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: December 27, 2015, 08:02:59 pm
content: You don't even need a logic level mosfet. The IRF3205 will work fine in this application with 5 v supplied to the Gate. Other mosfets can be used as well; you are looking for a low Rdss ON in the specs.Here's a video I made about three years ago, using a PID system on Arduino to power a heating resistor, switched by a mosfet. The mosfet I used here is a silly choice but works nevertheless. Sorry about the poor video quality, I was using an inferior transcoder at that time.This project eventually resulted in a complete Sous Vide PID temperature-controlled cooking system using a standard crock-pot. (Maybe that's why I was using the big power mosfet ... )

author: Richard Crowley
author_rank: Super Contributor
timestamp: December 27, 2015, 08:16:08 pm
content: @alsetalokin4017, so what do you cook with Sous Vide?Didn't you need a thyristor (SCR or Triac) to control the mains voltage for a crock-pot?

author: alsetalokin4017
author_rank: Super Contributor
timestamp: December 27, 2015, 09:00:26 pm
content: Quote from: Richard Crowley on December 27, 2015, 08:16:08 pmI've cooked eggs, sausages, chicken, steak, etc. with it. It works pretty well, actually. I haven't used it in some time though.Heh... as for the power section... Of course using a thyristor would be the "right way" to do it.... but...... you made me get it off the storage shelf and look!Turns out I used some crazy FWB modulation scheme, where the AC inputs to a FWB are in series with the AC line to the crockpot, and then the mosfet is used to short out the DC output of the FWB, which has the effect of toggling the AC input to the bridge somehow, effectively interrupting the circuit to the crockpot.Don't ask me where I got this crazy idea. The Gate of the IRFP460 mosfet is driven by an optoisolator module, itself driven from the Arduino. I know, I know, it's totally nutso, but it does actually work just fine.Here's a photo of the power section. The silver box on the left is a standard fused power-entry line filter module, with an on-off switch. The crockpot itself connects to the black barrier strip at top. The FWB and mosfet share a common heatsink. The Arduino and LCD display are normally on the right side but are missing, in use in some other projects at the moment. Two 10-turn pots with turncounting dials are used to set the desired temperature and an overtemp alarm, out of sight on the right side of the board.

author: Richard Crowley
author_rank: Super Contributor
timestamp: December 27, 2015, 09:11:16 pm
content: I have a Sony TC-850 reel-to-reel tape recorder (which I bought new as a college student back in the 1960s). It actually uses a FWB and a TO3 transistor (like a 2N3055, etc.) on a big aluminum plate as an AC "series pass" resistor to control the speed of the capstan motor. It had a speed sensor on the capstan flywheel to complete the servo loop. The speed sensor was a bunch of notches cut into the flywheel and a coil of wire around a magnet making a sort of "variable-reluctance" sensor.That is the pass transistor and the big plate "heat sink" just to the left of the power transformer.

author: Potomac
author_rank: Regular Contributor
timestamp: December 28, 2015, 12:50:25 am
content: Hey guys, OP againHere's the only MOSFET I was able to dig up in my parts box. It's a Vishay IRLZ34-ND:http://www.digikey.com/product-detail/en/IRLZ34/IRLZ34-ND/51137Will it work? Is the rds too high at 50 mOhm? (Compared to 8 mOhms in the IRF that alsetalokin linked to:http://www.digikey.com/scripts/DkSearch/dksus.dll?Detail&itemSeq=186582910&uq=635868387670806636)Otherwise, I'll check out my local Radioshack tomorrow so I don't have to wait for a Digikey shipment.

author: Richard Crowley
author_rank: Super Contributor
timestamp: December 28, 2015, 01:21:48 am
content: I don't see any reason why it wouldn't work.If your load is drawing 250mA, and your transistor is only 50mOhm,then Ohm's Law says the transistor is only dissipating 3mW.So I wouldn't expect that to be any kind of problem.

author: aaronwiz
author_rank: Contributor
timestamp: December 28, 2015, 01:45:09 am
content: Quote from: Potomac on December 28, 2015, 12:50:25 amThis is an absolute perfect fit for your application and it is indeed a logic level mosfet (notice how Rds On is specified at 5V?). You should be able to power loads up to tens of amps without a problem, let alone the < 1A you are looking for. Just remember if you ever replace the resistor with an inductive load (such as a motor), be sure to to add a flyback diode across the load, as mosfets are very sensitive to voltage spikes.

author: Potomac
author_rank: Regular Contributor
timestamp: December 28, 2015, 06:49:04 am
content: OK so I set up the MOSFET circuit and loaded up some PWM code. (Power source is a cell phone charger sized AC-DC converter that I stripped down and tapped into with alligator clips. Running at 4.5 volts and 1 amp)However, no sign of any PWM whatsoever. The resistor just heats up and stays there.I had programmed the loop to gradually heat up to 100/255 heat, then hold for 10 seconds, then cool down all the way and hold that for 10 minutes. What I got instead was a resistor that heated up to the maximum, and stayed that way the entire time. No drop to zero.I'm at a loss for what I did wrong. It must be a rookie mistake with the breadboard wiring or the code. Not sure whichI pasted some pictures below.This is the circuit drawing againHere's the code I usedint heaterPin = 3; // heating resistor connected to digital pin 3void setup() {}void loop() {// fade in from min to max in increments of 5 points:for (int fadeValue = 0 ; fadeValue <= 100; fadeValue += 5) {// sets the value (range from 0 to 255):analogWrite(heaterPin, fadeValue);// wait for 10 secs to see the dimming effectdelay(10000);}// fade out from max to min in increments of 5 points:for (int fadeValue = 100 ; fadeValue >= 0; fadeValue -= 5) {// sets the value (range from 0 to 255):analogWrite(heaterPin, fadeValue);// wait for 10 minutes to see the dimming effectdelay(600000);}}

author: hamster_nz
author_rank: Super Contributor
timestamp: December 28, 2015, 07:39:35 am
content: Have you set the pin to be an output pin? Look at an example to find out how to do this in the setup() function.

author: jancumps
author_rank: Unknown
timestamp: December 28, 2015, 08:26:50 am
content: You may want to put a resistor between arduino output and the gate of your fet. 220 ohm is an often used value, as suggested earlier in this thread.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: December 28, 2015, 01:17:54 pm
content: 1. In setup(), include the statementpinMode(heaterPin, OUTPUT);2. For testing purposes, use an LED + 220 ohm resistor in series, instead of the heating resistor (in correct polarity of course). Change both delay() statements to delay(100). Then see if the LED dims and brightens.Ah...the second delay() statement is inside the dimming for() loop, so it is waiting ten minutes each time it goes through that loop.Your code is waiting _10 minutes_ between each decrement value for the fade-out, because of the delay(600000) statement. So unless you are incredibly patient you won't be noticing the resistor cooling very much.If you want a delay between heating cycles, put a delay() statement outside the for() loop (that is, between the last set of curly brackets) not inside it, and use a smaller delay() value inside the loop.(This is probably why the mosfet is staying on --- assuming the mosfet is actually good and not shorted internally. You are telling it to stay on in the code! )3. The Gate pulldown resistor is too small. You may not need any pulldown at all (infinite resistance) but 100k is probably OK.4. Use a 10 ohm to 100 ohm (or even 220 ohm) resistor between the Arduino heaterPin and the mosfet Gate.

author: Potomac
author_rank: Regular Contributor
timestamp: December 28, 2015, 06:48:42 pm
content: Hey alsetalokin4017. I'm able to get PWM working on an LED with that code fine by plugging directly into pin 3 (with a resistor) and ground.Something seems to be wrong with my heating resistor MOSFET circuit though. I'm not sure what it is. I'm getting the same results --- just stays hot. Does not cool down. I made the changes you suggested to the resistors. Did I translate the changes you had in mind properly in the Fritzing diagram below? (It's how I have my board set up)The code I used this timeint heaterPin = 3; // heating resistor connected to digital pin 3void setup() {pinMode(heaterPin, OUTPUT);}void loop() {for (int fadeValue = 0 ; fadeValue <= 255; fadeValue += 5) {analogWrite(heaterPin, fadeValue);delay(100);}for (int fadeValue = 255 ; fadeValue >= 0; fadeValue -= 5) {analogWrite(heaterPin, fadeValue);delay(100);}delay(10000);}

author: Richard Crowley
author_rank: Super Contributor
timestamp: December 28, 2015, 07:57:37 pm
content: We cannot see your diagram.If you remove the connection between the transistor gate and the Arduino, does the transistor turn on? (i.e. do the transistors heat?)If the transistor won't turn off when it isn't connected to the Arduino, then either the transistor is shorted or you don't have an effective pull-down resistor for the gate circuit.

author: Potomac
author_rank: Regular Contributor
timestamp: December 28, 2015, 08:22:20 pm
content: Hey Richard, not sure why the pic isn't working. I've heard that the host (tinypic) may be blocked on some work computersHere it is again on a different hostAlso attached it below on the EEVBlog host (click paperclip)

author: Richard Crowley
author_rank: Super Contributor
timestamp: December 28, 2015, 08:41:40 pm
content: OK. If you disconnect that green wire from the Arduino board pin 3, does the LED/heat turn off?

author: Richard Crowley
author_rank: Super Contributor
timestamp: December 28, 2015, 08:47:50 pm
content: If you REALLY have your breadboard plugged as shown in your diagram, then neither end of the 100 ohm resistor is connected to anything and the gate of the transistor is floating in the air.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: December 28, 2015, 09:04:08 pm
content: @Potomac:Zerost: As Richard says, the 100R in your Fritzing diagram isn't connected to anything and so there is no path from the Arduino to the mosfet Gate. If the mosfet is ON anyway... it's probably shorted and you need a new mosfet.However, sometimes a mosfet with a "floating" or disconnected Gate can be turned on by static charges, even from your finger. This is one reason why the Gate pulldown resistor should be used, and should connect the Gate to the Source directly.First: You need a current-limiting resistor in series with the LED on your Fritzing diagram. 220-280 ohms should do it. With a 4.5 volt supply the LED may burn out without the resistor, if the mosfet turns on. Also I think you have the LED in the wrong way around, I think the kinked lead is the Anode and should go towards the positive battery (or powersupply) terminal. The LED should have a flat spot on the lower edge rim, this indicates Cathode. Also the Anode lead is longer on most LEDs if it hasn't been cut. Also the Cathode of the LED is usually the "cup" structure inside the LED. SO Anode goes to battery positive, Cathode goes to mosfet Drain. (The currentlimiting resistor can go on either side of the LED but general practice is to put it on the Anode side between the LED and battery.)Second: Richard's test is trying to see if perhaps the mosfet is shorted from Drain-Source. If the heat resistor, or LED+resistor, stays on with the wire to Arduino Pin 3 disconnected, the mosfet may be bad.Third: The 100 k gate pulldown resistor should go directly from the Gate pin to ground (mosfet Source pin). You have it on the wrong side of the 100R gate series resistor. This is a minor point, though, and won't make any real difference in your case.Fourth: The breadboard wiring looks good except for the 100R resistor error, but try to avoid having wires crossing over on the breadboard. This is also a minor point but will help avoid confusion in the long run. Just change which holes you are using for the wires plugging into the mosfet pin strips so those wires don't cross.ETA: On the breadboard, in the central area the 5-hole columns have all holes connected together vertically, but they are _not_ connected sideways unless you connect them with a jumper. This is why your 100R isn't connected to anything. The columns are also not connected across the very central gap. (This is where you'd put a standard "DIP" integrated circuit package if you were using one, across this gap.)The power busses on the top and bottom of the breadboard _are_ connected all the way across horizontally, as the Red and Blue lines are indicating. These rows are used for positive and negative power rails, and you jump them over to the central columns as necessary to feed power and ground connections to your circuit.Some larger breadboards have these power rails split into left and right halves, and this will usually be indicated by a corresponding break in the red and blue (or black) lines.

author: Potomac
author_rank: Regular Contributor
timestamp: December 28, 2015, 09:42:08 pm
content: I think I fixed the silly mistake of the floating pin here, but when I implement this, I still don't get PWM. And when I disconnect the green cable from pin 3, the heating resistor stays hot.Hope your patience isn't wearing thin. I feel like this is a simple circuit. Don't know what's going wrong.I attached a new Fritzing JPEG. (Again, LED replaced with a heating resistor, and battery pack replaced with AC-DC 4.5 volt)I tried uploading the FZZ file to EEV blog but it won't let me. This one can be opened in the Fritzing program.https://www.sendspace.com/file/m9nkut

author: Richard Crowley
author_rank: Super Contributor
timestamp: December 28, 2015, 09:55:16 pm
content: Everyone here would feel better if you connected that 100K resistor directly from the gate to the source pins on the transistor.Remember that each row of five holes is connected together.There are plenty of holes left in the breadboard to put the resistor directly across the transistor pins.If the 100K resistor pulling "down" (to ground) on the transistor gate cannot cause the transistor to turn off,then the transistor is shorted or otherwise defective (or mis-labeled).

author: alsetalokin4017
author_rank: Super Contributor
timestamp: December 28, 2015, 10:34:09 pm
content: Quote from: Richard Crowley on December 28, 2015, 09:55:16 pmYep, I concur.Just for fun I put Potomac's code into a ProMini and hooked up the circuit. (I took out the long delay between cycles though.) I used a #1156 automotive brake light bulb as the load, powered from a separate 12 volt supply. The ProMini itself is powered from a 5 volt supply. The brake light bulb uses nearly 2 amps when fully bright. I used an IRF3205 mosfet, a 100R gate resistor and a 100k gate pulldown connected from Drain to Source.

author: aaronwiz
author_rank: Contributor
timestamp: December 28, 2015, 10:56:10 pm
content: Quote from: Potomac on December 28, 2015, 09:42:08 pmI'm starting to suspect your mosfet is burned out. I would test it first without pwm, and make sure the mosfet can actually switch the load off. Write a simple program that just writes the gate pin low, and make sure the LED/heating resistor is off. If the LED/heating resistor is still on the mosfet is bad or the microcontroller's output pin is burnt out.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: December 28, 2015, 11:01:35 pm
content: Potomac reported that the Pin 3 PWM does fade an LED properly when connected directly, so it's not that.I think the mosfet is probably shorted.

author: Potomac
author_rank: Regular Contributor
timestamp: December 28, 2015, 11:27:20 pm
content: Should the prongs of a MOSFET and other IC's always be stored in foam? (Or a metal electrostatic bag?)

author: aaronwiz
author_rank: Contributor
timestamp: December 28, 2015, 11:32:56 pm
content: Quote from: Potomac on December 28, 2015, 11:27:20 pmIt is good practice, but it really is not that important especially with modern ICs and MOSFETS. In fact, most devices have built in protection diodes to protect against ESD.

author: Richard Crowley
author_rank: Super Contributor
timestamp: December 28, 2015, 11:35:05 pm
content: Quote from: Potomac on December 28, 2015, 11:27:20 pmAll semiconductors can be damaged by electro-static discharge (ESD).Semiconductors with very high input impedances (like a FET) are particularly vulnerable.It is pretty easy to zap something like a FET if you do not take proper precautions at EVERY step.SOME FETs have built-in ESD protection. But you can still zap them without even knowing it.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: December 29, 2015, 12:23:29 am
content: Here's a tip. For mosfets in the TO-220 package, the pins are wider than is good for the breadboard sockets. So I take a fine pair of pliers and "rotate" them 90 degrees so that they are edge-on when looking at the face of the mosfet. Then they will fit into the breadboard sockets better. See the photo below.I also fooled around with Potomac's Fritzing file to make the layout "prettier".

author: alsetalokin4017
author_rank: Super Contributor
timestamp: December 29, 2015, 12:40:25 am
content: This video may be of use.Quick and dirty Mosfet Testing using the Diode Check function of the Fluke 83 DMM:

author: Potomac
author_rank: Regular Contributor
timestamp: December 29, 2015, 12:41:24 am
content: ^ You guys are the best.Special thanks for that Fritz diagram. Very helpful. I'll study it so I can get a more intuitive sense for next time I have to use a MOSFET

author: Potomac
author_rank: Regular Contributor
timestamp: December 29, 2015, 12:43:21 am
content: And will test out that MOSFET to see if it's shorted with that video

author: Potomac
author_rank: Regular Contributor
timestamp: December 29, 2015, 02:50:57 am
content: Argh, I followed that perfect circuit design from alsetalokin but I think all my MOSFETs are messed up. I tried a 2nd one and it didn't work either. Only thing i can think of.Only thing I did different was use 270 Ohm resistors in place of the 220 and 100 Ohm resistors in Alsetalokin's circuit. They were the closest values I had on hand to 220 and 100Even tried with a LED for visual indication. Nothing.Attached pictures

author: KL27x
author_rank: Super Contributor
timestamp: December 29, 2015, 05:17:27 am
content: FYI, easy way to test a logic level FET out of circuit for a quick sanity check:Diode check puts out ~3V on the positive lead of your DMM. So turn the DMM to diode check and put the positive lead on the gate, negative lead on the source to switch the [NFET/PFET] [on/off]. Then switch the DMM to continuity test or ohm meter, and put the leads on the source and drain to verify that is [on/off] as expected.Now switch the DMM back to diode check and put the negative probe on the gate, positive probe on the source. Use the continuity/ohm test on the drain-source to verify that it has turned [off/on].

author: alsetalokin4017
author_rank: Super Contributor
timestamp: December 29, 2015, 05:28:21 pm
content: Quote from: Potomac on December 29, 2015, 02:50:57 amWell, that may be easy to fix. Note that your actual breadboard might have the power busses broken into left and right halves. See the breaks in the Red and Blue lines just up and to the left of your mosfet? Bridge those gaps with jumpers and let's see what happens. (Actually you only need to bridge the negative (blue) rail for your particular circuit, but do them both for completeness sake anyhow. See the image below.)Also make sure you have the LED the right way around, with Cathode to the mosfet Drain and Anode to the resistor>positive rail.Also, resistors can be used in parallel. If you put 2, 270 ohm resistors in parallel you get 135 ohms. But in your case it probably doesn't matter, the 270R for the mosfet gate series resistor will still work OK, and the 270 ohm for the LED current-limiting resistor will just make the LED a little bit dimmer.To confirm, I just tried it on my breadboard with a 330 ohm series gate resistor, 100k gate pulldown, and a bog-standard IRF530n mosfet and it still works fine.Although with a 530n mosfet, I'd suggest using a heatsink on the mosfet if you are using a heavier load like a light bulb or a low-resistance heating resistor, as the 530n mosfet will dissipate some power in its internal Rdss resistance under these conditions of low gate voltage and higher current draw. With the IRF3205 I didn't need a heatsink since it has such a low Rdss and it works fine with about 5V at the gate at these slow switching speeds.ETA: When using the heating resistor as the load, don't use the 220 (or 270) ohm current-limiting resistor, this is just for the LED. Remove it and put a jumper there instead.You can use another PWM output line from the Arduino , with its own LED+resistor, to monitor the state of the circuit if you want. Just add the appropriate statements in your sketch code for another PWM pin. And you won't need a separate switching transistor, you can just run the monitor LED+resistor directly from the second PWM output pin.Or, if you need to know the actual state of the mosfet switching the heating load, you can put an LED+resistor in parallel with the heater resistor load.By now it should be easy to wire it up and program it!(ETA2: I see in the Fritzing program, the breadboard type "full" has the power rails split into left and right halves like your breadboard (but doesn't have the red and blue lines.) The breadboard type "full+" has the power rails continuous all the way across and has the red and blue lines. I have both types of breadboards on my bench, and this gave me fits too when I first used one with the split L and R rails.)

author: Potomac
author_rank: Regular Contributor
timestamp: December 29, 2015, 07:03:10 pm
content: OK just got finished doing a full set of MOSFET tests. All of them actually seem to have passed.(Just saw your message from earlier this morning, alsetalokin4017. Will read that suggestion next about the wiring)Anyways, I think this rules out the MOSFET's. They all seem to be fine.See attached picture. I did a side-by-side showing the DMM settings I used and the results I got with alsetalokin's step by step video. I wrote out all the instructions and showed the data I got. Results were very consistent. These things must have good ESD protection because I've been storing them in a small plastic box and have not been handling them with kid gloves during the tests.

author: Potomac
author_rank: Regular Contributor
timestamp: December 29, 2015, 07:06:38 pm
content: Just to keep the train of thought clear for future viewers, here's a link again to alsetalokin's helpful video. The diode test at the 2:38 mark seems to be the critical one. Compare to my data in the attached picture in my previous post.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: December 29, 2015, 07:27:15 pm
content: Your results are showing that your mosfets are not shorted, at least.The 200 ohm resistance setting isn't using enough voltage to overcome the diode's forward voltage drop, so that's why you are getting a different result (and is also why I use the diode check function rather than the ohmmeter in my suggested testing.)Install the power-rail jumpers to connect the left and right halves of your breadboard's power rails, and eliminate the 270R LED current-limiting resistor (or just put a jumper in parallel to it to "short it") if you are using the Heating Resistor as load, and you should see your system working.

author: Potomac
author_rank: Regular Contributor
timestamp: December 29, 2015, 07:44:38 pm
content: It works! All I did was bridge the gaps as you suggested

author: Potomac
author_rank: Regular Contributor
timestamp: December 29, 2015, 07:47:58 pm
content: Here's the videoSketchint heaterPin = 3; // heating resistor connected to digital pin 3void setup() {pinMode(heaterPin, OUTPUT);}void loop() {for (int fadeValue = 0 ; fadeValue <= 255; fadeValue += 5) {analogWrite(heaterPin, fadeValue);delay(100);}for (int fadeValue = 255 ; fadeValue >= 0; fadeValue -= 5) {analogWrite(heaterPin, fadeValue);delay(100);}}

author: alsetalokin4017
author_rank: Super Contributor
timestamp: December 29, 2015, 08:30:17 pm
content: Also, the Heating Resistor will have "thermal inertia" and may stay hot for a while even when it's not receiving power from the PWM/Mosfet circuit. DMMs do a pretty good job of averaging voltage from a PWM circuit, so you could hook your DMM in voltmeter mode across the power resistor, and it should show you the resulting voltage steps as the PWM feeds the resistor. You may need to play around with the delay() statements in your code.Hey... you could try this. Connect a potentiometer to one of the Analog input pins and use an analogRead() statement to control the delays!Connect the two ends of the pot to +5 and Ground on the analog side of the Arduino and connect the wiper to A0. It doesn't matter what the pot value is, but 10k, 50k or 100k are good choices.Then put a statement at the top of your loop() (or in each of the "for" loops) like this:int PotDelay = analogRead(A0);Then for each delay() statement in the PWM increment and decrement , instead of putting in a number of milliseconds like delay(100), usedelay(PotDelay);and then the potentiometer setting will give you a delay from 0 to 1023 milliseconds each time the code hits the delay() statement.

author: Potomac
author_rank: Regular Contributor
timestamp: December 29, 2015, 08:32:05 pm
content: Ok one more question alsetalokin. I feel like I'm getting close to nailing this breadboard down and being able to play with PID code.My question is this. I've gotten the LED to work great with the MOSFET circuit and PWM code. But when I replace it with the heating resistor, nothing happens.I thought this was due to the PWM code and not allowing the heating resistor enough time to heat up. So I gave it an even simpler code of just putting pin 3 to high for 1,000,000 MS (17 mins). Resistor does not heat up. Then you plug the LED back in and it stays lit.Is this due to the big 270 Ohm (non-heating) resistors I put on the board? Too much resistance on the current before it's fed into the heating resistor?See picture attachedCode I used// the setup function runs once when you press reset or power the boardvoid setup() {pinMode(3, OUTPUT);}void loop() {digitalWrite(3, HIGH); // turn the LED on (HIGH is the voltage level)delay(1000000); // wait for a seconddigitalWrite(3, LOW); // turn the LED off by making the voltage LOWdelay(1000); // wait for a second}

author: alsetalokin4017
author_rank: Super Contributor
timestamp: December 29, 2015, 08:35:11 pm
content: Quote from: Potomac on December 29, 2015, 07:44:38 pmCool!But now you have 2 series resistors for your LED: one on the breadboard and one soldered to the LED itself, so your LED will be a lot dimmer than it could be...

author: alsetalokin4017
author_rank: Super Contributor
timestamp: December 29, 2015, 08:51:08 pm
content: Quote from: Potomac on December 29, 2015, 08:32:05 pmYes, as I mentioned earlier the resistor on the board is a _current limiting_ resistor for the LED. Don't use it for the Heating Resistor! Look at the Fritzing sketch I posted up above (Heating Resistor3) and you'll see how to put the HR in parallel with the LED+CLResistor, so that the current through the HR isn't limited by the LED's resistor.The power dissipated in a resistor is P=I2R, so it's easy to see that the power dissipated in your 270 ohm resistor is more than ten times the power dissipated in the 20 ohm heating resistor, if you keep the 270 ohms in series with the HR. The current through the 270+20 ohms, if you are using the 4.5 volt supply, and neglecting the Mosfet's resistance, is I = V/R or 4.5/290 = about 15 mA. So the 20 ohm HR will only be dissipating I2R, or (0.015)2x20 = a bit over 4 mW, and the 270 ohm resistor is dissipating about 61 mW !! (if I did the math right...)If you don't use the current-limiting resistor in series with the HR, then you should have I = V/R or 4.5/20 = 0.225 A, and the HR should be dissipating (0.225)2x20= a bit over 1 Watt. (Again neglecting the mosfet's on-state resistance, and assuming 100 percent ON from the PWM.) You should be able to feel this with your fingers, I should think. But for real heating, I'd use a higher supply voltage for the HR.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: December 29, 2015, 09:10:40 pm
content: Now... I have to wonder why you are using the Caddock 1% resistor if all you are using it for is a PID-controlled heater. An ordinary wire-wound "cement" power resistor would be more suitable, I should think, and would allow you to use more power. And would be cheaper too!Even if you are going for a very precise heating control, the PID system should take care of that, even if you use a normal 5% or 10% tolerance cement power resistor.

author: Potomac
author_rank: Regular Contributor
timestamp: December 30, 2015, 01:25:02 am
content: I got that circuit up and running. Works well. The parallel LED indicator is great.What did you have in mind to use the 2nd LED for?See picswill post more once I get working on PID