Hi all,
I am currently working on a project that will use 4 GY521s to get data on four moving planes. I had some difficulty getting two of these devices to work. In fact, the documentation stated that I can toggle pin AD0 to to Vcc to get the alternate x69 address, but since my Vcc is 5v I think I fried the AD0 input on that GY521.
I tested with a second GY521, but this time connecting pin AD0 to the Arduino's 3v3 line and I was able to successfully toggle between x68 and x69. I tried the same procedure with the first GY521, but the address does not toggle at all.
I have been researching on how to handle four GY521s, but the information is skecthy. The main source of information is here on the Ardini.cc Website:
http://playground.arduino.cc/Main/MPU-6050There it makes reference to using the AUX_DA and AUX_CL pins for the auxiliary i2c bus, but I did not find any further info to look into this further on how the hardware is hookup and software considerations. This same page makes mention of a trick where the AD0 line is controlled by the Arduino, setting all devices to x69 and then using a round robin technique to toggle the GY521's address to x68, read the data and then toggle it back to x69.
Although this is something I am willing to try, it will have to wait till more GY521s arrive, as I mentioned before, I manged to fry the AD0 pin of one of the GY521s that I have and it seems locked at address x68. In fact, this same page explicitly mentions that the AD0 line should be tied to 3v3 to select x69, not 5v. How did I miss that?
Another resource mentions using a 74HC4051 demux to toggle the address to x69 while keeping all other devices at address x68. While this looks like a good solution for many (many) GY521s, I feel that with using 4 devices I can control the AD0 line directly from the Arduino with using the demux.
https://www.youtube.com/watch?v=-1jH54xWzGMWhile I feel comfortable controlling the AD0 line with the Arduino, I'll have to wait for the rest of the units to arrive, since I currently have only one device that will toggle.
I would like to look into using the auxiliary i2c buss. Where can I find more information about this? Maybe everyone just uses the trick with the AD0 line. My GY521s have 2.2K pull up resistors on the SDA and SCL lines. This works nicely with two devices, but will I have to do anything differently withthe resistance when I add two more devices to the i2c buss?
Thank you for taking the time to read this post and for any help provided. Salvador