Analog input voltage


#1

So I have a weird problem, where the analog pins are reading voltages higher than the sensor is outputting.

the sensor is outputting 0.5v to 5v (this is confirmed with a voltmeter) but the analog input (11 bits resolution) is reading 0.77v.

this is happening on pins A01 and A05 (can try the others if need be).


Where is VREF pin on Dash
#2

@Saffar

11-bit isn’t directly supported. If you select 11-bit, a 12-bit read is done, then converted to 11-bit in software. This does work though, and you can certainly use 11-bit reads.

The reference voltage is VCC for the MCU, so it is ~3300mV. If you are basing your calculations on a 5V supply, the voltage you would calculate would be higher.
All pins that have a digital port are 5V tolerant, but will still only read up to 3.3V. Pins L14 (DAC0), L18 (A07) and R18 (A09) are analog-only and are NOT 5V tolerant. Connecting 5V to those pins will damage the Dash.


#3

Sorry I should have mentioned this is a Dash pro… does that make a difference to what you said?


#4

All of that applies for the Dash Pro also, except that L18 and R18 are not present on the Dash Pro.


#5

Your answer cleared up a lot of confusion… thanks for pointing out the 3.3v ref voltage. I was under the impression its 5v for the dash pro and 3.3v for the dash.


#6

The Dash Pro does provide an external 5V supply, but it does not use that 5V on-board.