can i use GPIO pin to power ADC sensor?

Thread Starter

rewIndustry

Joined Feb 4, 2023
30
my application is based on small IOT boards like the raspberry picoW and similar.

am using the ADC to measure generally static resistances,

in this case a simple salt water sensor made of a set of parallel stainless wire prongs,

and i do not want to waste battery by leaving this circuit powered, until i need it.

my sense is that i ought to be able to use an output GPIO pin to power the sensor.

this pin would be driven high some microseconds before i read the ADC.

is this a sensible approach, or am i missing a better way?

attached is an approximate sketch of my intended circuit.
 

Attachments

MrChips

Joined Oct 2, 2009
34,807
That is not a good idea. The ADC might use the supply voltage as the ADC reference voltage. If this voltage changes it will introduce errors in your A/D conversion.

Most MCUs today have ultra-low power mode. They often already have built-in ADC enable control bit.
 

dl324

Joined Mar 30, 2015
18,326
is this a sensible approach, or am i missing a better way?
It depends on the drive capability of the GPIO and the voltage/current required by whatever you want to power.

If you use Pico, the outputs have 4 different drive strengths (2, 4, 8, and 12mA).
 

Thread Starter

rewIndustry

Joined Feb 4, 2023
30
thank you very much for your advice.

according to the datasheet for the picoW

https://datasheets.raspberrypi.com/picow/pico-w-datasheet.pdf

on page 11, it says "The RP2040 ADC does not have an on-chip reference; it uses its own power supply as a reference."

it also has an ADC_VREF, however i am fairly sure this is an input only?

and i do not want to attach either of these to my sensor, because that would result in a constant drain on the supply, as long as the board has power, as far as i can tell.

am not concerned too much with accuracy, at this point.

the fact that these outputs have adjustable drive strength is very interesting to me.

if i remember my core maths correctly (i probably don't) this might even allow me to adjust the sensitivity of my sensor.
 

StefanZe

Joined Nov 6, 2019
212
thank you very much for your advice.

according to the datasheet for the picoW

https://datasheets.raspberrypi.com/picow/pico-w-datasheet.pdf

on page 11, it says "The RP2040 ADC does not have an on-chip reference; it uses its own power supply as a reference."

it also has an ADC_VREF, however i am fairly sure this is an input only?

and i do not want to attach either of these to my sensor, because that would result in a constant drain on the supply, as long as the board has power, as far as i can tell.

am not concerned too much with accuracy, at this point.

the fact that these outputs have adjustable drive strength is very interesting to me.

if i remember my core maths correctly (i probably don't) this might even allow me to adjust the sensitivity of my sensor.
THE ADC_Vref is an input pin. On your board it is a filtered 3.3 voltage. This voltage can be used as the reference voltage for the ADC. If you use the internal ADC you don't need to switch an external ADC on and off with a pin.

The drive strength tell you the maximum current the pin is able to provide the the given setting. The actual current is dependent on your load.
 

Juhahoo

Joined Jun 3, 2019
302
You dont need a driver circuit for this. I would simply add a pull up resistor between AD input and VCC whatever the ADC is using.
 
Top