Stable power for analog inputs

In the particle guide it says to use an Analog Out set to HIGH in order to have a stable power source for an Analog input. Specifically they use an example of a photo resistor getting its power from Analog Out 5 set to HIGH. I would think using the regulated 3 volt pin would be just as stable providing the photon was powered by the 5 volt pin or USB. If I’m wrong please explain why.
Thanks in advance. Ron

1 Like

You are right that V3.3 will be just as stable. The advantage of using an output pin as a source is that in low-power operation, you can stop the sensor (photo resistor) from drawing any current from the supply (battery).

Hey @bko I was about to respond with exactly the same thing but then I noticed the comment in the sample code clearly says

"the reason we have plugged one side into an analog pin instead of to "power" is because we want a very steady voltage to be sent to the photoresistor."

which implies the power pin is less stable. My limited understanding of microcontrollers tells me that the pins get their "stability" from the power rails so unless there is additional conditioning of the supply before it gets to the analog pins then it should be equivalent. Are we missing something?

The output pin is no more stable than the power supply itself. I think it is just badly worded or a mistake.

2 Likes

That’s what I thought. Thanks for confirming @bko.