IOT123 - D1M BLOCK - ACAM2 Camera Assembly

659

10

Introduction: IOT123 - D1M BLOCK - ACAM2 Camera 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. The ArduCam 2MP camera allows flexible image/video capture with the ESP8266 chip (which the D1M BLOCKS are based on).

This Instructable steps through the assembly of the block and then tests the camera using the D1M WIFI BLOCK. There are comprehensive code examples on the ArduCam GIT pages.

dmainmon has provided a great software demo that gives a good cross-section of the ArduCam functionality (without modifying the original libraries).

Step 1: Material 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. ArduCam 2MP OV2640 module
    5. Hookup wire.
    6. Solder and Iron.
    7. Strong Cyanoachrylate Adhesive (preferably brush on)
    8. Hot glue gun and hot glue sticks

    Step 2: Soldering the Header Pins (using the SOCKET JIG)

    As the D1 Mini male pins will not be exposed on this D1M BLOCK, the socket jig can be used. As the excess male pins will be cut off, all the pins can be soldered in the initial position.

    1. Feed the header pins through bottom of the board (TX top-left on the top side).
    2. Feed jig over plastic header and level both surfaces.
    3. Turn jig and assembly over and firmly press header onto a hard flat surface.
    4. Press the board down firmly onto the jig.
    5. Solder the 4 corner pins using minimal solder (just temporary alignment of pins).
    6. Reheat and re position board/pins if needed (board or pins not aligned or plumb).
    7. Solder the rest of the pins.

    Step 3: Assembling the Shield

    1. The excess male pins from the headers can be cut off close to the solder.
    2. The following wires are traced on the topside of the board and soldered on the underside.
    3. Route and solder lower GND to rails GND (black).
    4. Route and solder lower VCC to rails 3V3 (red).
    5. Route and solder lower SDA to rails D2 (green).
    6. Route and solder lower SCL to rails D1 (blue).
    7. Route and solder lower MOSI to rails D7 (white).
    8. Route and solder lower MISO to rails D6 (yellow).
    9. Route and solder lower SCK to rails D5 (lime).
    10. Route and solder lower CS to rails D0 (brown).
    11. The ArduCam should have short male pins exposed on the underside of the board.
    12. Thread these pins through the lower holes on the shield as shown.
    13. Put temporary solder joints on the 2 lower corners withe the boards parallel and as close as possible.
    14. Bend the other pins onto the joints above and solder.
    15. Desolder the corner pins, bend them as above and solder.
    16. The bottom edge of the PCBs need to be level. This may mean trimming the ArduCam PCB. I did mine with coarse sand paper (80 grit) then filing. There is a trace on the edge - trim till even or see the trace copper. Be extremely careful with this as rough treatment may affect the optics.

    You can detour to step Testing with the D1M WIFI BLOCK just to verify the wiring, then return to next step. Careful aligning correct pins though...

    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.
    6. On some PCBs where the board ends close to the pins, dob a large amount of glue onto the base to the height of the PCB; when this cools apply more glue on the top of the PCB bridging to the lower glue.

    Step 5: Gluing the Lid to the Base

    1. Ensure the pins are free of 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

    The ArduCam GIT site gives a good overview of the library setup using the Arduino IDE. I have included ZIP versions of the libraries to make it a bit easier. The original GIT site for dmainmon's work is here. The sketch to upload is here.

    1. Read the ArduCam overview.
    2. Watch the videos.
    3. Install the libraries.
    4. Upload the sketch onto a D1M WIFI BLOCK.
    5. Disconnect the USB from the PC.
    6. Attach the D1M ACAM2 BLOCK to the D1M WIFI BLOCK.
    7. Connect the USB to the PC (for power and serial logging).
    8. Run the demo using AP or Station mode (explained in the videos).

    Step 8: Next Steps

    Share

      Recommendations

      • Metalworking Contest

        Metalworking Contest
      • Water Contest

        Water Contest
      • Creative Misuse Contest

        Creative Misuse Contest

      Discussions