Go Down

Topic: Voltage output from analogRead (Read 791 times) previous topic - next topic

deviukk

Hi,

I'm pretty new to this, so maybe this is a simple question.
I'm wondering how I can get the output from the analogRead in volts. I have a gyroscope (IDG1215) with a sensitivity of 15 mV/°/s, bias of 1.35V and working on 5V. I know that the analogRead() function returns a value between 0 and 1023. But how do I get the voltage from that value?

Thx!

AWOL

Each count represents  5 / 1023 volts. (unless you've set a different analogue reference)
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

deviukk

Ok,

So the same with my accelerometer that is working on 3.3V:

Value(in V) = analogRead()*3.3/1023?

AWOL

Only if you have 3.3V as your analogue reference.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

deviukk

No, I dont have analogue reference.

AWOL

Yes, you do.
It is almost certainly 5V.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

deviukk

Ah! I get it now!

Thx for the help!

WillR

Look in the reference area and read the cautions on AREF.
Just another Hacker

Go Up