Intro: IOT123 - D1M BLOCK - GY521 Assembly
D1M BLOCKS add tactile cases, labels, polarity guides and breakouts for the popular Wemos D1 Mini SOC/Shields/Clones. This D1M BLOCK gives a simple hookup between the Wemos D1 Mini and the GY-521 module (the Address and Interrupt pins can be hooked up to your own requirements).
My initial motivation for developing the D1M BLOCK was for independent verification of a solar tracking controller.
This Gysoscope/Accelerometer (GY-521 module) is touted as having these applications:
- Athletic games measurement
- Augmented reality
- Electron Image (EIS: Electronic Image Stabilization)
- Optical Image (OIS: Optical Image Stabilization)
- Pedestrians navigator
- The zero touch gestures user interface
- Posture shortcut 8. Intelligent mobile phone
- Tablet devices
- Handheld game products
- 3D remote control
- Portable navigation devices
This Instructable steps through the assembly of the block and then tests the Pitch, Roll and Yaw measurements using the D1M WIFI BLOCK.
Step 1: Materials and Tools
Step 2: Soldering the Header Pins (using the PIN JIG)
There is a video above that runs through the solder process for the PIN JIG.
- Feed the header pins through bottom of the board (TX right-left) and into the solder jig.
- Press the pins down onto a hard flat surface.
- Press the board down firmly onto the jig.
- Solder the 4 corner pins.
- Reheat and re position board/pins if needed (board or pins not aligned or plumb).
- Solder the rest of the pins
Step 3: Assembling the Shield
As the GY-521 module will block you from soldering through holes on the top-side, the following strategy works: on the underside, solder over the through-hole, then remelt and push end of wire through the hole and remove heat.
- Solder 8P header that came with module onto GY-521.
- Place module onto shield and solder (ensuring equal side pin clearance).
- Bend 4 pins and cut the remaining pins.
- Place and solder 3V3 to VCC (red).
- Place and solder GND to GND (black).
- Place and solder D1 to SCL (blue).
- Place and solder D2 to SDA (green).
If you are going to connect the Address and Interrupt pins, now's the time to do it.
Step 4: Gluing the Component to the Base
Not covered in the video, but recommended: put a large dob of hot glue in the empty base before quickly inserting board and aligning - this will create compression keys on either side of the board. Please do a dry run in placing the shields in the base. If the gluing was not very accurate, you may need to do some light filing of the edge of the PCB.
- With the base casing bottom surface pointing down, place the soldered assembly plastic header through the holes in the base; the (TX pin will be on side with the central groove).
- Place the hot glue jig under the base with the plastic headers placed through its grooves.
- Sit the hot glue jig on a firm flat surface and carefully push the PCB down until the plastic headers hit the surface; this should have the pins positioned correctly.
- When using the hot glue keep it away from the header pins and at least 2mm from where the lid will be positioned.
- Apply glue to all 4 corners of the PCB ensuring contact with the base walls; allow seepage to both sides of the PCB if possible.
Step 5: Gluing the Lid to the Base
- Ensure the pins are free of glue and the top 2mm of the base is free of hot glue.
- Pre-fit the lid (dry run) making sure no print artifacts are in the way.
- Take appropriate precautions when using the Cyanoachrylate adhesive.
- Apply Cyanoachrylate to the bottom corners of the lid ensuring coverage of the adjacent ridge.
- Quickly fit the lid to the base; clamping shut the corners if possible (avoiding the lens).
- After the lid is dry manually bend each pin so it is central in the void if necessary (see video).
Step 6: Adding the Adhesive Labels
- Apply pinout label on underside of base, with RST pin on side with groove.
- Apply identifier label on flat non-grooved side, with the pins void being the top of the label.
- Press labels down firmly, with a flat tool if needed.
Step 7: Testing With the D1M WIFI BLOCK
For this test you will need:
- A D1M GY521 BLOCK
- A D1M WIFI BLOCK
- In the Arduino IDE install the I2CDev and MPU6050 libraries (zips attached)
- Upload the the test sketch onto theD1M WIFI BLOCK.
- Disconnect the USB from the PC.
- Attach the D1M GY521 BLOCK to the D1M WIFI BLOCK
- Connect the USB to the PC.
- Open the Arduino console window at the baud identified in the sketch.
- Move the BLOCKs around in space and check that the console values reflect the movements.