I am using the attached circuit to heat up the 3D printer bed. The thermistor(25W 5.6 ohm) is attached to the bottom of the bed with thermal paste. I am PWMing the pin 3 of the nano. The problem is that the MOSFET IRFZ34N is getting too hot too fast. I tried at reducing the resistor from 10K to 100 Ohm. But that didnt make a difference. The test code I used is here. It sends sine wave:
#define fadePin 3
void setup(){
pinMode(fadePin, OUTPUT);
}
void loop(){
for(int i = 0; i<360; i++){
float rad = DEG_TO_RAD * i;
int sinOut = constrain((sin(rad) * 128) + 128, 0, 255);
analogWrite(fadePin, sinOut);
delay(150); //tried various delays from 50 to 250 ... all give the same hot MOSFET
}
Thanks guys. Not being an electrically gifted individual (obviously), I had no idea what a logic level MOSFET is. Also the sine wave code is something I found out on one of the forums that was used to demo a bulb going dim and bright slowly.
So in essence all I need to do is replace the MOSFET I am using with a logic level MOSFET?
The datasheet for a logic-level MOSFET usually says "logic level" near the top.
The key specification is the value of Vgs quoted in the on-resistance section. Something
like "Rds(on) at Vgs=4.5V: 0.03 ohms" means it is designed for 5V operation. If it
only says Vgs=10V, its a 12V MOSFET. 4.5V represents the worst case for a 5V supply
10V represents the worst case for a 12V SLA battery, which is why those values are typically
seen.
Normally the on-voltage will be about 3 times the threshold voltage (being the point the device
switches fully off). In between those two the device can be half-on, meaning it may dissipate
lots of power and get very hot - the region of operation you want to avoid.
Finally the FQP30N06L got delivered. Unfortunately, when I slotted in the new logic level MOSFET into my circuit (attached in my original question), I just matched the GDS pins, now the MOSFET still gets hot but the thermistor doesnt get hot at all. With the previous MOSFET, both the MOSFET and thermistor got hot.
Do I need to do any modifications when using the logic level MOSFET?
Attached is the new circuit (just a variation to my prev, this time using a pot). I read serial values and can see that the pot is working. At low readings on A0 (like 0 to 150), the MOSFET does not get that hot and the thermistor gets warmish. Higher values, both get hot, though the MOSFET gets hotter than the thermistor. Here is the code,
int inputPin = A0; // set input pin for the potentiometer
int inputValue = 0; // potentiometer input variable
int ledPin = 3; // set output pin for the LED
int prevInputvalue=1;
void setup() {
// declare the ledPin as an OUTPUT:
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
}
void loop() {
// read the value from the potentiometer:
inputValue = analogRead(inputPin);
if(inputValue!=prevInputvalue) {
Serial.println(inputValue);
prevInputvalue=inputValue;
}
// send the square wave signal to the LED:
analogWrite(ledPin, inputValue/4);
}
Shouldn't the source go to ground with the load from V+ to drain? The gate resitor is way too high. 10K will result in slower turn on and more heat. A better choice would be more like 180-220 ohms, high enough to limit current but low enough to charge the input capacitance quickly as possible. Use the 10K from gate to ground to keep the MOSFET off when the input is floating during reset.
Looks good except that the gate can float (indeterminate voltage) during setup() until pin 3 is made an OUTPUT. So the heater can be on during reset until the pin 3 pinMode is executed in setup(). If that is a problem, a 10K. pulldown resistor from gate to ground will keep the MOSFET off during reset.
Ok, this works ... almost. The MOSFET isnt geting hot anymore. But the thermistor isnt turning off. I did connect a 10K from the gate to the ground. What I noticed is that when i disconnect the 19V supply, the serial monitor shows a steady 0 from the pot (read from A0). But when I connect the 19V, the values start floating wildly, and thats probably why the thermistor started smoking (before I unplugged). I measured a 2.85Amp current going through the thermistor. Any suggestions?
A thermistor is a type of variable resistor used to measure temperature. Please point out what you are calling a thermistor on your diagram. If you mean that the power resistor (heater) is not turning off, double check your wiring and the pinout of your MOSFET. The behavior that you describe sounds like what jremington mentioned in reply #7.
OK. Currently sporting a red face. You guys are awsome. Yes I did wire it assuming that all MOSFETs are wired as GSD. My MOSFET is GDS.
And yes, I do mean a power resistor (heater). NOT a thermistor.
I've never met a MOSFET that wasn't GDS - the drain is the substrate of the chip which means it must
be physically connected to the tab, and the middle pin is an extension of the tab in all the packages I've
ever seen.
Any vertical current flow device will have the underside of the substrate direct to the tab. Power
MOSFETs/IGBTs these days are all vertical current flow. As are SCRs and Triacs, so you'll see similar
rules for pinouts for those.