Hi everyone.
I would like to add a teardow of a generic tuya smartplug based on a wb2s.
I have bought this device some time ago from aliexpress:
It came with tuya 1.3.5 and I installed OpenBeken using tuya cutter for a BK7231T and selected the Generic Tuya NAS WR07W 16A smart plug.
Seems quite similar to LSPA7 https://www.elektroda.com/rtvforum/topic3932742.html#20300613 or Model: PE-01E IP44 https://www.elektroda.com/rtvforum/topic3927458.html
From outside is identical to LSPA9, but the led is blue instead of purple such as LSPA9.
It is based on a WB2S with BK7231T and a BL0937 to monitor electrical parameters such as voltage, intensity and power consumption.
Unfortunatelly there is not brand or label on the outside or even on the PCB.
Button is connected to PIN 1TX
LED(negative) is connected to PIN PWM0
I've used configuration from Model: LSPA7 and modified button pin to 11
Pin 6: WifiLED_n on channel 0
Pin 7: BL0937CF on channel 0
Pin 8: BL0937CF1 on channel 0
Pin 11: Button on channel 0
Pin 24: BL0937SEL on channel 1
Pin 26: Relay on channel 0
I followed this guide: https://www.elektroda.com/rtvforum/topic3887748.html to calibrate the device.
I didn't have a power meter close so I'll use my multimeter as an approach to calibrate this with a 100W bulb as a load.
Without load it measures:
But multimeter shows 227V, so in the log tab of the app I entered this value:
And got Voltage correction:
So, I went on and turned on the bulb
Voltage is corrected but not power and current
Power should be 100W so in the log tab I did the same with power:
If we consider P=V*I, current should be 100/228=0.44A
Theese corrections will be added automatically, so you won't need the following steps.
Thanks to p.kaczmarek2 for the help.
I would like to add a teardow of a generic tuya smartplug based on a wb2s.
I have bought this device some time ago from aliexpress:
![[BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937) [BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937)](https://obrazki.elektroda.pl/2874186000_1675199914_thumb.jpg)
It came with tuya 1.3.5 and I installed OpenBeken using tuya cutter for a BK7231T and selected the Generic Tuya NAS WR07W 16A smart plug.
Seems quite similar to LSPA7 https://www.elektroda.com/rtvforum/topic3932742.html#20300613 or Model: PE-01E IP44 https://www.elektroda.com/rtvforum/topic3927458.html
From outside is identical to LSPA9, but the led is blue instead of purple such as LSPA9.
![[BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937) [BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937)](https://obrazki.elektroda.pl/5025441900_1675278134_thumb.jpg)
![[BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937) [BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937)](https://obrazki.elektroda.pl/2777348200_1675199994_thumb.jpg)
![[BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937) [BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937)](https://obrazki.elektroda.pl/3310023500_1675200015_thumb.jpg)
It is based on a WB2S with BK7231T and a BL0937 to monitor electrical parameters such as voltage, intensity and power consumption.
![[BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937) [BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937)](https://obrazki.elektroda.pl/1561169700_1675200022_thumb.jpg)
![[BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937) [BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937)](https://obrazki.elektroda.pl/7895902400_1675200211_thumb.jpg)
Unfortunatelly there is not brand or label on the outside or even on the PCB.
![[BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937) [BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937)](https://obrazki.elektroda.pl/4349331600_1675278090_thumb.jpg)
![[BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937) [BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937)](https://obrazki.elektroda.pl/1894806900_1675278090_thumb.jpg)
![[BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937) [BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937)](https://obrazki.elektroda.pl/9741201600_1675200352_thumb.jpg)
![[BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937) [BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937)](https://obrazki.elektroda.pl/1156257200_1675204728_thumb.jpg)
![[BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937) [BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937)](https://obrazki.elektroda.pl/3537151800_1675204729_thumb.jpg)
Button is connected to PIN 1TX
LED(negative) is connected to PIN PWM0
I've used configuration from Model: LSPA7 and modified button pin to 11
Pin 6: WifiLED_n on channel 0
Pin 7: BL0937CF on channel 0
Pin 8: BL0937CF1 on channel 0
Pin 11: Button on channel 0
Pin 24: BL0937SEL on channel 1
Pin 26: Relay on channel 0
![[BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937) [BK7231T / WB2S] Teardown generic tuya Smart Plug with Energy Meter (BL0937)](https://obrazki.elektroda.pl/4675672200_1675278405_thumb.jpg)
I followed this guide: https://www.elektroda.com/rtvforum/topic3887748.html to calibrate the device.
I didn't have a power meter close so I'll use my multimeter as an approach to calibrate this with a 100W bulb as a load.
Without load it measures:
Quote:BL0937 Voltage=194.169738, Current=0.000000, Power=0.000000
But multimeter shows 227V, so in the log tab of the app I entered this value:
Quote:VoltageSet 227
And got Voltage correction:
Quote:Info:EnergyMeter:VoltageSet: you gave 227.000000, set ref to 0.145886
So, I went on and turned on the bulb
Quote:BL0937 Voltage=227.583541, Current=0.358631, Power=72.000000
Voltage is corrected but not power and current
Power should be 100W so in the log tab I did the same with power:
Quote:PowerSet 100
Info:EnergyMeter:PowerSet: you gave 100.000000, set ref to 1.666666
If we consider P=V*I, current should be 100/228=0.44A
Quote:CurrentSet 0.44
Info:EnergyMeter:CurrentSet: you gave 0.439999, set ref to 0.012941
Theese corrections will be added automatically, so you won't need the following steps.
Thanks to p.kaczmarek2 for the help.
Spoiler:
So I got 3 corrections for BL0937 chip:
It's time to make these values permanent, so in app page filesystem tab I created a autoexec.bat file and added these lines:
The only thing that I couldn't make work is enable or disable relay when I push the button.
But I think that I missed something because I am a OpenBeken newbie.
So I got 3 corrections for BL0937 chip:
Quote:VREF 0.145886
IREF 0.012941
PREF 1.666666
It's time to make these values permanent, so in app page filesystem tab I created a autoexec.bat file and added these lines:
startDriver BL0937
VREF 0.145886
IREF 0.012941
PREF 1.666666
The only thing that I couldn't make work is enable or disable relay when I push the button.
But I think that I missed something because I am a OpenBeken newbie.
Cool? Ranking DIY