3
\$\begingroup\$

I am searching for a non-technical picture or diagram or explicit textual instructions explaining how to wire a GY-521 Accelerometer/Gyro to an Arduino Uno R3.

I am a software developer and need something that doesn't assume that I know how to do it already. Searching Google has only found diagrams that I can't read or textual instructions where the terms don't match up to the names on the pins on the Uno R3.

Arduino +5V to VCC on GY-521 and to Hv on the Logic Level Converter
Arduino +3.3V to Lv on the Logic Level Converter
Arduino GND to GND on Gy-521 and both GNDs on the Logic Level Converter
Arduino analog input pin A4 to ch1 Tx on Hv side and ch1 Tx on the Lv side to SDA on GY-521
Arduino analog input pin A5 to ch2 Tx on Hv side and ch2 Tx on the Lv side to SCL on GY-521

I don't know what they are talking about ch1 Tx and Logic Level Converter.

The version of the board I have is +5V compatible using the +5V from the Uno as it has a voltage regulator on it already.

enter image description here

\$\endgroup\$
4
  • 2
    \$\begingroup\$ How about a list of the mystery names, and we'll help you figure out where they go on the uno. \$\endgroup\$ Mar 18 '13 at 1:41
  • \$\begingroup\$ Whoever gave you that connection diagram wants you to use an additional level translator board in between. So the real problems seems to be not finding the mentioned pins on the Arduino, but sourcing that module, a substitute, or coming up with some other trickier approach (modifying the Arduino to run at 3.3v? current limiting resistors to keep things in the allowance of protection diodes?) \$\endgroup\$ Mar 18 '13 at 4:19
  • \$\begingroup\$ regardless what you were told, the fact remains that the gyro board operates at 3.3V.... \$\endgroup\$
    – vicatcu
    Mar 18 '13 at 22:39
  • \$\begingroup\$ the board I have, actually says to run it off the 5V as it has a pull down on the sensor board, and that 3.3V won't be enough to power it reliably with that pulldown that is on the board already. \$\endgroup\$
    – user11995
    Mar 18 '13 at 22:52
5
\$\begingroup\$

I presume you have seen this page. If not it's probably a good place to start. All you should need to do to talk to that GY-521 chip is to hook up the I2C pins. On the Arduino UNO R3, you can see these pins, which are named SDA (for S erial DA ta) and SCL (for S erial CL ock), labelled on the back of the board, as depicted in this photo from the Arduino informational page for the board.

enter image description here

You will also need to connect GND (which means Electrical Ground in electrical speak) between the GY-521 and the Arduino UNO, and you will need to 5V (which means positive five volts) to the sensor module.

Now, I think based on this schematic:

enter image description here

... that the sensor module actually operates at 3.3V, so you will probably run into some voltage level problems making the two devices communicate. Luckily, this problem is easily solved with a couple of transistors as described in excruciating detail on this page (and various answers to similar questions on this site).

\$\endgroup\$
1
  • 3
    \$\begingroup\$ No transistors are needed. 3.3V is considered a valid logic "HIGH" for a 5V Arduino UNO, so just connect the pins directly to the SCL and SDA pins, as indicated on the back side of the Arduino UNO. Note that this only works because i2C is open-drain, thus the 5V-powered ATMega328p on the Arduino is never actually driving those pins to 5V; it simply lets them float up to 3.3 (note the pull-up resistors on the accelerometer module are connected to the internally-generated 3.3V supply). \$\endgroup\$ Apr 5 '16 at 21:19