Go Down

Topic: Thermistor shield from arduino-direct (Read 1 time) previous topic - next topic

el_pablo

Hello,

I'm a software developer, but I'm also a total newbie in electronic. I've bought the thermistor shield from arduino-direct. When I try to read the value, I always get 142 ±1. Nothing happens even when I try to heat the thermistor with my fingers.

Is there any tutorial using this shield?

Thank you

PaulS

Having posted several times now, you should be aware of the drill. Where is the link to the shield/device/whatever that is causing the problem? Where is the code that is not performing as intended?

el_pablo

Wasn't aware there was a way to post questions.

Where : http://arduino-direct.com/sunshop/index.php?l=product_detail&p=39
What : Thermistor 103 with a LM358 chip and some resistors.

Code :
Code: [Select]

int thermPin = A0;
float thermValue = 0;

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

void loop ()
{
  thermValue = analogRead (thermPin);
  Serial.println (thermValue);
  delay (1000);
}


el_pablo

I've found the code from a Chinese web site, but it still gives only 9 as a value.

http://translate.google.ca/translate?js=n&prev=_t&hl=fr&ie=UTF-8&layout=2&eotf=1&sl=auto&tl=en&u=http%3A%2F%2Fitem.taobao.com%2Fitem.htm%3Fid%3D6208909767&act=url


Code: [Select]

#include <math.h>

double Thermister (int RawADC) {
double Temp;
Temp = log (((10240000/RawADC) - 10000));
Temp = 1 / (0.001129148 + (0.000234125 * Temp) + (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 (A0)))); // display Fahrenheit
delay (100);
}



PaulS

Rather than all that complicated code, see if you are reading anything from the analog pin.

Code: [Select]
int thermPin = 0; // NOT A0 (A0 is a digital pin)

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

void loop()
{
  Serial.print("Analog pin reading: ");
  Serial.println(analogRead(thermPin));
  delay(100);
}


If you don't get different readings as the temperature changes, the problem is with the hardware. If you do get different readings, the problem is with the software.

el_pablo

I know it's been a while, but I didn't touch my arduino for a while.

I figured out that arduino-direct don't always follow wire color standards. After checking the PCB, I noticed that they flipped their cables color. The black wire is for signal and the white as the ground...

Now it works, I only need to converted the value to human readable.

Thanks

Bajdi

I have a bunch of bricks from arduino-direct, they are made by Flamingo EDA. Look on the underside of the printboard. Mine all have - + and S markings, so no problem to connect them...
www.bajdi.com

el_pablo

Hmmm... I have check all my bricks from them and I don't see the + - s markings. They might have add them lately.

Go Up