NTC fan speed control(+Arduino)

Thread Starter

StellWalker

Joined Dec 12, 2016
7
Hi. I want to make temperature controlled fan circuit and read the value of temperature using Arduino(serial monitor).
.I made this circuit but it doesn't work with arduino correctly. I have connected NTC to Arduino like this
. What can I do to fix this?
 

bertus

Joined Apr 5, 2008
22,270
Hello,

The pictures posted at ibb do not show.
Please upload the pictures to the forum using the "Upload a File" button below the posting window.

Bertus
 

Reloadron

Joined Jan 15, 2015
7,501
What is the Arduino reading? You have 5 VDC applied across your temperature sensor in series with a 10K Ohm resistor. What temp sensor are you using (data sheet) and what code are you using (post the code). Finally what is the Arduino reading for A0 the analog in you are using?

<EDIT> Changed 1 Kohm to read 10 K ohm (Brown Black Orange) resistor. </EDIT>

Ron
 
Last edited:

Alec_t

Joined Sep 17, 2013
14,280
If the circuit is exactly as per your schematic, then with 12V at the top of R2 and a thermistor having a resistance of ~ 4.7k you will get nearly 10V across the thermistor! Your breadboard layout seems inconsistent with the schematic.
 

Thread Starter

StellWalker

Joined Dec 12, 2016
7
#include <math.h>

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

double Thermistor(int analog_read)
{
double temperature;
temperature = log(((10240000 / analog_read) - 10000));
temperature = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * temperature * temperature )) * temperature );
temperature = temperature - 273.15;
return temperature;
}

void loop()
{
int value;
double temperature;
value = analogRead(A0);
temperature = Thermistor(value);
Serial.println(temperature);
delay(500);
}
 

Attachments

Reloadron

Joined Jan 15, 2015
7,501
If you want to read the Arduino you want to try the Circuit for the Steinhart-Hart Method as it is presented in the link. Make sure you are using a 10K NTC sensor as described. I would start simple using this sketch:
Code:
#include <Thermistor.h>
Thermistor temp(0);
void setup() {
Serial.begin(9600);
}
void loop() {
int temperature = temp.getTemp();
Serial.print("The sensor temperature is: ");
Serial.print(temperature);
Serial.println("*C");
delay(1000);
}
Your code looks like you are trying to use the Beta Factor method? That is also covered in the link. In one circuit you have a circuit controlling fan speed based on temperature measured using a 10K NTC Thermistor and in another you seem to be trying to read an actual temperature using an Arduino?

Ron
 

Thread Starter

StellWalker

Joined Dec 12, 2016
7
If you want to read the Arduino you want to try the Circuit for the Steinhart-Hart Method as it is presented in the link. Make sure you are using a 10K NTC sensor as described. I would start simple using this sketch:
Code:
#include <Thermistor.h>
Thermistor temp(0);
void setup() {
Serial.begin(9600);
}
void loop() {
int temperature = temp.getTemp();
Serial.print("The sensor temperature is: ");
Serial.print(temperature);
Serial.println("*C");
delay(1000);
}
Your code looks like you are trying to use the Beta Factor method? That is also covered in the link. In one circuit you have a circuit controlling fan speed based on temperature measured using a 10K NTC Thermistor and in another you seem to be trying to read an actual temperature using an Arduino?

Ron
No. I have one circuit. I want to use arduino with this circuit.
 

AnalogKid

Joined Aug 1, 2013
10,986
If you swap the positions of R5 and RT2, then the only connections needed to the arduino are the top of the thermistor to the A/D input, and GND.

Also, why do you think you need R5 in there at all?

ak
 

Reloadron

Joined Jan 15, 2015
7,501
No. I have one circuit. I want to use arduino with this circuit.
I suggested you try the Arduino using the circuit shown with the 10K resistor and 10K Thermistor in a divider configuration with 5 Volts applied.
Thermistor.png

The Arduino Analog In will convert the analog voltage from the divider or any analog voltage of between 0 and 5 Volts to bits and in this case 0 to 5 Volts equal between 0 and 1023 bits.

You also need to read what Analog posted regarding Thermistors as they are extremely a non linear temperature sensing device. That said then you need to understand how analog input bits are converted to an engineering unit be it temperature, pressure, flow or any other engineering unit. You can't just take your existing circuit and add an Arduino to it.

I suggest you read and understand The Simple Code, The Elaborate Code and The Elaborate Code Cleaned Up a Bit. There is quite a bit to all of this and you can't arbitrarily feed a signal into an Arduino and expect results with an understanding of how all of this works.

Ron
 

shteii01

Joined Feb 19, 2010
4,644
Problem 1.
741 op amp.
Generally speaking 741 needs +/- 15 volts (30 volts total). You are providing 741 with dinky 12 volts.
 

shteii01

Joined Feb 19, 2010
4,644
TI datasheet says minimum of +/- 10 volts to power 741. That is total of 20 volts. So. I would say your 741 is not working and your circuit is not working.
 

Attachments

Last edited:

AnalogKid

Joined Aug 1, 2013
10,986
The 741 datasheet says the minimum *recommended* operating voltage is +/-10 V. However, the part will operate just fine down to the point that the input common mode range and output voltage swing range no longer have any operating room. This is somewhere below +/-5 V. Into a medium impedance load such as 10K, a 741 runs just fine on a single 9 V battery as long as you don't need a large output voltage amplitude.

ak
 
Top