Introduction: IOT123 - D1M BLOCK - ADXL345 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 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.
- The Wemos D1 Mini Protoboard shield and long pin female headers
- 3D printed parts.
- A set of D1M BLOCK - Install Jigs
- A ADXL345 module
- Hookup wire.
- Strong Cyanoachrylate Adhesive (preferably brush on)
- Hot glue gun and hot glue sticks
- 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.
- 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 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.
- Solder 8P header that came with module onto ADXL345.
- Place module onto shield and solder all but top 2 pins (ensuring side pin clearance).
- Bend SCL and SDA pins so that they will enter the D1 and D2 through holes. Bend into the through holes and solder
- Bend the bottom 2 pins toward the GND and 3V3 through holes.
- Place and solder GND to GND (black).
- 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.
- 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 hot 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 Adafruit_ADXL345 library (zip attached)
- Load and upload the example sketch (File > Examples > Adafruit ADXL345 > Sensortest).
- Disconnect the USB from the PC.
- Attach the D1M ADXL345 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.
Step 8: Next Steps
We have a be nice policy.
Please be positive and constructive.