Pages: [1]   Go Down
Author Topic: IMU 5 DOF  (Read 933 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey guys,
I just bought a IMU 5DOF sensor, and when i run the program
Code:

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)
Please help, what would be wrong??
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 179
Posts: 8064
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds like something isn't wired correctly.

Exactly what sensor do you have and how is it wired?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 179
Posts: 8064
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Pages: [1]   Go Up
Jump to: