Pages: [1]   Go Down
Author Topic: -=SOLVED=- Thermistor  (Read 1710 times)
0 Members and 1 Guest are viewing this topic.
Bergen, Norway
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Just4fun
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is the termistor supposed to get really hot? Or is my wiring screwed up?


« Last Edit: March 03, 2011, 05:08:06 am by Wracul » Logged

Montreal
Offline Offline
Edison Member
*
Karma: 23
Posts: 2483
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

it should be  embient temperature.
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6886
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you have a picture of your termistor's wiring?
Logged


Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 5519
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Being a bit of a grammar nazi here, but in the interest of helping non-english speakers:

thermister, ambient

 smiley

BTW - your thermistor should -not- be heating up - as liudr noted, a pic or schematic would help...
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6886
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks cr0sh. There exist applications of heating up thermistors with large current and we couldn't tell until the OP shares more info. If you want to tell liquid level, you can use the liquid as heat sink and apply larger current on the thermistors so only those ones in the liquid will stay cool and have large resistance. The ones outside liquid are hot and less resistive.
Logged


Bergen, Norway
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Just4fun
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It looks like its the amplifier that gives out the heat and not the thermistor it self. bought it from ebay.
http://cgi.ebay.com/Analog-Temperature-Sensor-Module-Arduino-Shield-/270669450328

Im using the The Elaborate Code from the playground.
http://www.arduino.cc/playground/ComponentLib/Thermistor2

The sensor is giving 60deg C at about 20deg C?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16459
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
It looks like its the amplifier that gives out the heat and not the thermistor it self. bought it from ebay.


That's not good either. It looks like a simple opamp and no way should it be getting hot. Are you sure you wired it correctly and not reversed the power and ground leads?

Lefty

Logged

Bergen, Norway
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Just4fun
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Probably think you are right about the wiring. As seen on the picture the wiring described on the board does not work at all. Even my arduino board lost connection to my computer wired like that. turning the pins the other way around gives me 60deg C. Adding heat or cold gives me minor differences on the reading. Have tryed all 6 combos on the wiring with no luck at all. ( probably fried the whole thing.  smiley-roll )

Im not so familiar with electronics so maybe this will give you an idea how its supposed to be connected.

here is my sensor

 

heres the amplifier on the board.




Karl
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6886
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

From the picture, top pin is signal, middle is 5V and bottom is ground. How did you wire it when it reads 60DegC?
Logged


Bergen, Norway
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Just4fun
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

it shows 60deg C as wired oposite on the picture. amlifier gets super hot when i do this.

changing the acc and ground give me -11 and normal temp on amplifier.

As mentioned earlyer, connecting it like on the picture make the arduino loose connection with the pc. and the amplifier gets super hot.


have no idea whats wrong. its shurely the wiring
« Last Edit: February 20, 2011, 04:53:02 pm by Wracul » Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6886
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, maybe your code is wrong reporting -11DegC. Care to share your code for a diagnostic?
Logged


Bergen, Norway
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Just4fun
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Posted by: liudr
Well, maybe your code is wrong reporting -11DegC. Care to share your code for a diagnostic?
I think you are correct. Thats the only thing that makes sense to me. The thermistor gives steady signals that behave normal when exposed too heat or cold.

I have fiddled around with two codes from the playground.

The easy one
Code:
#include <math.h>

double Thermister(int RawADC) {
 double Temp;
 Temp = log(((10240000/RawADC) - 10000));
 Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp );
 Temp = Temp - 273.15;            // Convert Kelvin to Celcius
 Temp = (Temp * 9.0)/ 5.0 + 32.0; // Convert Celcius to Fahrenheit
 return Temp;
}

void setup() {
 Serial.begin(115200);
}

void loop() {
 Serial.println(int(Thermister(analogRead(0))));  // display Fahrenheit
 delay(100);
}




The Elaborate Code
Code:
#include <math.h>

#define ThermistorPIN 0                 // Analog Pin 0

float vcc = 4.91;                       // only used for display purposes, if used
                                        // set to the measured Vcc.
float pad = 9850;                       // balance/pad resistor value, set this to
                                        // the measured resistance of your pad resistor
float thermr = 10000;                   // thermistor nominal resistance

float Thermistor(int RawADC) {
  long Resistance; 
  float Temp;  // Dual-Purpose variable to save space.

  Resistance=((1024 * thermr / RawADC) - pad);
  Temp = log(Resistance); // Saving the Log(resistance) so not to calculate  it 4 times later
  Temp = 1 / (0.001129148 + (0.000234125 * Temp) + (0.0000000876741 * Temp * Temp * Temp));
  Temp = Temp - 273.15;  // Convert Kelvin to Celsius                     

  // BEGIN- Remove these lines for the function not to display anything
  //Serial.print("ADC: ");
  //Serial.print(RawADC);
  //Serial.print("/1024");                           // Print out RAW ADC Number
  //Serial.print(", vcc: ");
  //Serial.print(vcc,2);
  //Serial.print(", pad: ");
  //Serial.print(pad/1000,3);
  //Serial.print(" Kohms, Volts: ");
  //Serial.print(((RawADC*vcc)/1024.0),3);   
  //Serial.print(", Resistance: ");
  //Serial.print(Resistance);
  //Serial.print(" ohms, ");
  // END- Remove these lines for the function not to display anything

  // Uncomment this line for the function to return Fahrenheit instead.
  //temp = (Temp * 9.0)/ 5.0 + 32.0;                  // Convert to Fahrenheit
  return Temp;                                      // Return the Temperature
}

void setup() {
  Serial.begin(115200);
}

void loop() {
  float temp;
  temp=Thermistor(analogRead(ThermistorPIN));       // read ADC and  convert it to Celsius
  Serial.print("Celsius: ");
  Serial.print(temp,1);                             // display Celsius
  //temp = (temp * 9.0)/ 5.0 + 32.0;                  // converts to  Fahrenheit
  //Serial.print(", Fahrenheit: ");
  //Serial.print(temp,1);                             // display  Fahrenheit
  Serial.println("");                                   
  delay(5000);                                      // Delay a bit...
}


Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That code is not intended for generic use, I believe it is intended for use with 10k thermistors.

This code is the steinhart-hart equation:

Code:
Temp = 1 / (0.001129148 + (0.000234125 * Temp) + (0.0000000876741 * Temp * Temp * Temp));

Which converts the analog reading to "Kelvins". The line underneath that then converts Kelvins to Celsius.

For your thermistor to work correctly, it will need to be calibrated. That is, you need to calculate your own 3 constants (the numeric values) for the equation to work for your thermistor.
Logged

Bergen, Norway
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Just4fun
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wiring was messed up. Calibration using math solved the issue!
Thanks for all of the help i got!
Logged

Pages: [1]   Go Up
Jump to: