Basic Information:
Brand: UJV
Model: Ufairy
Chip: WB3S
Vendor: Amazon(bought in January 2023 for about $25)
This device is very similar to the one described here. However there are some differences that I want to allude to.
Teardown photos
The housing comes off easily, I just had to undo 4 screws. The inside looks quite neat
The valve's brain is a WB3S module. So I decided to program it using a UART programmer. I connected the RX, TX, VCC, GND pins as usual. The peculiarity is that the CEN pin is permanently soldered to GND, so I had to cut the trace. Not sure if it needed, b/c I ended up not using the CEN at all. I used the BK7231 GUI Flash Tool from here and the OpenBK7231T_UA_1.15.450.bin firmware. At first I could not connect to module using the procedure described, shortening the CEN pin did noting but rebooted the UART adapter. This is why i attempted to cut the trace. This didn't help either (maybe), so I ended up removing and reconnecting back VCC. After a few attempts the module connected and everything went fine.
Pin Definitions
Pin definitions are different from the ones here
P14-> Rel
P24->LED
P26->Btn
Improvements (Verschlimmbesserungen)
Since this valve is planned to be used in a critical application - namely be the main shut off valve in my conservatory (not the musical one, the one with plants), I decided I need to monitor its status. Conveniently there are many unused GPIOs on the module and two limit switches.
Inconveniently the switches are driven by 12V, so I made a resistive divider. You'd need to come down from 12V to 3V, so R1=3*R2. I had a 30k SMD and a 10k trough-hole laying around, so that's what I used.
The 30k resistor is connected to the NO contact of the respective limit switch. After soldering verify that the total resistance between NO and GND is whatever you designed (40k in my case), and between NO and GPIO - 3/4 of that. Then I configured the corresponding GPIOs (I used PWM2 and PWM1) as inputs.
But there come some troubles, maybe pan Kaczmarek can help: the module doesn't seem to poll the state of the inputs while the relay pin is active. So I would expect the input states to be 1/0 when closed, 0/0 when moving, 0/1 when open. Instead I see that then opening the valve, "open" activates the moment "closed" deactivates and stays so while the actuator is moving and in the open state. When moving to the closed state "open" deactivates right away, both inputs stay low while moving and "closed" activates when the valve is closed.
Brand: UJV
Model: Ufairy
Chip: WB3S
Vendor: Amazon(bought in January 2023 for about $25)
![[WB3S/BK7231T] Tuya Smart Valve (UJV Ufairy) teardown and modification [WB3S/BK7231T] Tuya Smart Valve (UJV Ufairy) teardown and modification](https://obrazki.elektroda.pl/5771107800_1678386680_thumb.jpg)
This device is very similar to the one described here. However there are some differences that I want to allude to.
the usual disclaimer: electricity kills (some), always remove power, tear down at your own risk, etc.
Teardown photos
The housing comes off easily, I just had to undo 4 screws. The inside looks quite neat
![[WB3S/BK7231T] Tuya Smart Valve (UJV Ufairy) teardown and modification [WB3S/BK7231T] Tuya Smart Valve (UJV Ufairy) teardown and modification](https://obrazki.elektroda.pl/5832653300_1678386717_thumb.jpg)
![[WB3S/BK7231T] Tuya Smart Valve (UJV Ufairy) teardown and modification [WB3S/BK7231T] Tuya Smart Valve (UJV Ufairy) teardown and modification](https://obrazki.elektroda.pl/2353938400_1678386726_thumb.jpg)
The valve's brain is a WB3S module. So I decided to program it using a UART programmer. I connected the RX, TX, VCC, GND pins as usual. The peculiarity is that the CEN pin is permanently soldered to GND, so I had to cut the trace. Not sure if it needed, b/c I ended up not using the CEN at all. I used the BK7231 GUI Flash Tool from here and the OpenBK7231T_UA_1.15.450.bin firmware. At first I could not connect to module using the procedure described, shortening the CEN pin did noting but rebooted the UART adapter. This is why i attempted to cut the trace. This didn't help either (maybe), so I ended up removing and reconnecting back VCC. After a few attempts the module connected and everything went fine.
Pin Definitions
Pin definitions are different from the ones here
P14-> Rel
P24->LED
P26->Btn
Improvements (Verschlimmbesserungen)
Since this valve is planned to be used in a critical application - namely be the main shut off valve in my conservatory (not the musical one, the one with plants), I decided I need to monitor its status. Conveniently there are many unused GPIOs on the module and two limit switches.
![[WB3S/BK7231T] Tuya Smart Valve (UJV Ufairy) teardown and modification [WB3S/BK7231T] Tuya Smart Valve (UJV Ufairy) teardown and modification](https://obrazki.elektroda.pl/9981666400_1678387802_thumb.jpg)
Inconveniently the switches are driven by 12V, so I made a resistive divider. You'd need to come down from 12V to 3V, so R1=3*R2. I had a 30k SMD and a 10k trough-hole laying around, so that's what I used.
![[WB3S/BK7231T] Tuya Smart Valve (UJV Ufairy) teardown and modification [WB3S/BK7231T] Tuya Smart Valve (UJV Ufairy) teardown and modification](https://obrazki.elektroda.pl/1448431000_1678387684_thumb.jpg)
![[WB3S/BK7231T] Tuya Smart Valve (UJV Ufairy) teardown and modification [WB3S/BK7231T] Tuya Smart Valve (UJV Ufairy) teardown and modification](https://obrazki.elektroda.pl/7171402700_1678387692_thumb.jpg)
The 30k resistor is connected to the NO contact of the respective limit switch. After soldering verify that the total resistance between NO and GND is whatever you designed (40k in my case), and between NO and GPIO - 3/4 of that. Then I configured the corresponding GPIOs (I used PWM2 and PWM1) as inputs.
But there come some troubles, maybe pan Kaczmarek can help: the module doesn't seem to poll the state of the inputs while the relay pin is active. So I would expect the input states to be 1/0 when closed, 0/0 when moving, 0/1 when open. Instead I see that then opening the valve, "open" activates the moment "closed" deactivates and stays so while the actuator is moving and in the open state. When moving to the closed state "open" deactivates right away, both inputs stay low while moving and "closed" activates when the valve is closed.