Dual and Tri Axis Accelerometers HELP
Pablo Martos
Posts: 14
An accelerometer is an electromechanical device that measures acceleration forces. These forces may be static, like the constant force of gravity pulling at your feet, or they could be dynamic that is caused by moving or vibrating the accelerometer. I want to get measurement of pitch and roll in angles, how would i or what kind of source codes can i use? i also want to check which acceleremoter is more percise, what test can i do, or what can i do?? i have already have a BS2 IC, the hitachi tri axis and the memsic dual axis. i am still new at this, so i am completely LOST... [noparse]:([/noparse]
Comments
To compare the accelerometers, I'd suggest two tests. Both tests require that the accelerometers are mounted as close together as possible, and that readings are taken simultaneously. The first test is to put them on the table (or ground or bed) with no movement, and compare their outputs. They should both be outputting identical values, somewhere around 1 g (9.8 m/s^2 or 32 ft/s^2). The next test is to mount them on a long arm that rotates (preferably somewhat fast), and to measure the acceleration at specific moments in time (aka, specific parts of the rotation). With a few physics equations, you can figure out the ideal acceleration, and compare that to your measured accelerations. If you want to be really accurate, you'll repeat each test for each axis on the accelerometers.
Another idea is to make a position tracker. You'll still have to do the simultaneous measurement idea, but this may be simpler than the rotating arm. Mount them on the board, and (without rotating yaw, pitch, or roll), walk around and around, and eventually return to the exact same spot. You can then perform numeric integration on the data that you've logged, and be able to tell which one ends up with a position closest to the start point. There is a similar example in Smart Sensors and Applications, available for download from parallax for free.
Well, the second experiment I mention in my last post would be a good way to explain acceleration as the second derivative of position, and first of velocity.
I'd assume that those numbers are tenths of a degree, but I haven't really looked at the program to confirm. You can quite simply figure it out by putting the board flat, looking at the numbers, then tilting it to 45 or 90 degrees and looking at the numbers again. That will tell you the units/step.
There is also a program out here on the forums called something like "Radio Tilt Control for your Boe-Bot", you may want to look at the accelerometer portion of that code. I believe it uses the dual axis version.
If the chip has a range of +/- 6g, and returns unsigned 10 bit numbers, then you'll have a range of 0 to 1023, with (1024/6) = 171 = 1g. They don't measure 'degrees' - they usually produce a specific voltage range over a given amount of g range, and then you need to figure out what your sample bit range is to work out the numbers you'll get. Or you can just assume that when it's sitting still on your desk, it's experiencing 1g, and just use that. It'll do in a pinch. [noparse]:)[/noparse]
All of these chips may have slight inaccuracy due to variations in mounting, temperature, noise, and so on, so the 'center' value might not be what you actually read when the thing is completely level. Also, the thing can only reliably measure 'down angle' if it's not accelerating or decelerating.
Jason