[SOLVED] I2C IMU ITG3205+ADXL345+HMC5883L

Working libraries, libraries being ported and related hardware
skyng22003
Posts: 9
Joined: Wed Apr 29, 2015 9:49 pm

[SOLVED] I2C IMU ITG3205+ADXL345+HMC5883L

Post by skyng22003 » Tue Oct 06, 2015 8:31 pm

I have come across a very strange problem with using I2C on the BaiTe Maple Mini with the latest STM32 build and arduino 1.6.5.

Using both the hardware and software i2c libraries the scanner sketch returns with the correct device addresses on the Maple Mini.

When I run the sample sketches from the arduino library complied for Maple Mini with software i2c (100khz) for each of sensors it returns with a value however the value seems to be frozen, ie values are still printing from usb serial but when I move the imu the values don't change.

However when I change just change the device target to an arduino duemilanove everything works fine and the values change, suggesting there's not wrong with the imu.

One stranger thing is, for some random reason sometimes the values seem to refresh on the Maple Mini, however I can't seem to reproduce it. This is with the exact same example code, i2c library and 1.6.5.

So I'm really puzzled.......any comments world be greatly appreciated!

User avatar
RogerClark
Posts: 6911
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: I2C IMU ITG3205+ADXL345+HMC5883L

Post by RogerClark » Tue Oct 06, 2015 8:50 pm

Do you mean it works on a 5V ATMega based board and not on the Maple mini

If so have you looked at the I2C pull up values, they may need to be lower for the 3.3V Maple mini

Also have you tried lowering the I2C speed (hack the Wire lib), as it may be running too fast

skyng22003
Posts: 9
Joined: Wed Apr 29, 2015 9:49 pm

Re: I2C IMU ITG3205+ADXL345+HMC5883L

Post by skyng22003 » Tue Oct 06, 2015 8:55 pm

Yep it works on a 5v ATMega Based board, ill try it with 4.7K pullups and see what happens.

I've also looked at the wire lib it is TwoWire Wire(PB6, PB7, SOFT_STANDARD); should I lower it further?

skyng22003
Posts: 9
Joined: Wed Apr 29, 2015 9:49 pm

Re: I2C IMU ITG3205+ADXL345+HMC5883L

Post by skyng22003 » Tue Oct 06, 2015 9:07 pm

Tested with 4k7 resistors, as before seemed to work randomly for a moment and returns to the values being frozen on the Maple Mini

zmemw16
Posts: 1417
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: I2C IMU ITG3205+ADXL345+HMC5883L

Post by zmemw16 » Tue Oct 06, 2015 9:16 pm

try with 3k3 at 3v3 on the baite

skyng22003
Posts: 9
Joined: Wed Apr 29, 2015 9:49 pm

Re: I2C IMU ITG3205+ADXL345+HMC5883L

Post by skyng22003 » Tue Oct 06, 2015 10:01 pm

Tried the 3k3 and removing the level converter still does not resolve the issue...

zmemw16
Posts: 1417
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: I2C IMU ITG3205+ADXL345+HMC5883L

Post by zmemw16 » Tue Oct 06, 2015 10:15 pm

is this on a breadboard?

mine are 830 holes, nano at one end, blue pill the other end.
and links at the middle of the power rails to jump the break in them

skyng22003
Posts: 9
Joined: Wed Apr 29, 2015 9:49 pm

Re: I2C IMU ITG3205+ADXL345+HMC5883L

Post by skyng22003 » Tue Oct 06, 2015 10:23 pm

No its directly connected to the Maple Mini with cables, replaced the smd resistors on the imu itself

Mogu
Posts: 1
Joined: Thu Oct 22, 2015 3:06 am

Re: I2C IMU ITG3205+ADXL345+HMC5883L

Post by Mogu » Tue Nov 03, 2015 5:58 pm

Hi

My first post here.
I have encounter the same problem using maple mini clone and GY85 from
http://www.aliexpress.com/item/GY-85-BM ... 30162.html

I use library from
https://github.com/sqrtmo/GY-85-arduino

Same result as skyng22003, all the value are fix without update and sometimes jump with huge value.

I test the GY85 module with arduino nano and it's working fine with the same library.

Try to change the wire soft_standard to 64 without success.

Any help or idea would be appreciated.

User avatar
mrburnette
Posts: 1803
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: I2C IMU ITG3205+ADXL345+HMC5883L

Post by mrburnette » Tue Nov 03, 2015 10:28 pm


Post Reply