logo elektroda
logo elektroda
X
logo elektroda

[BK7331N/CBU] Yieryi Water Quality Sensor BK7331N/CBU Teardown and PCB Analysis

stonacek 516 1
ADVERTISEMENT
  • Helpful post
    #1 21351483
    stonacek
    Level 5  
    Yieryi / YINMIK Water Quality Tester https://www.aliexpress.com/item/1005007948885789.html

    Powered by 6v, 250mA power supply

    Water quality tester with LED display and probe Water quality tester set with device and pH 4.00 and 6.86 calibration sachets.
    Water quality tester with three displays on a black casing.

    Similar to these two models, but this one is a bit more tidy.
    https://www.elektroda.com/rtvforum/topic4060619.html#21131658
    https://www.elektroda.com/rtvforum/topic4008803.html#20776297


    The PCB is a lot more graceful than the previous models and uses CBU chip:
    Yieryi / YINMIK water quality tester with an open case and visible PCB.Close-up view of a PCB with a CBU chip and other electronic components.
    Green PCB board with multicolored wires and electronic components in an open case. Close-up of a PCB with clearly visible electronic components on a water quality tester.


    CBU chip has to be removed to flash (or RX/TX cut).  Picture of CBU chip removed, showing the traces a bit more clearly.
    Close-up of a green PCB with various components, visible traces, and electronic elements.

    Collected the dpIds from tuya developer
    
    {
      "modelId": "0000047m9o",
      "services": [
        {
          "actions": [],
          "code": "",
          "description": "",
          "events": [],
          "name": "????",
          "properties": [
            {
              "abilityId": 1,
              "accessMode": "ro",
              "code": "tds_in",
              "description": "",
              "extensions": {
                "scope": "",
                "attribute": "1664"
              },
              "name": "TDS",
              "typeSpec": {
                "type": "value",
                "max": 100000,
                "min": 0,
                "scale": 3,
                "step": 1,
                "unit": "ppt"
              }
            },
            {
              "abilityId": 2,
              "accessMode": "ro",
              "code": "temp_current",
              "description": "",
              "extensions": {
                "attribute": "1152"
              },
              "name": "Temprt",
              "typeSpec": {
                "type": "value",
                "max": 800,
                "min": 0,
                "scale": 1,
                "step": 1,
                "unit": "?"
              }
            },
            {
              "abilityId": 7,
              "accessMode": "ro",
              "code": "battery_percentage",
              "description": "",
              "extensions": {
                "attribute": "1664"
              },
              "name": "BatteryValue",
              "typeSpec": {
                "type": "value",
                "max": 100,
                "min": 0,
                "scale": 0,
                "step": 1,
                "unit": "%"
              }
            },
            {
              "abilityId": 10,
              "accessMode": "ro",
              "code": "ph",
              "description": "",
              "extensions": {
                "iconName": "icon-p7",
                "attribute": "1152"
              },
              "name": "PH?",
              "typeSpec": {
                "type": "value",
                "max": 1400,
                "min": 0,
                "scale": 2,
                "step": 1
              }
            },
            {
              "abilityId": 11,
              "accessMode": "ro",
              "code": "conductivity_value",
              "description": "",
              "extensions": {
                "iconName": "icon-dp_mode",
                "attribute": "1152"
              },
              "name": "EC",
              "typeSpec": {
                "type": "value",
                "max": 200000,
                "min": 0,
                "scale": 3,
                "step": 1,
                "unit": "mS/cm"
              }
            },
            {
              "abilityId": 12,
              "accessMode": "ro",
              "code": "orp_value",
              "description": "",
              "extensions": {
                "iconName": "icon-tongji",
                "attribute": "1024"
              },
              "name": "ORP",
              "typeSpec": {
                "type": "value",
                "max": 1200,
                "min": -1200,
                "scale": 0,
                "step": 1,
                "unit": "mV"
              }
            },
            {
              "abilityId": 101,
              "accessMode": "rw",
              "code": "phbuffer",
              "description": "",
              "name": "pHBuffer",
              "typeSpec": {
                "type": "enum",
                "range": [
                  "AsiaStandard",
                  "EUStandard"
                ]
              }
            },
            {
              "abilityId": 102,
              "accessMode": "rw",
              "code": "holdreading",
              "description": "",
              "name": "HoldReading",
              "typeSpec": {
                "type": "bool"
              }
            },
            {
              "abilityId": 103,
              "accessMode": "rw",
              "code": "backlight",
              "description": "",
              "name": "BackLight",
              "typeSpec": {
                "type": "bool"
              }
            },
            {
              "abilityId": 104,
              "accessMode": "rw",
              "code": "ectempcompenabled",
              "description": "",
              "name": "EcTempCompEnabled",
              "typeSpec": {
                "type": "bool"
              }
            },
            {
              "abilityId": 105,
              "accessMode": "rw",
              "code": "ectempcomfactor",
              "description": "",
              "name": "EcTempCompFactor",
              "typeSpec": {
                "type": "value",
                "max": 30,
                "min": 0,
                "scale": 1,
                "step": 1,
                "unit": "%/?"
              }
            },
            {
              "abilityId": 106,
              "accessMode": "rw",
              "code": "buzzerwarning",
              "description": "",
              "name": "BuzzerWarning",
              "typeSpec": {
                "type": "bool"
              }
            },
            {
              "abilityId": 107,
              "accessMode": "rw",
              "code": "phmaxlimit",
              "description": "",
              "name": "pHMaxLimit",
              "typeSpec": {
                "type": "value",
                "max": 1400,
                "min": 0,
                "scale": 2,
                "step": 1,
                "unit": ""
              }
            },
            {
              "abilityId": 108,
              "accessMode": "rw",
              "code": "phminlimit",
              "description": "",
              "name": "pHMinLimit",
              "typeSpec": {
                "type": "value",
                "max": 1400,
                "min": 0,
                "scale": 2,
                "step": 1,
                "unit": ""
              }
            },
            {
              "abilityId": 109,
              "accessMode": "rw",
              "code": "ecmaxlimit",
              "description": "",
              "name": "EC???",
              "typeSpec": {
                "type": "value",
                "max": 200000,
                "min": 0,
                "scale": 3,
                "step": 1,
                "unit": "mS/cm"
              }
            },
            {
              "abilityId": 110,
              "accessMode": "rw",
              "code": "ecminlimit",
              "description": "",
              "name": "EC???",
              "typeSpec": {
                "type": "value",
                "max": 200000,
                "min": 0,
                "scale": 3,
                "step": 1,
                "unit": "mS/cm"
              }
            },
            {
              "abilityId": 111,
              "accessMode": "rw",
              "code": "orpmaxlimit",
              "description": "",
              "name": "OrpMaxLimit",
              "typeSpec": {
                "type": "value",
                "max": 1200,
                "min": -1200,
                "scale": 0,
                "step": 1,
                "unit": "mV"
              }
            },
            {
              "abilityId": 112,
              "accessMode": "rw",
              "code": "orpminlimit",
              "description": "",
              "name": "OrpMinLimit",
              "typeSpec": {
                "type": "value",
                "max": 1200,
                "min": -1200,
                "scale": 0,
                "step": 1,
                "unit": "mV"
              }
            },
            {
              "abilityId": 113,
              "accessMode": "ro",
              "code": "eccf",
              "description": "",
              "name": "CF",
              "typeSpec": {
                "type": "value",
                "max": 20000,
                "min": 0,
                "scale": 1,
                "step": 1,
                "unit": ""
              }
            },
            {
              "abilityId": 114,
              "accessMode": "ro",
              "code": "humidity",
              "description": "",
              "name": "Humidity",
              "typeSpec": {
                "type": "value",
                "max": 100,
                "min": 0,
                "scale": 0,
                "step": 1,
                "unit": "%"
              }
            },
            {
              "abilityId": 115,
              "accessMode": "rw",
              "code": "humiditymaxlimit",
              "description": "",
              "name": "HumidityMaxLimit",
              "typeSpec": {
                "type": "value",
                "max": 100,
                "min": 0,
                "scale": 0,
                "step": 1,
                "unit": "%"
              }
            },
            {
              "abilityId": 116,
              "accessMode": "rw",
              "code": "humidityminlimit",
              "description": "",
              "name": "HumidityMinLimit",
              "typeSpec": {
                "type": "value",
                "max": 100,
                "min": 0,
                "scale": 0,
                "step": 1,
                "unit": "%"
              }
            },
            {
              "abilityId": 117,
              "accessMode": "rw",
              "code": "temprtmaxlimit",
              "description": "",
              "name": "?????",
              "typeSpec": {
                "type": "value",
                "max": 800,
                "min": 0,
                "scale": 1,
                "step": 1,
                "unit": "?"
              }
            },
            {
              "abilityId": 118,
              "accessMode": "rw",
              "code": "temprtminlimit",
              "description": "",
              "name": "?????",
              "typeSpec": {
                "type": "value",
                "max": 800,
                "min": 0,
                "scale": 1,
                "step": 1,
                "unit": "?"
              }
            },
            {
              "abilityId": 119,
              "accessMode": "wr",
              "code": "reset",
              "description": "",
              "name": "??",
              "typeSpec": {
                "type": "value",
                "max": 100,
                "min": 0,
                "scale": 0,
                "step": 1,
                "unit": ""
              }
            },
            {
              "abilityId": 120,
              "accessMode": "ro",
              "code": "newprog",
              "description": "",
              "name": "NewProg",
              "typeSpec": {
                "type": "bool"
              }
            },
            {
              "abilityId": 121,
              "accessMode": "rw",
              "code": "tdsmultiple",
              "description": "",
              "name": "TDS??",
              "typeSpec": {
                "type": "value",
                "max": 100,
                "min": 50,
                "scale": 0,
                "step": 1,
                "unit": ""
              }
            },
            {
              "abilityId": 122,
              "accessMode": "rw",
              "code": "salttdshilimit",
              "description": "",
              "name": "SALT TDS??",
              "typeSpec": {
                "type": "value",
                "max": 100000,
                "min": 0,
                "scale": 3,
                "step": 1,
                "unit": "ppt"
              }
            },
            {
              "abilityId": 123,
              "accessMode": "rw",
              "code": "salttdslolimit",
              "description": "",
              "name": "SALT TDS??",
              "typeSpec": {
                "type": "value",
                "max": 100000,
                "min": 0,
                "scale": 3,
                "step": 1,
                "unit": "ppt"
              }
            },
            {
              "abilityId": 124,
              "accessMode": "rw",
              "code": "tdshilimit",
              "description": "",
              "name": "TDS??",
              "typeSpec": {
                "type": "value",
                "max": 100000,
                "min": 0,
                "scale": 3,
                "step": 1,
                "unit": "ppt"
              }
            },
            {
              "abilityId": 125,
              "accessMode": "rw",
              "code": "tdslolimit",
              "description": "",
              "name": "TDS??",
              "typeSpec": {
                "type": "value",
                "max": 100000,
                "min": 0,
                "scale": 3,
                "step": 1,
                "unit": "ppt"
              }
            },
            {
              "abilityId": 126,
              "accessMode": "ro",
              "code": "salt_tds",
              "description": "",
              "extensions": {
                "scope": ""
              },
              "name": "SALT TDS",
              "typeSpec": {
                "type": "value",
                "max": 100000,
                "min": 0,
                "scale": 3,
                "step": 1,
                "unit": "ppt"
              }
            }
          ]
        }
      ]
    }
    
    


    and the autoexec.bat with the relevant sensor (ignored a bunch of the others)
    
    setflag 19 1
    setflag 37 1
    
    // tuyaMCU store RAW data in /cm?cmnd=Dp
    setflag 46 1
    
    startDriver TuyaMCU
    // always report paired (wifi symbol on screen)
    tuyaMcu_defWiFiState 4
    
    // feyree baud 9600
    tuyaMcu_setBaudRate 9600
    
    // dpid 1 is TDS in Max 100000, scale 3, unit PPT
    setChannelType 1 Tds
    setChannelLabel 1 "Total Dissolved Solids"
    linkTuyaMCUOutputToChannel 1 val 1
    
    // dpid 2 is Temperature in Max 800, scale 1, unit c
    setChannelType 2 Temperature_div10
    setChannelLabel 2 "Temperature"
    linkTuyaMCUOutputToChannel 2 val 2
    
    // dpid 10 is PH in Max 1400, scale 2, unit ph
    setChannelType 3 Ph
    setChannelLabel 3 "PH"
    linkTuyaMCUOutputToChannel 10 val 3
    
    // dpid 11 is Conductivity in Max 200000, scale 3, EC unit mS/cm
    setChannelType 4 ReadOnly_div1000
    setChannelLabel 4 "Conductivity"
    linkTuyaMCUOutputToChannel 11 val 4
    
    // dpid 12 is ORP in Max 1200, scale 0, unit mv
    setChannelType 5 ORP
    setChannelLabel 5 "ORP"
    linkTuyaMCUOutputToChannel 12 val 5
    
    // dpid 103 is backlight bool
    setChannelType 8 Toggle
    setChannelLabel 8 "Backlight"
    linkTuyaMCUOutputToChannel 103 bool 8
    
    // dpid 113 is CF - Max 20000, scale 1, unit 
    setChannelType 13 ReadOnly_div10
    setChannelLabel 13 "CF"
    linkTuyaMCUOutputToChannel 113 val 13
    
    // dpid 114 is Humidity - Max 100, scale 0, unit %
    setChannelType 14 Humidity
    setChannelLabel 14 "Humidity"
    linkTuyaMCUOutputToChannel 114 val 14
    
    // dpid 126 is Salt TDS- Max 100000, scale 3, unit ppt
    setChannelType 26 Tds
    setChannelLabel 26 "Salt TDS"
    linkTuyaMCUOutputToChannel 126 val 26
    
    // get the current state of all dpIds to ensure the values get filled in
    tuyaMcu_sendQueryState
    
  • ADVERTISEMENT
ADVERTISEMENT