Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

arduino uno number 6 only 6)Connect a thermistor as shown in part 1 below. Write

ID: 2248305 • Letter: A

Question

arduino uno number 6 only

6)Connect a thermistor as shown in part 1 below. Write a program to read the ADC channel connected to the thermistor and print the RAW ADC value to the terminal program.(To be done at home as part of the prelab. Demo at lab start) Lab 2 - Lab Portion Components - 1x Thermistor circuit) -1 x 10 k resistor (for the thermistor 1x LED 1x 220 resistors (for the LED) A thermistor is a device whose resistance changes with the temperature applied to it, and your kit contains a small black bcad with two pins. In order to read the temperature applied to the thermistor, we use the Steinhart-Hart equation -this equation is used to find the resistance of a semiconductor at a temperature and the Arduino implementation is included further on Objectives Part I Write a program that implements a programmable temperature sensor a. The program should use the thermistor to detect a temperature value b. The schematic for wiring the thermistor is included below 5V ANALOG (AB) THERMISTOR GND

Explanation / Answer

for arduino

#include <LiquidCrystal.h>
#include <math.h>
LiquidCrystal LCD(12, 11, 5, 4, 3, 2); //lcd connection

double ThermistorC(int RawADC) {
double Temp;
Temp = log(10000.0*((1024.0/RawADC-1)));
Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp ); //
Temp = Temp - 273.15;        
return Temp;
}

void setup()
{
Serial.begin(9600);
LCD.begin(16,2);
LCD.setCursor(0,0);
LCD.print("TEMP SENSOR");
}

void loop() {           
int valC;              
double tempC;             
valC=analogRead(0);    
tempC=ThermistorC(valC);
tempC=tempC+6.5; //error correction
LCD.setCursor(0,1);
LCD.print(tempC);
LCD.print(" celcius");
Serial.print("Temperature = ");
Serial.print(tempC);
Serial.println(" C");
delay(1000);          
}