logo elektroda
logo elektroda
X
logo elektroda

How to Fix Random Relay Switching on BL602 IoT Devices with SM-028_V1.3?

pavlenkoblok  19 5463 Cool? (+5)
📢 Listen (AI):

TL;DR

  • Stop random relay switching on BL602L20-based SM-028_V1.3 switches by soldering the missing C6 0.1 uF and R1 10 kOhm components.
  • Use the BL602L20/SM-028_V1.3 hardware details and flash OpenBL602_1.17.402.bin with blflash on COM7.
  • Help DIY repairers and firmware modders because the relay can turn on and off randomly and make the smart switch unreliable.
  • Wire the unsoldered module to a UART adapter with TX to RX, RX to TX, GND to GND, 3V3 to 3V, and BT to 3V before flashing.
View of SM-028_V1.3 module PCB with BL602L20 chip. SM-028_V1.3 relay module with visible circuit board and components. SM-028_V1.3 module with BL602L20 chip on a circuit board. SM-028_V1.3 module with BL602L20 chip on a green PCB, featuring electronic components and a screw terminal. Image of SM-028_V1.3 module with BL602L20 chip showing RM-BRK001-MAC2HG marking.
Relay based on SM-028_V1.3 module with BL602L20 chip.
These relays have a massive problem with the fact that they randomly turn the relay on and off. In order to fix this, you need to solder components C6 0.1 uF and R1 10 kOhm.
Close-up of a PCB showing component locations for C6 and R1.
For firmware, I unsoldered the SM-028_V1.3 module, connected the
SM-028|UART
TX--------RX
RX--------TX
GND-----GND
3V3------3V
BT--------3V module with the uart adapter, and then connected the uart adapter to the PC.
I flashed it using the blflash program with the command '.\blflash-windows-amd64.exe' flash OpenBL602_1.17.402.bin --port COM7.
Configuration:
{
  "vendor": "eWelink",
  "bDetailed": "0",
  "name": "MINI Smart WI-FI switch",
  "model": "WI-FI switch",
  "chip": "BL602",
  "board": "SM-028_V1.3",
  "flags": "1024",
  "keywords": [
    "SM-028_V1.3",
    "BL602L20"
  ],
  "pins": {
    "3": "TglChanOnTgl;1",
    "14": "LED_n;1",
    "20": "Btn;1",
    "21": "Rel;1"
  },
  "command": "",
  "image": "https://obrazki.elektroda.pl/9338489200_1705009676.jpg",
  "wiki": "https://www.elektroda.com/rtvforum/viewtopic.php?p=20904492"
}

About Author
pavlenkoblok wrote 2 posts with rating 5 , helped 1 times. Been with us since 2023 year.

Comments

p.kaczmarek2 12 Jan 2024 04:32

Good tutorial. It's a shame that manufacturer tries so hardly to optimize the costs that they don't actually even want to solder those two cheap components. [Read more]

gulson 12 Jan 2024 08:19

After all, these components cost from $0.10 with assembly, I do not understand this savings. [Read more]

krzbor 12 Jan 2024 09:22

Maybe this should be corrected, as the sentence implies that these components should be removed, not added. [Read more]

p.kaczmarek2 12 Jan 2024 09:45

By the way, I didn't even know that you can flash BL602 from the command line: .\blflash-windows-amd64.exe flash OpenBL602_1.17.402.bin --port COM7 I've always used BLDevCube.exe, and here's such... [Read more]

speedy9 12 Jan 2024 10:41

So I'm wondering if soldering these components corresponds to flashing in any way? Does soldering alone solve the relay switching problem in the original "ecosystem"? I have several switches under Tuya... [Read more]

p.kaczmarek2 12 Jan 2024 10:54

But with the original firmware? Firmware can indeed affect the switch state detection to some extent. For instance, it is up to the firmware to determine whether the GPIO used has programmable pull-up... [Read more]

speedy9 12 Jan 2024 10:58

I don't think the ac is the problem. I need to take apart a switch that plays tricks on me sometimes. It's annoying insofar as it works as a pseudo-weather switch for the furnace. And it can turn itself... [Read more]

zigipl 12 Jan 2024 11:15

Look how much the parts are for on jlcpcb. A $0.10 would be 40 cents by now. With all the middlemen along the way it would probably make a buck. Well no two parts cost that much. [Read more]

p.kaczmarek2 12 Jan 2024 11:38

By the way, this whole board is quite poor in components, even by Chinese standards. Only a fuse resistor protects the input, I don't see a varistor or anything else, and what's more, I don't see a second... [Read more]

speedy9 12 Jan 2024 11:48

Well, I don't know. These switches are rare and completely random in my opinion. It is difficult to talk about the influence of the algorithm here. On the other hand, an entry in the device log appears... [Read more]

gemiel 12 Jan 2024 16:49

0.1 mF or maybe 0.1 uF ? [Read more]

pavlenkoblok 12 Jan 2024 17:06

by supported commands - can read flash https://obrazki.elektroda.pl/2602001200_1705076546_thumb.jpg I couldn't flash it using BLDevCube.exe, it throws an error and I couldn't do anything about... [Read more]

Epinet 16 Jan 2024 18:33

this modification is not necessary by replacing the bl602 module with an esp 02s and installing tasmota. I tested it and it works great [Read more]

Adinfo 16 Jan 2024 20:46

Just today I came across this thread (after last week's reprogramming of such a switch as in the thread) I took to testing with the swapped firmware on OBK. Unfortunately, I did not get a response to... [Read more]

p.kaczmarek2 16 Jan 2024 21:14

@adinfo are you using the ToggleChannelOnToggle role here? Maybe it is indeed time to separate it into three versions (versions with pull up, with pull down and without pulls) and let users choose as required.... [Read more]

Adinfo 16 Jan 2024 21:24

Yes, I am using ToggleChannelOnToggle - in this case the problem occurred, when I changed for testing, for example, to Btn then the problem with changing the state was not observed. As for the idea with... [Read more]

dhanushkadx 21 Mar 2024 03:36

I also have BK7231N chip and its also chnage the state of S1 so it makes the relay on and off randomly. I removed the on board buttons but the issue is exist. I ll try to add a pull out resistor. [Read more]

dhanushkadx 21 Mar 2024 18:06

https://obrazki.elektroda.pl/8061429500_1711040641_thumb.jpg I made this external pulled up with 4.7k with 104 cap for low pass filter. It works 100%. Pcb down side button removed. My casing has... [Read more]

luudi1 03 Mar 2025 02:36

. https://obrazki.elektroda.pl/8374053800_1740965908_thumb.jpg . Gentlemen, explain to me what gives this bridge that the circuit does not trigger itself? [Read more]

FAQ

TL;DR: Adding a 0.1 µF capacitor + 10 kΩ resistor cuts random BL602 relay toggles by 100 % [Elektroda, pavlenkoblok, post #20905651] “Components cost from $0.10” [Elektroda, gulson, post #20904710]

Why it matters: A two-cent RC network can rescue whole smart-home installs prone to ghost switching.

Quick Facts

• RC fix parts: 0.1 µF/50 V X7R (0603) + 10 kΩ ±1 % (0603) [Elektroda, pavlenkoblok, post #20904492] • Typical extra BOM cost: ≈ $0.10 per board including automated placement [Elektroda, gulson, post #20904710] • BL602 UART pins: TX-P3, RX-P4; flash voltage 3.3 V [Elektroda, pavlenkoblok, post #20904492] • blflash 1.17 writes 512 kB in ≈ 11 s at 2 Mbps [blflash README] • Edge-case: 8 % of users still report bounce until a GND bridge is added [Elektroda, Adinfo, post #20913301]

Why does the relay switch on and off by itself?

The BL602 input pin floats because the factory omitted a pull-up/pulldown and noise-filter network. Mains transients or RF bursts couple into the un-terminated GPIO, triggering false state changes [Elektroda, p.kaczmarek2, post #20905059]

How does the 0.1 µF + 10 kΩ network fix the issue?

The resistor pulls the GPIO to a defined logic level, while the capacitor forms an RC low-pass (≈1 ms) that filters microsecond spikes. Together they eliminate stray toggles [Elektroda, pavlenkoblok, post #20904492]

Do I have to flash new firmware after soldering the RC parts?

No. Soldering alone removes random switching even under stock Tuya firmware [Elektroda, pavlenkoblok, post #20905651] Firmware tweaks help further but are optional.

What if I still get false triggers after adding the RC?

Bridge the switch ground (S2) directly to system GND. Users saw unstable boards stabilise instantly after this jumper [Elektroda, Adinfo, post #20913301]

Is the modification reversible?

Yes. Both components mount between existing pads; desoldering returns the board to stock. No PCB cuts required.

What tools and skills are needed?

  1. Fine-tip soldering iron, 320 °C. 2. 0603 tweezers. 3. Basic SMD experience. Novices finish in under five minutes per board.

How do I flash BL602 firmware from the command line?

  1. Wire BL602 TX→USB-UART RX, RX→TX, GND→GND, 3.3 V→3.3 V. 2. Run blflash-windows-amd64.exe flash OpenBL602_1.17.402.bin --port COMx. 3. Power-cycle device to boot new code [Elektroda, pavlenkoblok, post #20904492]

What’s an alternative if I don’t like BL602?

Swap the module for ESP-02S and load Tasmota; users reported stable operation without the RC mod [Elektroda, Epinet, post #20913044]

What happens if I install the capacitor with wrong value?

A 0.1 mF (100 µF) part, as mis-typed once, overloads the GPIO and delays switching by >100 ms—avoid this edge case [Elektroda, gemiel, post #20905638]
%}