IOT123 - D1M BLOCK - TP4056 Assembly

About: The tension between novelty and familiarity...

Intro: IOT123 - D1M BLOCK - TP4056 Assembly

D1M BLOCKS add tactile cases, labels, polarity guides and breakouts for the popular Wemos D1 Mini SOC/Shields/Clones. This D1M BLOCK encapsulates a battery charger module. This D1M BLOCK was developed to test battery power for the D1M ESP12 BLOCK. This circuit will also warrant a PCB being developed.

The charging module was separated from the battery because I have 2 separate use cases at this stage: the coin cell battery (LIR2450) straddling an D1M ESP12 BLOCK and a standalone 18650 battery unit. This module was verified against the 18650 circuit as it could use the default 1A charging current. If using batteries with less capacity be sure to modify the RPROG resistor (chart above).

In developing this I tried using the D1 Mini protoboard and a standard universal PCB. The both incorrectly positioned the USB port to the casing, and the protoboard was missing footprint where needed. The 3D printed board is not an academic exercise; it solves several problems and simplifies the build.

NOTE: The pin contract has changed for this module. Subscribers (D1M BLOCKS) of this new contract are backward compatible with the standard pins, but this will only be able to used on blocks that conform to the new pin contract.

Step 1: Materials and Tools

There is a full Bill of Materials and Sources list.

  1. 3D printed parts (1)
  2. A set of D1M BLOCK - Install Jigs (1)
  3. A TP4056 module (1)
  4. Straight male headers (8)
  5. Right angle male headers (4)
  6. 1N5187 diode (4)
  7. 18650 Battery (1 for testing)
  8. 18650 Battery Holder (1 for testing)
  9. Hookup wire.
  10. Strong Cyanoachrylate Adhesive (preferably brush on)
  11. Hot glue gun and hot glue sticks
  12. Solder Flux
  13. Solder and Iron

Step 2: Preparing the Boards

    The TP4056

    1. Cut up the male pins and place in breadboard, long end down, as shown
    2. Place the TP4056 on the pins and solder. The pin spacing is not the same but there is enough play in the though holes for the module to fit.

    The 3D printed board (all gluing with Cyanoachrylate adhesive)

    1. On the topside of the 3D print, thread diodes through BLUE1 & BLUE2, BLUE3 & BLUE2, BLUE5 & BLUE6 and BLUE4 & BLUE6 as shown.
    2. On the topside of the 3D print, glue pin pads on TP4056, thread into GREEN (1-6) and clamp flat.

    3. When glue dry on the underside carefully bend TP4056 pins as shown.

    4. Glue pin pads on 4P right-angle pins and clamp to topside with oversize clamp plate on underside.
    5. For the 2 off 8P and 2 off 2P female headers:
      1. Glue area where pin meet plastic, including 5mm of pins
      2. Slide into underside holes on side rails
      3. Hold straight and tight until dry (approx. 10 seconds)
    6. When glue dry, on the topside bend pins at right-angles RED (1-4).

    Step 3: Hooking Up the Circuit

    1. On underside, flux and solder pins GREEN (1-6)
    2. On topside, flux and solder pins RED (1-4)

    3. On topside, bend and solder wire from underside BLUE2 to RED4

    4. On underside, bend solder and cut: BLUE6 to GREEN6, BLUE4 to YELLOW2, BLUE5 to YELLOW4, BLUE1 to GREEN3 and BLUE3 to GREEN4.

    5. On underside, hookup and solder GREEN5 to YELLOW1 and GREEN5 to YELLOW3.

    6. On underside, hookup and solder a black wire to GREEN1 and a red wire to GREEN3.

    7. Route those wires as shown to topside and solder black wire to RED3 and red wire to RED2.

    8. On underside, hookup and solder a black wire to GREEN2, route as shown to topside and solder to RED1.

    Step 4: Gluing the Component to the Base

    1. With the base casing bottom surface pointing down put a 1cm blog of glue centrally.
    2. Place the soldered assembly plastic header through the holes in the base.
    3. Push board down until pins are 0.25mm under top of casing and even then cool.
    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.

    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.
    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: Hooking Up the Circuit

    To test the circuit we will connect it to a battery and D1M ESP12 BLOCK, then charge via USB.

    The battery will normally use a 1000uF capacitor for this configuration; it wont be needed for this rudimentary test.

    The new pin contract will be used for future designs; breadboard wires are used for this test.

    NOTE: All the regular D1 Mini pins (2*8P) are floating, and act as a signal pass through for other D1M BLOCKS.

    1. Uploads a simple sketch (like blink using LED_BUILTIN) to the D1M ESP12 BLOCK using the D1M CH340G BLOCK.
    2. Connect 18650 battery to B+/B-
    3. Connect 5V /G pins on D1M ESP12 BLOCK to OUT+/OUT- (the sketch should function correctly)
    4. Connect the Micro USB on the TP4056 to a 5V power source (the sketch should function correctly)

    Step 8: Next Steps

    1. Try adding Solar panels to the IN pins (5V - 6V, 250mA)
    2. Look for the new D1M BLOCKS that will conform to this pin standard: D1M 18650 BLOCK & D1M ESP12 (PCB with LIR2450)

    Share

      Recommendations

      • Plastics Contest

        Plastics Contest
      • Audio Contest 2018

        Audio Contest 2018
      • Optics Contest

        Optics Contest

      Discussions