Monitoring 3.3 Supply voltage

Hey, I am using an analog IMU powered by the 3.3 volt supply. I am using the analog pins to read the value. I am aware that it is 1024 units between 0v and 5V. The calibration of this value to voltage to a G load or angular rate varies as a battery voltage drains.

I would like to monitor the 3.3 volt supply with an analog pin, and allow my calibration equations to vary with voltage.

Can I hook the 3.3 volt supply directly to an analog pin or do I need a resistor? (Does the arduino analog pins protect against current draw when using as an input?)

Can I hook the 3.3 volt supply directly to an analog pin

Yes.

Does the arduino analog pins protect against current draw when using as an input?

Current is pulled, not pushed. The Arduino will not draw excessive current.

Can you explain a little about how that works?

How do the analog pins work? When using them as an input that is.

How does the arduino actually measure the voltage or "pull" the current?

The ADC has a small capacitor. The voltage applied to the pin charges the capacitor. The time it takes to charge the capacitor is a function of the voltage applied. So, the value returned by analogRead is a measure of time, not voltage. Since they are related, though, they can be considered the same thing.

The amount of current pulled to charge the capacitor is very, very small.

How do the analog pins work? When using them as an input that is.

Using them as input is the only way you can use an analog pin.

How do you know this stuff?

I am eager to learn more...

Are you sure you can only use them as input?

I believe you can use them as a digital in or out too.

I also believe you can use them as an analog out, because I have made an LED fade in and out powering it with the analog pins.

Are you sure you can only use them as input?

I believe you can use them as a digital in or out too.

I also believe you can use them as an analog out, because I have made an LED fade in and out powering it with the analog pins.

No, you can't use then with an analogWrite, though you could use them as PWM pins if you used them as digital, but drove the PWM with software.

my mistake

How do you know this stuff?

Read the data sheet of the device. Read on line tutorial stuff. Do experiments. Repeat for 40 years.