5

EDIT: Here are the links to the sensor spec sheet (http://www.omega.com/temperature/pdf/HX71.pdf) and manual (http://www.omega.com/Manuals/manualpdf/M4543.pdf) for your reference.

I'm using a relative humidity (RH) sensor with an Arduino Mega. The RH sensor runs off of +/- 24V (which is being sourced by a power supply), and outputs a signal from 0-5VDC. Naturally, I am plugging this output signal into my A0 channel. There is a bare Earth Ground wire that is wired to the power supply's earth ground (possible error?) Arduino's GND is connected to the power supply's EARTH GND, fyi.

I compared the voltage reading in my Arduino Serial Monitor to a reliable Fluke multimeter, and the analog input channel is adding ~.2 Volts!

From some research, I have read about "high impedance" "source impedance" "internal wiring of Arduino" etc, but unfortunately I am failing to grasp the reason why this is happening. I'd like to know so then I could figure out a solution on my own.

Below is a schematic of what I'm dealing with so that it may better illustrate my issue (also my code). Thank you for your time, and I appreciate your help!

Error drawn out.)

void setup() 
{

Serial.begin(9600);

} 

void loop() 
 {

  float hs1 = ((( analogRead(A0) * ( 5.0 / 1024.0) ) )* 20.0 ); 

  Serial.print("RH%");
  Serial.print(":");
  Serial.print(hs1);
  Serial.print(";");  
  Serial.println(); 
  delay(1000); 

}
  • Link to the RH sensor data sheet? – Majenko May 11 '17 at 16:19
  • Oh yes! here's the spec sheet: omega.com/temperature/pdf/HX71.pdf and the manual omega.com/Manuals/manualpdf/M4543.pdf – L. Paw May 11 '17 at 16:21
  • 1
    I'm using model HX71-V1, thank you @Majenko – L. Paw May 11 '17 at 16:23
  • 1
    One of the biggest mistakes people make when calculating the voltage of an ADC is they assume the chip is running at 5.000000 volts. Have you measured the 5V pin of the Arduino with your Fluke? – Majenko May 11 '17 at 17:03
  • How do you know your fluke is accurate ? :). You could measure the 5v using A1 and 'calibrate' your reading on the fly. – Code Gorilla May 11 '17 at 19:08
1

Wow, you guys are gonna get a KICK out of this!

The analog input channel was not adding millivolts to my Analog Input signal. I stupidly was not supplying my Arduino Mega with 9V!! I had it running off of the USB port, which was affecting my 5V reference (thank you @majenko for pointing that out!).

I measured the 5V pin and it was fluctuating between 4.41-4.21 volts. My colleague made a comment and I reviewed the Arduino Mega datasheet. It must be supplied with 7-12 volts in order for the 5V to output correctly.

Once I hooked my Power Vin + GND to my power supply, set that at 9V/.08amps my analog input readings were accurate.

Thank you everyone for your help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.