Introduction: IOT123 - D1M BLOCK - ACAM2 Camera Assembly
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).
Step 1: Material 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
- ArduCam 2MP OV2640 module
- Hookup wire.
- Solder and Iron.
- Strong Cyanoachrylate Adhesive (preferably brush on)
- 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.
- Feed the header pins through bottom of the board (TX top-left on the top side).
- Feed jig over plastic header and level both surfaces.
- Turn jig and assembly over and firmly press header onto a hard flat surface.
- Press the board down firmly onto the jig.
- Solder the 4 corner pins using minimal solder (just temporary alignment of 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
- The excess male pins from the headers can be cut off close to the solder.
- The following wires are traced on the topside of the board and soldered on the underside.
- Route and solder lower GND to rails GND (black).
- Route and solder lower VCC to rails 3V3 (red).
- Route and solder lower SDA to rails D2 (green).
- Route and solder lower SCL to rails D1 (blue).
- Route and solder lower MOSI to rails D7 (white).
- Route and solder lower MISO to rails D6 (yellow).
- Route and solder lower SCK to rails D5 (lime).
- Route and solder lower CS to rails D0 (brown).
- The ArduCam should have short male pins exposed on the underside of the board.
- Thread these pins through the lower holes on the shield as shown.
- Put temporary solder joints on the 2 lower corners withe the boards parallel and as close as possible.
- Bend the other pins onto the joints above and solder.
- Desolder the corner pins, bend them as above and solder.
- 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.
- 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.
- 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
- 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
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.
- Read the ArduCam overview.
- Watch the videos.
- Install the libraries.
- Upload the sketch onto a D1M WIFI BLOCK.
- Disconnect the USB from the PC.
- Attach the D1M ACAM2 BLOCK to the D1M WIFI BLOCK.
- Connect the USB to the PC (for power and serial logging).
- Run the demo using AP or Station mode (explained in the videos).