Hello,
I bought recently an I2C accelerometer. This involves the BMA020 that is built on a board with level converters and various other components, but no other processors. The problem is that I get the part not running. I do not know if the circuit is constructed correctly. Here is the datasheet of BMA020:
http://www.mikrocontroller.net/attachme ... 080114.pdf
and here is a circuit diagram of the circuit board:
http://teamohnename.bplaced.net/pictures/SP_3DBS.JPG
The program looks like this:
http://teamohnename.bplaced.net/picture ... ted%29.nxc
It is the program for controlling the Wii Nunchuk at the NXT, but changed to the values and addresses of BMA020. Another major problem is that I do not know how to send and read nack and acks.
If you could look at you perhaps?
Thank you and
Regards
diphthong
Problem with I2C accelerometer BMA020
Re: Problem with I2C accelerometer BMA020
Hi,
Can you tell us how you wired the sensor board to the NXT? And what is the voltage on the data and clock lines? What kind of error does the sensor generate?
Can you tell us how you wired the sensor board to the NXT? And what is the voltage on the data and clock lines? What kind of error does the sensor generate?
My blog: nxttime.wordpress.com
Re: Problem with I2C accelerometer BMA020
Hello,
the board is connected as follows:
Board: GND - GND NXT
SDO - GND
SDI - SDA NXT, 82K Pullup (blue)
SCK - SCL NXT, 82K Pullup (yellow)
CSB - Vdd (ca. +5V) (green)
GND - GND
INT - 470R resistor, LED (The LED lights continuously)
UPullup - nowhere
Enable - nowhere
UIN - Vdd
If the program is not started, are at SCL and SDA 2V, when it is started, at SCL and SDA 2.9 V.
The sensor itself does not generate error messages, the program does not depend on, but there is no video. The program does not even come into the for loop. PlayTone (2000.50); is played, but the second in the for loop will not play. Is there any Problme with the level converters? Could help a PCA9517?
Thank you for your help and
Regards
diphthong
the board is connected as follows:
Board: GND - GND NXT
SDO - GND
SDI - SDA NXT, 82K Pullup (blue)
SCK - SCL NXT, 82K Pullup (yellow)
CSB - Vdd (ca. +5V) (green)
GND - GND
INT - 470R resistor, LED (The LED lights continuously)
UPullup - nowhere
Enable - nowhere
UIN - Vdd
If the program is not started, are at SCL and SDA 2V, when it is started, at SCL and SDA 2.9 V.
The sensor itself does not generate error messages, the program does not depend on, but there is no video. The program does not even come into the for loop. PlayTone (2000.50); is played, but the second in the for loop will not play. Is there any Problme with the level converters? Could help a PCA9517?
Thank you for your help and
Regards
diphthong
Re: Problem with I2C accelerometer BMA020
According to the spec. sheet you provided the max. voltage is 3.6 but you are using 5v. Are you using a resistor or diode to drop the voltage reaching the chip?
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
Re: Problem with I2C accelerometer BMA020
The BMA020 even tolerate only 3.6 V, but it's a linear controller installed (see diagram):
http://teamohnename.bplaced.net/pictures/SP_3DBS.JPG
So the board 2.5V to 6V tolerate.
http://teamohnename.bplaced.net/pictures/SP_3DBS.JPG
So the board 2.5V to 6V tolerate.
Re: Problem with I2C accelerometer BMA020
Hi,
Voltage isn't the issue, as you say there is a voltage regulater on the board. It seems there are also pullups installed on the board (R6 & R8), so you do not have to use your own pullups.
I had simular problems with the sensor I made. This was also a 3.5V sensor and it also gave something like 2V on the SCL and SDA lines. In my case the internal inline 4.K resistors that the NXT has on the I2C lines were the cause of the problem. Once I soldered over them the sensor worked fine. These resistors are there to protect the NXT from abuse, so be very carefull when you mess with them.
Concerning the code. When there are problems it is always good to throw away as much code as possible. This gives you (and us) a better idea about the exact location the problems arise. Also, I would check the I2C functions in the manual. Maybe they provide return codes (I don't know as I use another language). these return codes can give you additional information about the nature of the problem.
Succes
Voltage isn't the issue, as you say there is a voltage regulater on the board. It seems there are also pullups installed on the board (R6 & R8), so you do not have to use your own pullups.
I had simular problems with the sensor I made. This was also a 3.5V sensor and it also gave something like 2V on the SCL and SDA lines. In my case the internal inline 4.K resistors that the NXT has on the I2C lines were the cause of the problem. Once I soldered over them the sensor worked fine. These resistors are there to protect the NXT from abuse, so be very carefull when you mess with them.
Concerning the code. When there are problems it is always good to throw away as much code as possible. This gives you (and us) a better idea about the exact location the problems arise. Also, I would check the I2C functions in the manual. Maybe they provide return codes (I don't know as I use another language). these return codes can give you additional information about the nature of the problem.
Succes
My blog: nxttime.wordpress.com
Re: Problem with I2C accelerometer BMA020
Do you think I should open the NXT and unsolder the resistors? I do not really want so much. Is not there another way?
Thanks and
Greetings
diphthong
Thanks and
Greetings
diphthong
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: Problem with I2C accelerometer BMA020
That is going to the extreme. In aswin0's case, it was concluded to be the only option (besides using a mediator), and he decided to take the risks. He had done a lot of experimental work (as you would know if you read through the pages of his experiences) before doing so.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Who is online
Users browsing this forum: No registered users and 1 guest