[SOLVED] I2C IMU ITG3205+ADXL345+HMC5883L

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!


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
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
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
Tue Oct 06, 2015 9:16 pm
try with 3k3 at 3v3 on the baite

skyng22003
Tue Oct 06, 2015 10:01 pm
Tried the 3k3 and removing the level converter still does not resolve the issue…

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


mrburnette
Tue Nov 03, 2015 10:28 pm
I’m not having I2C issues:
http://www.hackster.io/rayburne/oled-te … ter-for-10

Ray


eko4ever
Mon Oct 03, 2016 7:16 pm
Any luck with the maple mini and the accelerometer ?

decka
Mon Jan 02, 2017 3:41 am
I’ve been successful when using a library derived from

https://www.i2cdevlib.com/devices/hmc5883l#source

my board is Fly maple DFRobot 10 dof IMU
:) :) :)


ncain
Sat Sep 09, 2017 7:38 pm
[decka – Mon Jan 02, 2017 3:41 am] –
I’ve been successful when using a library derived from

https://www.i2cdevlib.com/devices/hmc5883l#source

my board is Fly maple DFRobot 10 dof IMU
:) :) :)

Thanks a lot, that’s a great lib. Other I2C libs failed to interface correctly or reliably, this one works great.


Leave a Reply

Your email address will not be published. Required fields are marked *