Achieving Smart Gas Stove Shut-off Using "Flameout Protection + Smart Switch"

By 苏剑林 | September 26, 2024

Smart gas stoves primarily move in two directions: first, detecting the ON/OFF state of the flame to enable linkage with other devices like range hoods; second, achieving smart shut-off, which includes scheduled turn-off and integration with Mi Home (or other smart home systems) for voice-controlled or remote shut-off. Currently, there are not many gas stove options with these two features, and they are significantly more expensive than standard gas stoves. Replacing a functional stove just for these features is not very cost-effective, which has led to several "modding" solutions for standard gas stoves.

Setup Diagram
Setup Diagram

This article shares a method based on the gas stove's built-in flameout protection device, using a smart switch (breaker) to integrate the stove into Mi Home and achieve smart shut-off functionality.

Existing Products

If we are strictly talking about "timed shut-off," there are already products on the market. Their principle is to replace the gas stove knob with an electric knob that has a timer function. When the time is up, it physically turns the knob to extinguish the flame. Their common characteristics are that they are ugly and expensive, with unit prices starting at over 100 RMB; adding them to both sides costs at least 300 RMB, which is nearly the price of a standard gas stove.

Furthermore, these products generally only offer timed shut-off and do not support integration into smart home ecosystems. For voice or remote shut-off, the author found only one product called "Zhirongxing" available, which only supports the Xiaodu ecosystem and costs over 300 RMB for a single side. This means the accessories for one burner can cost as much as a whole stove, which is hard to justify.

The reason these products are overpriced and unsightly (beyond some "IQ tax") is that using a knob to turn off the flame requires a motor, complicating the design. After analysis and testing, the author found that the simplest and virtually invisible smart shut-off implementation is to utilize the stove's own flameout protection device.

Flameout Protection

Most modern gas stoves, whether for natural gas or LPG, are equipped with flameout protection devices (the author hasn't seen one without it). Its purpose is to automatically cut off the gas if the flame goes out accidentally while the valve is open, preventing accidents. How can you tell if yours has one? If your stove requires you to press down on the knob to ignite, and if letting go immediately after the flame appears causes it to go out, then it basically has flameout protection.

Regarding the principle of flameout protection, readers can watch this video on Bilibili. After watching, readers who have experience DIYing smart homes should already know what to do next.

In fact, the composition of the flameout protection device is very simple: it consists of a thermocouple that converts heat into electricity and a gas pipe valve triggered by an electromagnet, as shown below. During ignition, we manually open the valve by pressing the knob and then ignite. Once there is a flame, the thermocouple detects the heat and generates electricity, which enables the electromagnet to hold the valve open. If the flame goes out accidentally, the thermocouple stops generating electricity, the electromagnet loses its magnetism, and the valve closes automatically.

Flameout Protection Schematic
Flameout Protection Schematic

Normally Closed Switch

With this foundation, achieving Mi Home smart shut-off is easy. We only need to wire a smart switch in series with the flameout protection device. To shut off the gas, use the smart switch to break the circuit; the electromagnet will lose magnetism, cutting off the gas without needing to move the knob.

Series NC Switch
Wiring a Normally Closed (NC) Smart Switch in Series

To achieve a perfect integration, we need one of the following Mi Home compatible materials:

1. A four-channel smart switch with Normally Closed (NC) capability;

2. A two-channel smart switch with NC capability, plus two virtual status registers;

Additionally, it is best to have a power outlet near the gas stove, as staying connected to Mi Home consumes significant power, making battery life difficult to maintain.

Some readers might wonder: a stove usually has two burners, so why a four-channel switch? The reason will soon be clear. First, let's explain the need for "Normally Closed" (NC). "Normally Closed" means that in a powered-off state (no power to the switch itself), the circuit remains closed/connected. This is obviously necessary so that the stove can still ignite normally if there is a power outage. If you can accept that the stove won't work without power, then a standard "Normally Open" (NO) switch would suffice.

Once ready, you need to wire the switch in series with the flameout protection system using the NC terminals. This involves disassembling the stove; please research this yourself. Standard stoves are usually not hard to open, and the flameout protection device is quite distinct and easy to find. Overall, the difficulty should be manageable. Unfamiliar readers can watch stove disassembly videos online first.

Reversing the Switch

After installing the switch and adding it to Mi Home, we can control the circuit. However, we encounter a "comical" situation: the switch state in Mi Home is the opposite of the circuit state. That is, when the Mi Home app shows the switch is "ON," the circuit is actually broken (the relay is energized to open the NC contact), and when it shows "OFF," the circuit is connected. This is because the firmware assumes a Normally Open wiring; using the NC terminal reverses the logic.

Consequently, you would have to tell XiaoAI to "Turn ON the stove" to shut it off. Savvy readers might think: I can just set up a manual scene in Mi Home called "Stove OFF" that triggers the "ON" state of the switch to solve the voice command issue. Yes, that works for voice, but if you tell XiaoAI "Turn off the stove in ten minutes," Mi Home will still execute a "Turn OFF" operation (which, due to the inversion, actually maintains the connection and keeps the stove on).

Therefore, we need a way to completely invert the switch logic. This is where the additional two channels come in. We connect the flameout protection to the NC terminals of channels 1 and 2. Then, we set up an automation in Mi Home: when channel 3/4 is turned OFF, turn channel 1/2 ON. We rename the switches for channels 3/4 as "Gas Stove." This way, when we tell XiaoAI to "Turn off the gas stove," it turns off channel 3/4, and the automation triggers channel 1/2, thereby breaking the circuit and shutting off the stove.

Channels 3 and 4 have no physical wiring; they only serve to store status. You can also use separate status registers (which are basically virtual switches without relays) to achieve this, but I won't expand on that here.

Summary

Finally, let's summarize. To achieve smart shut-off using the flameout protection device, you hardware-wise need a four-channel smart switch and to wire the NC terminals of channels 1/2 in series with the flameout protection circuits. In Mi Home, set up an automation so that turning OFF channel 3/4 triggers channel 1/2. Additionally, set each channel to "inching" (momentary) mode, set the default state of channels 1/2 to ON, and channels 3/4 to OFF.

Reproduction of this article must include the original address: https://kexue.fm/archives/10394

If you found this article helpful, you are welcome to [Share] or [Reward] this post. Rewards are not intended for profit, but to let the author know how many readers are truly interested. Of course, ignoring it will not affect your reading. Thank you again!