Go Down

Topic: Need help with mosfet not sending power to heat pad (Read 1 time) previous topic - next topic

AmishP

The you need a MUCH bigger battery.  Your pad takes 3 watts ( 5 x 0.6).

A good 18650 Li cell  stores about 8 watt - hours, so would power the pad for > 2 hours with a suitable boost convertor.

How long do you want to heat the pad for?

Allan
2 hours sounds suffiecent because i will be turning it on and off so it will be off most of the time. Sessions the heat are on are on for 10 minutes

AmishP

A pair of LiPo batteries + 2A buck converter to bring the output to 5V. Or a 5V powerbank, one that can supply 2A.

In short: a proper battery.
Okay so with the other battery i would conenct that to the positive terminal of the heat pad and the negative goes to the gate right?

avr_fred

No, the gate is the on/off input and is connected to your Arduino control pin with a 100 ohm resistor in series. The non-battery side of the heading pad is connected to the drain, source is grounded.

GoForSmoke

Can you explain the part where I use a separate power source to heat up the heat pad, because again I want to be able to controll it with my HC-06
You don't want to put much current through the Arduino so the Arduino controls the FET gate only. The FET is a switch that allows lots more current (not all FETs, check the datasheet, 2N7777 TTL-level FET is 250mA max, always check before buy) to flow through and THAT should not come through the Arduino board but straight from a power supply.

The Arduino regulator will get very hot if you draw too much current through it. It takes current flow to make heat, you can spot weld sheet metal with amps of 5V.

Will the heating pad take 6V or 4.5V? That's 4 or 3 AAA's. Could you use mains power to demonstrate operation? You can get 5V supplies in 60W or higher, that's 5V x 12A = 60W but you don't want to push maximums --- if you need 12A continuous, get 20A max and the switching PS will last for years. Enough batteries should work but will run down.
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

surbyte

@allanhurst please don't cross post threads.
Threads merged

allanhurst


AmishP

You don't want to put much current through the Arduino so the Arduino controls the FET gate only. The FET is a switch that allows lots more current (not all FETs, check the datasheet, 2N7777 TTL-level FET is 250mA max, always check before buy) to flow through and THAT should not come through the Arduino board but straight from a power supply.

The Arduino regulator will get very hot if you draw too much current through it. It takes current flow to make heat, you can spot weld sheet metal with amps of 5V.

Will the heating pad take 6V or 4.5V? That's 4 or 3 AAA's. Could you use mains power to demonstrate operation? You can get 5V supplies in 60W or higher, that's 5V x 12A = 60W but you don't want to push maximums --- if you need 12A continuous, get 20A max and the switching PS will last for years. Enough batteries should work but will run down.
Sorry for the late reply, I have been doing research. So i can use 4 triple A batteries and then just a resistor at the end to reduce it to 5V. Furthermore, is there no way I can use the mosfet I have right now?

ted

Start from this,gate resistor 10k, LED resistor 500 ohm,  3  batteries 1.5V


AmishP

Start from this,gate resistor 10k, LED resistor 500 ohm,  3  batteries 1.5V


Okay ill try that and get back to you

AmishP

Hey! so iv been having a problem where when I use a USB connected to my laptop, my Temperature in serial monitor is fine but when I use a 9v battery, the temperature starts to spike randomly which messes my code up because It depends on the temperature sensor being right.

Temperature Sensor = TMP36


Code: [Select]
/*
Bio Innovation Project
Heat Pad Made For Tendinitis In the Knee
By: Amish 
*/

int led1 = 4; //green led is digital pin 4
int led2 = 5; //red led is digital pin 5
int fet = 3;  //mosfet is digital pin 3
const int HeatOn = 255; // heat pad turns on at 100%
const int HeatOff = 0; //heat pad turns off
int val; //Create an integer variable
int OverTemp = 184; // Heat Pad is over recommended temp = 40 degress C

void setup()
{
  pinMode(fet, OUTPUT); //mosfet digital pin is OUTPUT
  pinMode(led1, OUTPUT);//led1 digital pin is OUTPUT
  pinMode(led2, OUTPUT);//led2 digital pin is OUTPUT
  Serial.begin(9600); //start serial
  digitalWrite(led2, HIGH); //turn the red led on
  }
 
void loop()
{
////////////////////// Showing Voltage and Celcius in Serial Monitor //////////////////////
val=analogRead(0);      //Read the analog port 0 and store the value in val
  delay(1000);            //Wait one second before we do it again
 
float voltage = val * 5.0 / 1024;  // converting val's reading to voltage

// print out the temperature
float temperatureC = (voltage - 0.5) * 100 ; //converting from 10 mv per degree wit 500 mV offset
//to degrees ((volatge - 500mV) times 100)
Serial.print(temperatureC); Serial.println(" degress C");
delay(1000);
 
///////////////////// Bluetooth Wireless /////////////////////
int blthState = Serial.read(); // Reads the data from the serial port

/////////////////// 100% HEAT ////////////////
 if (blthState == '0') {
  digitalWrite(led1, LOW);// Turn LED OFF
  digitalWrite(led2, HIGH); // Turn LED ON
  analogWrite(fet, HeatOff); //Turn Heat Pad Off
  Serial.println("Heat Pad: OFF");
  blthState = 0; //change blthState back to 0
 }
 else if (blthState == '1') {
  digitalWrite(led1, HIGH);//Turn LED ON
  digitalWrite(led2, LOW); //Turn LED OFF
  analogWrite(fet, HeatOff); //Turn Heat Pad Off
  Serial.println("Heat Pad: ON");
  blthState = 0; //turn blthState back to 0

}
//------------\\ Saftey System //-----------//
  if (val >= OverTemp) { //if temperature is over 40 degrees Ceclius
      digitalWrite(led1, LOW);
      Serial.println("Heat Pad: OVERHEATING");
      delay(1000); //delay for 1 second
       analogWrite(fet, HeatOff); //Turn Heat Pad Off
        digitalWrite(led2, LOW);
        delay(1000);
        digitalWrite(led2, HIGH);
        delay(1000);
        digitalWrite(led2, LOW);
        delay(1000);
        digitalWrite(led2, HIGH);
        delay(1000);
        digitalWrite(led2, LOW);
        delay(1000);
        digitalWrite(led2, HIGH);
        delay(1000);
        digitalWrite(led2, LOW);
        delay(1000);
        digitalWrite(led2, HIGH);
        delay(1000);
      digitalWrite(led2, LOW);
        delay(1000);
        digitalWrite(led2, HIGH);
        delay(1000);
      //tell the red led to blink 10 times when the temperature is overheating
    blthState= 0;
  }
     
}

wvmarle

Please post complete circuit diagram.

For these sensors you can generally get much better results (stability, resolution) by using the internal 1.1V reference.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Wawa

Same project here.

https://forum.arduino.cc/index.php?topic=547471.0

OP did already have a cross-post warning.
Leo..

outsider

Which Arduino, where does the heatpad power come from?

jremington

9V block batteries are intended for smoke alarms, and will run an Arduino alone for just a few minutes.

If it has to power anything else, expect rapid failures.

Coding Badly


Go Up