e health shield, ehealth c++ code using arduino


Anyone deal with e health shield with arduino c++ code before?
Does anyone understand the algorithm on how the temperature sensor measure?

Please find attached temperature sensor code.

Thank you

temperaturesensor_ehealth_.txt (2.13 KB)

Does anyone understand the algorithm on how the temperature sensor measure?

Why do you need to?

The sensor is non-linear, so the code breaks the range that the sensor can report into ranges that are more or less linear, and computes the temperature for each range.

Hi Pauls

I am doing a project using the e health shield. So I would like to know how the calculation worked as right now I couldn't get accurate temperature.

Like this part of the code:
// Wheatstone bridge output voltage.
// Resistance sensor calculate
float aux=(voltage2/RefTension)+Rb/(Rb+Ra);
if (Resistance >=1822.8) {
// if temperature between 25ºC and 29.9ºC. R(tª)=6638.20457
} else {
if (Resistance >=1477.1){
// if temperature between 30ºC and 34.9ºC. R(tª)=6403.49306*(0.95883)^t
} else {
if (Resistance >=1204.8){
// if temperature between 35ºC and 39.9ºC. R(tª)=6118.01620*(0.96008)^t
if (Resistance >=988.1){
// if temperature between 40ºC and 44.9ºC. R(tª)=5859.06368*(0.96112)^t
else {
if (Resistance >=811.7){
// if temperature between 45ºC and 50ºC. R(tª)=5575.94572*(0.96218)^t

I don't really know what does the calculation mean? and how they get the
formula shown below

Thank you for your replies and help. Appreciate it. :slight_smile: