My Arduino based datalogging project
Ok. You got it quite messy. There are lot of lines what are not needed on your project.
Are all three sensors same Bosch temperature sensors what I used on my project?
I used this example for thermistor readings:
https://learn.adafruit.com/thermisto...g-a-thermistor
Might help understanding how it works.
Are all three sensors same Bosch temperature sensors what I used on my project?
I used this example for thermistor readings:
https://learn.adafruit.com/thermisto...g-a-thermistor
Might help understanding how it works.
Ok. You got it quite messy. There are lot of lines what are not needed on your project.
Are all three sensors same Bosch temperature sensors what I used on my project?
I used this example for thermistor readings:
https://learn.adafruit.com/thermisto...g-a-thermistor
Might help understanding how it works.
Are all three sensors same Bosch temperature sensors what I used on my project?
I used this example for thermistor readings:
https://learn.adafruit.com/thermisto...g-a-thermistor
Might help understanding how it works.
What you mean by this line: "float Ryla = 1055; // Pull up resistor value for analog input 1 (oil temperature)1191ohm vastaa 1055 arvoa" ?
I would suggest you to start from the beginning and copy the lines you really need on your project. First try go get all sensors to read correctly and print them to serial monitor on Arduino IDE.
After you get them work, then move to lcd.
From my code loop section this is all you can use in your project:
// Averaging thermistor measurement for better readings
uint8_t i;
float average;
// take 5 samples in a row, with a slight delay
for (i = 0; i < NUMSAMPLES; i++) {
samples = analogRead(1);
delay(10);
}
// average all the samples out
average = 0;
for (i = 0; i < NUMSAMPLES; i++) {
average += samples;
}
average /= NUMSAMPLES;
// Calculate temperature
R2 = R1 / (1023.0 / (float)average - 1.0);
logR2 = log(R2);
T = (1.0 / (A + B * logR2 + C * logR2 * logR2 * logR2));
Temp = T - 273.15;
}
You can use just simple delay function on loop to control update rate. With Racechrono update rate accuracy was quite crucial , but not on your project.
I would suggest you to start from the beginning and copy the lines you really need on your project. First try go get all sensors to read correctly and print them to serial monitor on Arduino IDE.
After you get them work, then move to lcd.
From my code loop section this is all you can use in your project:
// Averaging thermistor measurement for better readings
uint8_t i;
float average;
// take 5 samples in a row, with a slight delay
for (i = 0; i < NUMSAMPLES; i++) {
samples = analogRead(1);
delay(10);
}
// average all the samples out
average = 0;
for (i = 0; i < NUMSAMPLES; i++) {
average += samples;
}
average /= NUMSAMPLES;
// Calculate temperature
R2 = R1 / (1023.0 / (float)average - 1.0);
logR2 = log(R2);
T = (1.0 / (A + B * logR2 + C * logR2 * logR2 * logR2));
Temp = T - 273.15;
}
You can use just simple delay function on loop to control update rate. With Racechrono update rate accuracy was quite crucial , but not on your project.
Hi.
The float Ryla is coped from the copied code
"float R1=1000 //means the resistor 1000ohms.
I have 1200ohm resistor and i calculated the sensor in water and and it shows exactly right if i change the R1 to 1055. If it is like the 1200ohm resistor" R1=1200" so it shows in the serial monitor allways about 4 degrees to high temperature. Did you get it now?
Its littlebit messy because im a beginner and did not get anymore solutions to get it correctly showing right temperature.
I think that line is littlebit cheated because there is not coming full 5V?
But i get the code very goof with one sensor in the code but the problem is coming with 2 or more sensors.
The float Ryla is coped from the copied code
"float R1=1000 //means the resistor 1000ohms.
I have 1200ohm resistor and i calculated the sensor in water and and it shows exactly right if i change the R1 to 1055. If it is like the 1200ohm resistor" R1=1200" so it shows in the serial monitor allways about 4 degrees to high temperature. Did you get it now?
Its littlebit messy because im a beginner and did not get anymore solutions to get it correctly showing right temperature.
I think that line is littlebit cheated because there is not coming full 5V?
But i get the code very goof with one sensor in the code but the problem is coming with 2 or more sensors.
Ok. The 1055 value just seemed strange. I get it now!
Try this: https://filedn.com/lKOo3aQn9ubHtKC7D...nsorilleV2.ino
I didn't find any obvious wrong on the code. Just did a bit of cleening, I disabled all the lcd related lines, because I tested in on Tinkercad simulator. It worked on the simulator.
You could have some kind of wiring issue.
Try this: https://filedn.com/lKOo3aQn9ubHtKC7D...nsorilleV2.ino
I didn't find any obvious wrong on the code. Just did a bit of cleening, I disabled all the lcd related lines, because I tested in on Tinkercad simulator. It worked on the simulator.
You could have some kind of wiring issue.
Just one YouTube vid but poster isn't replying






