Introduction: IOT123 - D1M BLOCK - ADXL345 Assembly

About: The tension between novelty and familiarity...

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 ADXL345 Accelerometer module.

My initial motivation for developing the D1M BLOCK was for independent verification of a solar tracking controller.

In order to acheive this I needed to track Yaw and Roll. This module does not compute Yaw, so I packaged the D1M GY521 BLOCK.

This Accelerometer (GY-521 module) is touted to measure the static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion or shock. Its high resolution (4 mg/LSB) enables measurement of inclination changes less than 1.0 degrees.

This Instructable steps through the assembly of the block and then runs the sensortest example using the D1M WIFI BLOCK.

Step 1: Materials and Tools

    There is now a full Bill of Materials and Sources list.

    1. The Wemos D1 Mini Protoboard shield and long pin female headers
    2. 3D printed parts.
    3. A set of D1M BLOCK - Install Jigs
    4. A ADXL345 module
    5. Hookup wire.
    6. Strong Cyanoachrylate Adhesive (preferably brush on)
    7. Hot glue gun and hot glue sticks
    8. Solder and Iron

    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.

    1. Feed the header pins through bottom of the board (TX right-left) and into the solder jig.
    2. Press the pins down onto a hard flat surface.
    3. Press the board down firmly onto the jig.Solder the 4 corner pins.
    4. Reheat and re position board/pins if needed (board or pins not aligned or plumb).
    5. Solder the rest of the pins

    Step 3: Assembling the Shield

    As the ADXL345 module will block you from soldering through holes on the top-side, the following strategy works for the power wires: on the underside, solder over the through-hole, then remelt and push end of wire through the hole and remove heat.

    1. Solder 8P header that came with module onto ADXL345.
    2. Place module onto shield and solder all but top 2 pins (ensuring side pin clearance).
    3. Bend SCL and SDA pins so that they will enter the D1 and D2 through holes. Bend into the through holes and solder
    4. Bend the bottom 2 pins toward the GND and 3V3 through holes.
    5. Place and solder GND to GND (black).
    6. Place and solder VCC to 3V3 (red).

    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.

    1. 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).
    2. Place the hot glue jig under the base with the plastic headers placed through its grooves.
    3. 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.
    4. When using the hot glue keep it away from the header pins and at least 2mm from where the lid will be positioned.
    5. 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

    1. Ensure the pins are free of hot glue and the top 2mm of the base is free of hot glue.
    2. Pre-fit the lid (dry run) making sure no print artifacts are in the way.
    3. Take appropriate precautions when using the Cyanoachrylate adhesive.
    4. Apply Cyanoachrylate to the bottom corners of the lid ensuring coverage of the adjacent ridge.
    5. Quickly fit the lid to the base; clamping shut the corners if possible (avoiding the lens).
    6. 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

    1. Apply pinout label on underside of base, with RST pin on side with groove.
    2. Apply identifier label on flat non-grooved side, with the pins void being the top of the label.
    3. Press labels down firmly, with a flat tool if needed.

    Step 7: Testing With the D1M WIFI BLOCK

    For this test you will need:

    1. A D1M GY521 BLOCK


    1. In the Arduino IDE install the Adafruit_ADXL345 library (zip attached)
    2. Load and upload the example sketch (File > Examples > Adafruit ADXL345 > Sensortest).
    3. Disconnect the USB from the PC.
    4. Attach the D1M ADXL345 BLOCK to the D1M WIFI BLOCK

    The test:

    1. Connect the USB to the PC.
    2. Open the Arduino console window at the baud identified in the sketch.
    3. Move the BLOCKs around in space and check that the console values reflect the movements.

    Step 8: Next Steps