Guide Teardown and modification of Goldmedal's 16A Wi-Fi Smart Socket for Tasmota

This one looks like a promising contender when I searched for something easier to modify with a larger enclosure for better thermals since that was a concern with the Polycab smart plug.

goldmedal_16A-01.jpeg



A few screws and it happily comes apart:

goldmedal_16A-02.jpeg



This one uses the Tuya CB3S module, which isn't compatible with Tasmota, so it'll need to be replaced.

goldmedal_16A-03.jpeg



The wiring and overall quality is very reassuring:

goldmedal_16A-04.jpeg



Powering monitoring is with the BL0937 energy meter chip, the same as the Polycab smart plugs.

goldmedal_16A-05.jpeg



The Tuya module is on a carrier board that's on a header:

goldmedal_16A-06.jpeg



Careful with the pads as they might end up damaged during desoldering because they're so tiny:

goldmedal_16A-07.jpeg



A mica heatsink insulator helps with desoldering the castellations, just slide it underneath after heating up the pads two by two:

goldmedal_16A-08.jpeg



Still, unused pads might be lost:

goldmedal_16A-09.jpeg



The same technique can be used to salvage ESP12F modules from damaged or failed projects:

goldmedal_16A-10.jpeg



But the ESP12F isn't pin-compatible with the Tuya CB3S so we have to find something else, like this Wemos D1 Mini:

goldmedal_16A-12.jpeg

We could use the ESP12F without the carrier PCB, but that'll require additional components, a D1 mini is easier.

The tasmota template is based on the Polycab 16A one for simplicity:

Code:
{
"NAME":"209004",
"GPIO":[0,0,544,32,2720,2656,0,0,2624,320,224,0,0,0],
"FLAG":0,
"BASE":18
}



From top to bottom, we have HLWBL SEL_i, HLWBL CF1, BL0937 CF, Switch, Relay, Ground, +3.3V and LED.

goldmedal_16A-11.jpeg



Made a simple cover in OpenSCAD:

goldmedal_16A-20.jpeg

Modelling in OpenSCAD is done through code, which can be very intuitive:

Code:
$fn=100;
points=[[30,25,0],[30,0,0],[0,25,0],[0,0,0]];
module end() {
  cylinder(d=8, h=10);
}
module box(points, radius, height){
  /* hackaday.com/2018/02/13/openscad-tieing-it-together-with-hull */
  hull(){
    for (p = points){
      translate(p) cylinder(r=radius, h=height);
    }
  }
}
module peg() {
  translate([0, 0, 10]) {
    klam_fillet_cylinder(cylinder_height=5,
    cylinder_radius=2.3,
    fillet_radius_bottom=1,
    fillet_radius_top=0,
    nfaces=100);
  }
}
module klam_fillet_cylinder(
  cylinder_height=2,
  cylinder_radius=1,
  fillet_radius_bottom=1,
  fillet_radius_top=0,
  nfaces=100) {
  /* klamfx.wordpress.com/2016/12/03/creating-a-filleted-cylinder-in-openscad */
  union() {
    cylinder(cylinder_height, r=cylinder_radius, $fn=nfaces);
    if (fillet_radius_bottom > 0) {
      difference() {
        cylinder(fillet_radius_bottom,
        r=cylinder_radius+fillet_radius_bottom,
        $fn=nfaces);
        translate([0, 0, fillet_radius_bottom])
        rotate_extrude($fn=nfaces)
        translate([cylinder_radius+fillet_radius_bottom, 0, 0])
        circle(fillet_radius_bottom, $fn=nfaces);
      }
    }
    if (fillet_radius_top > 0) {
      difference() {
        translate([0,0,cylinder_height-fillet_radius_top])
        cylinder(fillet_radius_top,
        r=cylinder_radius+fillet_radius_top,
        $fn=nfaces);
        translate([0, 0, cylinder_height-fillet_radius_top])
        rotate_extrude($fn=nfaces)
        translate([cylinder_radius+fillet_radius_top, 0, 0])
        circle(fillet_radius_top, $fn=nfaces);
      }
    }
  }
}
union() {
  translate([-26, 0, 0]) {
    end();
    peg();
  }
  translate([26, 0, 0]) {
    end();
    peg();
  }
  difference() {
    hull() {
      translate([-15, -12.5, 0]) box(points, radius=4, height=10);
      translate([-26, 0, 0]) end();
      translate([26, 0, 0]) end();
    }
    translate([-15, -12.5, 2]) box(points, radius=2, height=8);
  }
}



And then 3d-printed:

goldmedal_16A-13.jpeg



Iterations, the left-most one is my first 3d print ever:

goldmedal_16A-14.jpeg



It helps to have a well-tuned 3d printer, it took a couple of days:

goldmedal_16A-15.jpeg



The fillets on the pegs need the screw holes to be slightly countersunk for a good fit:

goldmedal_16A-16.jpeg



It took about 8 iterations to get a snug friction fit:

goldmedal_16A-17.jpeg



Looking good:

goldmedal_16A-18.jpeg



The translucent "natural" PLA filament was so worth it:

goldmedal_16A-19.jpeg



All done. Next, calibration: https://tasmota.github.io/docs/Power-Monitoring-Calibration/
 
Last edited: