Resistance divider reading vary when connected to NANO

Thread Starter

LAOADAM

Joined Nov 21, 2018
681
Try to use NANO read a signal 0-30V, used 22.7K + 4.6K resistance divider output 4 V when input 24V, the reading vary to 2.7V when hook up to a NANO, the GND hooked, don't have diagram, just a short test, what reason can it be?
 

sagor

Joined Mar 10, 2019
534
Is the Nano running on 5V or 3.3V? Your difference seems to be exactly the same ratio as 5V/3.3V. (reading 4v vs 2.7V)
Check the reference voltage of the Nano....
 

Thread Starter

LAOADAM

Joined Nov 21, 2018
681
Is the Nano running on 5V or 3.3V? Your difference seems to be exactly the same ratio as 5V/3.3V. (reading 4v vs 2.7V)
Check the reference voltage of the Nano....
Thanks,
I didn't find any 3.3 words, I input 12V to Vin, and there is a 5v pin27.
 

BobTPH

Joined Jun 5, 2013
4,247
If it is as you describe, the nano pin is configured as an output. If it were configured as an input, it would have a negligible effect on the voltage divider.

Bob
 

djsfantasi

Joined Apr 11, 2010
8,069
Is pin 15 connected to anything?

Rather than asking you how each pin s connected or what your code is doing, I strongly suggest that you post a schematic and your code (in code tags).
 

Thread Starter

LAOADAM

Joined Nov 21, 2018
681
Is pin 15 connected to anything?

Rather than asking you how each pin s connected or what your code is doing, I strongly suggest that you post a schematic and your code (in code tags).
Thanks
pinMode(A2,INPUT_PULLUP); changed the input of 5.1v to 0.99V.

I don't have a schematic yet, just a temporary by my old board, I'll make one later.
 

djsfantasi

Joined Apr 11, 2010
8,069
Thank you DANA.
Found a 22ph, how to get half Vcc then? use two R take the mid?

Do you think the large ohms better? my result shown different?
You don’t need Vcc/2. I think what Dana has shown is actually internal to the Nano.

First, the grounds of the Nano and the device from which you’re reading the voltage must be connected.

Secondly, I have to ask because you haven’t shared your code, how are you calculating the voltage? The analogRead() returns a value between 0 and 1023. To get the actual voltage, you have to multiply the number returned by analigRead() by 0.00488. Have you done this?
 

Thread Starter

LAOADAM

Joined Nov 21, 2018
681
You don’t need Vcc/2. I think what Dana has shown is actually internal to the Nano.

First, the grounds of the Nano and the device from which you’re reading the voltage must be connected.

Secondly, I have to ask because you haven’t shared your code, how are you calculating the voltage? The analogRead() returns a value between 0 and 1023. To get the actual voltage, you have to multiply the number returned by analigRead() by 0.00488. Have you done this?
Thanks

1. The GND connected
2. I didn't do calculation, just put few pieces code into my old project, I measured the input V by multi meter before and after connected.
3. I changed the board as UNO, the reading: 1.6 becomes 4.2.
 
Top