What he saidA. This is a voltage divider. You need the three connections to get a voltage between 0 to Vcc.
B. Here you put a variable resistor between Vcc and Signal. You will get always Vcc as the input.
A. This is a voltage divider. You need the three connections to get a voltage between 0 to Vcc.
B. Here you put a variable resistor between Vcc and Signal. You will get always Vcc as the input.
Then you mesure nothing, ADC needs a reference voltage, usually it's internal.Then how about if the pot two points are connected between Gnd and A0?
No!Is that because A0 is internally connected to Vcc?
You will read 0, because you are connecting A0 to Gnd via a resistor.Then how about if the pot two points are connected between Gnd and A0?
No!
Look carefully at the sketch!
You are connecting Vcc to Signal via a variable resistor, the resistor value will vary between 0 and the nominal value of the potentiometer.
This means that you will read the max value.
You will read 0, because you are connecting A0 to Gnd via a resistor.
Well, for me, even if I don't know the internal circuit of the analog input.I wish I knew the internal circuitry of this A0 pin.
Well, for me, even if I don't know the internal circuit of the analog input.
I know that it's an analog input and I have to provide a voltage, taking care of the maximum voltage beeing supplied.
This can be provided by a sensor, or for testing with a potentiometer, and in this case it must be voltage divider.
Inputs are high impedance, something on the order of Mohms. The ATmega328P states 100 Mohms. So this means that you (@Beja) are correct the voltage does change but... in a negligible way so Klaus is correct too. A few nano amps through a 10K resistance isn't much of a voltage drop.
Hope this helps.
the best way to control on LED is with PWM and not a potentiometer as you could easily overdrive the LED if the resistance drops to far
Use a voltvoltmeter and put the Gnd probe on the pot center pin and the positive probe on a dc power supply.. Then move the pot wiper and watch the volt varies.
The question is, when applying connecting the center pin to A0 then it should also read a varying volt. Right?
If you are interested, I will post an explaining drawing