Arduino nano connected to an android or PC - voltage differences

Dear All

Recently I make a project to have a thermometer with K type thermocouples and connect it to an android.

I used the arduino nano, an amplifier for thermocouples, an OTG cable and a app Serial usb therminal.

I calibrate it and make the software with pc and send it via pc to the arduino, so it sends a reading for the rs232 each 10sec.

My surprise was when I connect it to the pc and the readings are not the same that I have connect to the android??? Why??

In the android phone I have the correct temperature, in the pc the readings are too lower.

Can somebody help understand this?

Best regards

Carlos

Where's your code, schematics and other details on the project?
What are the actual readings you get?
How do you know the Android phone gives the correct temperature?

Hi wvmarle

Sorry for this mistake

/*
   
   */

// the setup routine runs once when you press reset:

void setup() {
   // initialize serial communication at 9600 bits per second:
   Serial.begin(9600);
}

// the loop routine runs over and over again forever:

void loop() {
   // read the input on analog pin 0:
   int sensorValue0 = analogRead(A0);
    int sensorValue1 = analogRead(A1);
     int sensorValue2 = analogRead(A2);
      int sensorValue3 = analogRead(A3);
   
   
   
   // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
   float voltage0 = sensorValue0 * (5.0 / 1023.0) * 192.2 - 251.42;//calib ago2018
  float voltage1 = sensorValue1 * (5.0 / 1023.0);
 float voltage2 = sensorValue2 * (5.0 / 1023.0);
float voltage3 = sensorValue3 * (5.0 / 1023.0); 
   
   
   
   // print out the value you read:

 Serial.print(voltage0, 1);
 Serial.print(" ");
  Serial.print(voltage1, 4);
   Serial.print(" ");
   Serial.print(voltage2, 4);
    Serial.print(" ");
   Serial.println(voltage3, 4);
   
   delay(10000);
}

printscreen from phone and pc attached.

I use an AD8495 K-Type Armz Thermal Thermocouple Amplifier Analog Output Module and connect it to A0 from arduino nano.

Best regards
CPalha

Hi Friends

Seems there is someting related to main 220v power for my desktop (maybe some noise or gnd problems).
Yesterday I connect the arduino to my laptop (in battery mode) and the output are the same as in the phone.

cpalha

Check the spec sheet of your thermocouple.

I'm willing to bet that it produces an absolute voltage based on the temperature, but you're referencing to Vcc which is about 5V but not very exact. USB voltage from a computer may be as low as 4.6-4.7V and that will badly affect your readings.

Two possible solutions:

  1. measure Vcc against the internal reference before doing the reading (look for the "Arduino secret voltmeter"), and use that value as compensation,
  2. use the internal 1.1V reference to measure the input voltage of the probe (but make sure the voltage you have to read is in that range).

Note that the internal reference while stable has a tolerance of 10% so for accurate results you have to calibrate the actual value of this (can be done with a small modification to the volt meter code - measure Vcc with a multimeter, and measure the internal reference against that).