Dear all
Please, I need help
I want to use five Lm35 temperature sensors in my project because it is available for me.
here is the arduino program used and the fritzing sketch.
list of component
1- Arduino Uno
2- LM35 sensor * 05
3- Capacitor (100 nF) * 05
The results I obtained are very incoherent.
but The results obtained with one sensor are good and stables
Please, I need help.
===============================================================================
#define Ambient 0
#define Glass 1
#define Backsheet 2
#define Outlet 3
#define Room 4
#define Delay 100
const int cycles = 20;
void setup(){
Serial.begin(9600);
Serial.println("CLEARDATA");
Serial.println("LABEL,Temps,T_amb (C),T_glass (C),T_backsheet (C),T_outlet (C),T_room (C)");
}
void loop(){
float T_amb = 0.0;
float T_glass = 0.0;
float T_backsheet = 0.0;
float T_outlet = 0.0;
float T_room = 0.0;
for(int i = 0; i < cycles; i++){
int Ambient_Value = analogRead(Ambient);
int Glass_Value = analogRead(Glass);
int Backsheet_Value = analogRead(Backsheet);
int Outlet_Value = analogRead(Outlet);
int Room_Value = analogRead(Room);
float Temp_Ambient = (5.0 * 100.0 * Ambient_Value) / 1023;
float Temp_Glass = (5.0 * 100.0 * Glass_Value) / 1023;
float Temp_Backsheet = (5.0 * 100.0 * Backsheet_Value) / 1023;
float Temp_Outlet = (5.0 * 100.0 * Outlet_Value) / 1023;
float Temp_Room = (5.0 * 100.0 * Room_Value) / 1023;
T_amb += Temp_Ambient;
T_glass += Temp_Glass;
T_backsheet += Temp_Backsheet;
T_outlet += Temp_Outlet;
T_room += Temp_Room;
delay(Delay);
}
T_amb /= cycles;
T_glass /= cycles;
T_backsheet /= cycles;
T_outlet /= cycles;
T_room /= cycles;
Serial.print("DATA,TIME,");
Serial.print(T_amb);
Serial.print(" ");
Serial.print(T_glass);
Serial.print(" ");
Serial.print(T_backsheet);
Serial.print(" ");
Serial.print(T_outlet);
Serial.print(" ");
Serial.println(T_room);
}
===============================================================================