Pages: 1 [2]   Go Down
Author Topic: Acceleration Sensor BMA020  (Read 5961 times)
0 Members and 1 Guest are viewing this topic.
Cologne, ger
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino i <3 u
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hey thanks for the quick answer.

i made a quick drawing of the circuit how i connected arduino and the bma020, you can see an edit it here:

http://www.dz863.com/drawsch_1353.html
(i attached it as jpg as well).

for the bma020 on the board made by elv, i also attached an image that shows the layout of the board.

thanks for your help!!





* BMA020 on Arduino.jpg (49.42 KB, 470x274 - viewed 44 times.)

* IMAG0236.jpg (513.17 KB, 2048x1216 - viewed 45 times.)
Logged

Cologne, ger
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino i <3 u
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

woops, forgot the +5v in the circuit, its of course on the line with the two pullup-resistors smiley-wink
Logged

Cologne, ger
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino i <3 u
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok... I wrote a little programm to run through all possible i2c adresses und requesting de 0 register... None of them returns a 2(what the bma020) is supposed to do....so it seems that the bma is not communicating on the bus at all.

Is there mistake in the wiring or the code i posted above? Its really starting to drive me crazy ,)
Logged

Worcester, MA
Offline Offline
God Member
*****
Karma: 3
Posts: 623
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Try downloading the sketch here (http://todbot.com/blog/2009/11/29/i2cscanner-pde-arduino-as-i2c-bus-scanner/) as it will tell you if it's communicating with your device.  If not then recheck your wiring.
Logged

I2C GPS Shield

Checkout my Open Source GPS Tracker on Kickstarter

Cologne, ger
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino i <3 u
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

well... the sketch works fine, the i2c not... no adresses found smiley-sad

i checked port a4 and a5, they are both ok and give 5v on digital write.

i check the power to the bma020 an every wire transmitts the voltage as its supposed to.

so in my opinion there are two possible answers:

1. my bma020 ist broken
2. there is a mistake in my circuit.

for the second point i made the schematic of my circuit here:

http://www.dz863.com/drawsch_1354.html

and uploaded a photo of the board wiring...(please dont laugh smiley-wink  )

it would be great if you could take a look at those two and verify they are ok... then i can porbabaly buy a new bma020...


* IMAG0238.jpg (666.18 KB, 2048x1216 - viewed 63 times.)
Logged

Worcester, MA
Offline Offline
God Member
*****
Karma: 3
Posts: 623
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a feeling your problem may be the solder jumper J1 on the board.  Looking over the schematic it looks like J1 should be shorted to provide logic level translation on the I2C lines.  Looking at the picture of your board it looks like the jumper is open.  Is there any documentation for the board that specifies if the jumper should be open or shorted?
Logged

I2C GPS Shield

Checkout my Open Source GPS Tracker on Kickstarter

Cologne, ger
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino i <3 u
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hey wayneft,

the documentation / manufactureres website says that you close J1 when you are using exactly 2.5V.
which makes sense because then youve got 2.5V on Upullup. if you use 5V like me it should be left open.
which makes sense as well, because then the 2.5V come from the "Linearregler (2,5V)" from the upper right corner in the schematic...

yesterday i bought a wii mote plus with some gyros in it which communicates over i2c as well. ill let you know if this works smiley-wink

if not, probably there is something with my arduino?!

cheers!

dom
« Last Edit: September 11, 2011, 05:32:30 am by domj » Logged

Cologne, ger
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino i <3 u
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok, i got the wmplus sensor on my arduino and everything works finde on the i2c bus, giving me yaw, roll etc...

so it really seems to be a broken bma020....

thanks everybody for your great help, i learned a lot - ill get a new bm020 and let you know if it works!

cheers!
Logged

Cologne, ger
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino i <3 u
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

finally!!!

today my new bma 020 arrived and this time everything works, i can scan the address on i2c an receive a lot of 1 and 0 using the script above...

next step will be to make real numbers out of it...

sorry for bothering you with my hardware issues and thanks again for the great help!

dom
Logged

Worcester, MA
Offline Offline
God Member
*****
Karma: 3
Posts: 623
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Glad to hear it!
Logged

I2C GPS Shield

Checkout my Open Source GPS Tracker on Kickstarter

Pages: 1 [2]   Go Up
Jump to: