Go Down

### Topic: IMU 5 DOF (Read 1 time)previous topic - next topic

#### ars

##### Jul 23, 2011, 07:04 pm
Hey guys,
I just bought a IMU 5DOF sensor, and when i run the program
Code: [Select]
`int x=0;int y=1;int z=2;void setup(){  Serial.begin(9600);      // sets the serial port to 9600}void loop() {  x = analogRead(0);       // read analog input pin 0  y = analogRead(1);       // read analog input pin 1  z = analogRead(2);   Serial.print("accelerations are x, y: ");  Serial.print(x, DEC);    // print the acceleration in the X axis  Serial.print(" ");       // prints a space between the numbers  Serial.print(y, DEC); Serial.print(" ");       // prints a space between the numbers  Serial.println(z, DEC);    delay(100);              // wait 100ms for next reading}`

i get the foll: output that doesnt change even though i tilt or move the sensor
accelerations are x, y, z : 103 105 106
accelerations are x, y, z : 103 105 106
accelerations are x, y, z : 103 105 106
accelerations are x, y, z : 103 105 106
etc
(I use an old version of arduino , so i used a voltage divider network of 12K and 20K resistors to get 3.3V from 5 V)

#### johnwasser

#1
##### Jul 23, 2011, 09:31 pm
Sounds like something isn't wired correctly.

Exactly what sensor do you have and how is it wired?
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

#### ars

#2
##### Jul 24, 2011, 08:05 am
I have a IMU 5 DOF (adxl335 and IDG500).........i connected the 3.3V pin of the sensor to a voltage divider arrangement of 12k and 20k to get 3.3V from the 5V of my arduino, then i connected the X-acc,Y-acc,Z-acc pins to analog 0,1,2 respectively and connected the GND.This is the product page of my sensor:http://www.rhydolabz.com/index.php?main_page=product_info&cPath=137_148&products_id=581.Please help.

#### johnwasser

#3
##### Jul 25, 2011, 04:21 am
The specification for the accelerometer shows that the output should be about 1/2 the supply voltage +/- 0.3v

3.3/2 = 1.65v

That SHOULD produce an analog input value of 338 +/-61.  Something is definitely wrong.

It's just a guess but a resistor voltage divider might not be good enough for powering an active device.  You should supply a regulated voltage.  You can use the regulated 3.3v supply from the Arduino.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

Go Up

Please enter a valid email to subscribe