Interfacing with IMU Digital Combo Board

Hello,

I’m looking to buy the IMU Digital Combo Board - 6 Degrees of Freedom ITG3200/ADXL345 for my project (see http://www.sparkfun.com/products/10121). I looked at the code on the github page and I’m slightly confused as to how I’m supposed to get data from this thing. More importantly, how would I go about attaching this to my Arduino? I can solder headers to it I suppose, but then can I just plug it in anywhere on the digital ports? My only experience is from the SparkFun Inventor’s kit, so I understand if this sounds like a big jump from that to this. However, my idea is to make a kind of mouse, and this would be perfect for it. I just need help with the hardware aspect. If anyone could post helpful sites too, that’d be awesome.

Thanks!!

This an I2C device so you will use the wire library in Arduino. If you look at the bottom of the board, there are 6 connections. SDA and SCL are the I2C pins. SDA, SCL, 3.3 and GND should be pretty obvious where you hook them up (depends on your arduino). The 2 int connections can be ignored at first (or maybe forever). There is arduino code for reading both devices so you should be able to cut-n-paste - google is your friend.

You might want to get the datasheets for the two devices on the board. They will be overwhelming to you at first but you can start to understand what the code is doing.

Have fun!

Thanks for your reply! I found this site here: http://www.varesano.net/blog/fabio/my-f … processing. However, he seems to be using both sensors instead of this combo board. Can I just solder headers on the thing and plug it into my Arduino Uno, probably on the 8-13 pins? Or am I going to have to go through a breadboard (I noticed he was using resistors…). As far as the code goes, I wasn’t sure how to pull the different sensor data if you’re reading it over the same connection.

Is it worth getting this combo board? I need to calculate angles, so I was assuming the gyro would help with that, but some of the accelerometers claim you can calculate the angle the board is tilting at too. Is this more accurate?

No, gyros don’t do angles, they report rotation. An accelerometer will give you the angle. The resistors are pullups for the I2C bus. That IMU board has them already. You should be able to use the code for the separate devices.

You will want to filter the accelerometer output to get the angle. A simple average of a couple of samples will probably work fine. I often use a simple filter V = SC + V(1-C) where V is the filtered value you use, S is the new sample and C is some constant between 0 and 1. It allows you to play with C to get the best results and isn’t very complex.

Okay, so my project is similar to this: http://www.keyglove.net/. Only I’m just doing a mouse. My thought behind the code would’ve been to take the current angle the gyro was rotated at and do: tan(angle) * (accelerometer’s z output) to get the x and y coordinates of the mouse. The original angle would be initialized to 0. So would I be better off just getting the accelerometer for this? Thanks for your helpful responses so far!

When you say mouse, I presume you mean a 2D pointing device. For that, you can get by with an accelerometer since you only need to determine linear acceleration (well, motion but that’s just the integral of acc). Note that you will get error accumulation (aka drift) so think about how you will handle it. Wii uses the sensor bar (simple camera). You might have a momentary disconnect that lets you do a “pick up the mouse” movement.

The gyro will only report rate of rotation. Your “tilt” can be integrated from that but it too has error accumulation. An accelerometer is much much better at that - can determine it directly (well, after a good amount of filtering). That’s why people use both in stabilizing copters and planes - gyros to know how counteract rotational forces, accelerometers to know where the “horizon” is. (yes, I know this is a gross oversimplification.)

Hello,

I am experiencing issues attempting to connect the IMU Digital Combo Board to an eZ430-RF2500 wireless transmitter (https://estore.ti.com/EZ430-RF2500-MSP4 … P1148.aspx). Each bus has the necessary 10k pull-up resistors. The combo board does not respond to the start condition sent by the wireless transmitter, and the wireless transmitter subsequently restarts. I’ve noticed that the SDA and SCL lines from the combo board are high once it is connected to the supply voltage, so I suspect that the combo board may be dysfunctional. Is this the case, or is the combo board behaving as expected, suggesting that the problem is with the transmitter?

cliffburtonsuprise:
I’ve noticed that the SDA and SCL lines from the combo board are high once it is connected to the supply voltage, so I suspect that the combo board may be dysfunctional. Is this the case, or is the combo board behaving as expected, suggesting that the problem is with the transmitter?

The combo board has 4.7k pull-ups on the SDA and SCL lines so your added ones aren't required. Can you not start w/o the wireless link to get the I2C comm working ?

https://www.sparkfun.com/datasheets/Sen … al-v10.pdf