Project

General

Profile

Task #2220

Task #2213: AVR code

Create code to read A/D value from analog input

Added by Anonymous almost 8 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Start date:
10/13/2012
Due date:
10/13/2012
% Done:

100%

Estimated time:
5.00 h
Spent time:

History

#1 Updated by Anonymous over 7 years ago

  • Status changed from New to Resolved

After lots of research and trial and error, found that the ADC value of 255 is the value of Gyro input at rest, and anything less than 255 is the Gyro analog input spinning clockwise. The formula is Vin x 1024 / Vref for single conversion. the Maximum value is 0x3ff and minimum is 0x000. So Vref has to be larger than the analog input. The Gyro at rest is 1.65. Clockwise the voltage reading is less, counter 1.65 will go as high as 2.56 Volts. So reference voltage has to be the internal 2.56 ref on the AVR or Vcc internal. The Vref from Sensor is 1.65.

Also available in: Atom PDF