-->
Page 1 of 1

VCC on ADC

PostPosted: Thu Feb 25, 2016 12:54 pm
by ElCaron
Hi, I have read (unfortunately a little late), that the ADC covers the range of 0-1V, instead of 0-VCC.

My question is: Will VCC actually damage the chip, or will everything between 1V and 3.3V only rport as 1023? The background is that I designed a board, where I use the ADC to detect if a switch is pressed. I chose that pin because I didn't want to lose a digital output and figured I could just use the ADC as an input (and perhaps even have the option to expand the switch with a potentiometer).
The board features a pullup resistor between the ADC and VCC and a two-port screw terminal with one port to the ADC and one to GND, to connect a switch.
Since I chose a pull-up setup, I cannot just save the day with a second resistor at the switch to build a voltage devider. Do I have to make bigger changes, or is it fine to have 3.3V on the ADC?

I am using a Wemos D1 mini, if that is important.

Re: VCC on ADC

PostPosted: Thu Feb 25, 2016 8:48 pm
by lethe
ElCaron wrote:My question is: Will VCC actually damage the chip, or will everything between 1V and 3.3V only rport as 1023?

The datasheet does not specify maximum ratings for the ADC pin, so it's unsure whether the ADC will be damaged if connected to VCC or not.

I am using a Wemos D1 mini, if that is important.

According to the schematics, the D1 mini has a voltage already has a voltage divider, so your board should be fine.
See http://www.wemos.cc/wiki/doku.php?id=en ... schematics
(this also means, you can't use the ADC to internally measure the chip's supply voltage, since the ADC pin is not floating)

Re: VCC on ADC

PostPosted: Thu Feb 25, 2016 9:12 pm
by martinayotte
lethe wrote:(this also means, you can't use the ADC to internally measure the chip's supply voltage, since the ADC pin is not floating)

That is a big pitfall !
Is there a workaround (other than having an analog switch switched OFF) ?
I hope ESP32 won't have such pitfall !
(Not having myself an ESP31, I can't verify ! Like I said in other post : "I'm like a child still crying under Christmas tree" ... :? )

Re: VCC on ADC

PostPosted: Fri Feb 26, 2016 12:25 am
by ElCaron
Thanks! I also thought about solving my problem and found that I just could have screqed a second resistor over the screw terminal to solve my problem.
The fact that the D1 mini alread has a voltage divider is indeed kind of annoying ... They prpbably want to minimize support or even damage due to people like me who are used to Arduino stuff :)

Regarding measuring the supply voltage: I guess it is not witchcraft to remove the resistors from the voltage divider. These things cost 4$. If you have an application in which you wan tto use that feature, just remove the resistors. They are well reachable on the board.

PS, @mod: Sorry for the attempted double post, I didn't see that the forum is moderated the first time.