Offline
Newbie
Karma: 0
Posts: 5
|
 |
« Reply #15 on: May 06, 2011, 08:14:58 am » |
I modded the code into java, as i'm doing the postprocessing on the PC. the only thing i think i modded is this... xAngle += kalmanCalculateX(accXangle, gyroXrate, dtime); I made the xAngle += so I just print total xAngle directly. Is that wrong? Apart from that, using nano seconds and slightly different calibration position it is the same.
|
|
|
|
« Last Edit: May 06, 2011, 08:42:00 am by Brettj »
|
Logged
|
|
|
|
|
Denmark
Offline
Full Member
Karma: 7
Posts: 246
|
 |
« Reply #16 on: May 06, 2011, 08:27:14 am » |
Yes that it totally wrong. If you do like that, it will plus the angle with the last one. It should be: Angle = kalmanCalculateX(accXangle, gyroXrate, dtime); It is only when you calculate the gyros angle that you have to plus the last angle with the new one! - Lauszus
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 5
|
 |
« Reply #17 on: May 06, 2011, 09:45:29 am » |
ok fixed that. But it only works for about 50 degrees +-. Similar to the other kalman filter i tried 
|
|
|
|
|
Logged
|
|
|
|
|
Denmark
Offline
Full Member
Karma: 7
Posts: 246
|
 |
« Reply #18 on: May 06, 2011, 10:10:31 am » |
Maybe you forgot that gyroXrate should be in degrees per second and not degrees in this line: Angle = kalmanCalculateX(accXangle, gyroXrate, dtime); - Lauszus
|
|
|
|
|
Logged
|
|
|
|
|
Depok, Indonesia
Offline
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #19 on: May 09, 2011, 03:45:28 am » |
Hi Lauszus, I bought the same gyro( http://www.sparkfun.com/products/9165) used by IMU on your project. I just want to read angle from the gyro but having a little confuse about the HP, PD and ST pin. Should I just left them all unconnect or do you have any suggestion? ~Thanks ~Fino
|
|
|
|
|
Logged
|
|
|
|
|
Denmark
Offline
Full Member
Karma: 7
Posts: 246
|
 |
« Reply #20 on: May 09, 2011, 03:57:37 am » |
You can just leave them all unconnected  - Lauszus
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 10
|
 |
« Reply #21 on: May 13, 2011, 04:33:39 pm » |
Hey Lauszus!
First off thanks for posting, this looks great and could be exactly what i need!
basically i am creating a ball full of different sensors which will then act as a synthasizer.this is my final year project and i am stuck here with only a few weeks to go. I have other sensors but what i really want is to be able to read if the ball is being tilted forward or back,left and right and by how much so i can modulate sound accordingly.( i am not trying to measure the acceleration,just the amount it is tilted)
i have been searching all the different possibilities with gyroscopes and accelerometers but can't seem to find clear cut examples of what i want. It looks like your code here is what i need? If i was to buy the 6dof is it as simple as using the code you linked? and then i would be able to get proper tilt values?
I am only a beginner with arduino and just know the basics of reading sensors but i'm finding the task of measuring tilt a bit deep for me.
your help or advice would be greatly appreciated!
(a final year college student freaking out lol) Billy.
|
|
|
|
|
Logged
|
|
|
|
|
Denmark
Offline
Full Member
Karma: 7
Posts: 246
|
 |
« Reply #22 on: May 14, 2011, 02:28:54 pm » |
Hallo bilbo-bongo First of all: it sounds like it is exactly what you need  You really don't need a 6DOF for your project. You only need 3 accelerometers and 2 gyros. But if you don't want to get your hands dirty, you can just buy the same IMU as me and just copy the code. The only thing you need is some way of picking up the serial commands from the Arduino, exactly as I did with Processing. Hope that gave you some answers  - Lauszus
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 10
|
 |
« Reply #23 on: May 14, 2011, 03:17:55 pm » |
cool!
Yeah i already have Pd reading the serial and picking up values from my other sensor (pressure) and modulating sound. It's just sensing tilt i couldn't figure out.
you have saved me!
I'm going to order one of those. i'm in ireland,hope it arrives in time!
thanks again!
billy.
|
|
|
|
|
Logged
|
|
|
|
|
Denmark
Offline
Full Member
Karma: 7
Posts: 246
|
 |
« Reply #24 on: May 14, 2011, 03:57:46 pm » |
Just order it from Watterott.com, it only took 3 days to arrive here in Denmark 
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 10
|
 |
« Reply #25 on: May 14, 2011, 05:24:37 pm » |
perfect. even better! Do you know what is the difference between the 70 euro one and the 50 euro one??? specs look the same and the name is the same?? thanks again 
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 10
|
 |
« Reply #26 on: May 14, 2011, 07:02:27 pm » |
looks like the 70 euro one is sold out anyway
|
|
|
|
|
Logged
|
|
|
|
|
Denmark
Offline
Full Member
Karma: 7
Posts: 246
|
 |
« Reply #27 on: May 15, 2011, 12:32:57 am » |
The one that cost 70 euro, is the old one (look at the product number). The one that cost 50 euro is in fact the updated one. The only difference is that it "removes the high-pass filters which were creating some issues with the output."  - Lauszus
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 11
Arduino rocks
|
 |
« Reply #28 on: May 16, 2011, 01:07:38 pm » |
where's the code?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 10
|
 |
« Reply #29 on: May 16, 2011, 01:34:15 pm » |
zip files under the youtube video. have to be logged in to see them i think
|
|
|
|
|
Logged
|
|
|
|
|
|