Low Power Wi-Fi

Last Updated on : 2024-07-23 17:00:12download

The low power Wi-Fi solution is designed for battery-powered products that feature low power consumption, compact size, and infrequent data exchange, such as security sensors. The MCU SDK allows you to easily connect your MCU with Tuya’s low-power Wi-Fi module, enabling you to make your product smart.

There are two approaches to achieving low power Wi-Fi.

  • Wi-Fi power-off
  • Wi-Fi keep-alive

Wi-Fi power-off

Power off the Wi-Fi module after data transmission to save energy.

This low power solution is ideal for the device that proactively reports data only or receives a limited number of commands.

Process

  1. Initially, the MCU powers on the Wi-Fi module to complete pairing and binding.

  2. During normal operation, the device is powered off and cannot receive control commands.

  3. To initiate data exchange, the MCU wakes up and powers on the Wi-Fi module. The Wi-Fi module then receives data through the serial port and sends it to the cloud.

  4. Meanwhile, the control commands cached in the cloud will be sent to the Wi-Fi module, which will then forward them to the MCU.

  5. After the MCU receives the data, it will power off the Wi-Fi module.

    Low Power Wi-Fi

Comparison

  • The Wi-Fi power-off solution is specifically optimized for quick network reconnection after power off, resulting in reduced battery consumption compared to the standard Wi-Fi solution.

  • The peak power consumption of the Wi-Fi power-off solution is similar to that of the standard Wi-Fi solution, but its average standby power consumption is lower.

  • Unlike standard Wi-Fi and keep-alive solutions, the MCU powers off the module after data transmission, preventing it from receiving real-time control commands.

Wi-Fi keep-alive

The Wi-Fi module maintains a connection with the router and the cloud while keeping low power consumption. The device can report data and receive commands at any time.

This solution is ideal for battery-powered devices that maintain a connection for data transmission.

Process

  1. The Wi-Fi module starts in standard power mode for pairing and binding.

  2. During normal operation, the Wi-Fi module runs in low power mode and periodically wakes up to maintain a connection with the router and the cloud, enabling users to send control commands to the device at any time.

  3. To initiate data exchange, the MCU wakes up the Wi-Fi module via I/O. The Wi-Fi module then receives data through the serial port and sends it to the cloud.

  4. The MCU directs the Wi-Fi module to enter low power mode via I/O after data transmission.

    Low Power Wi-Fi

Comparison

  • This solution has lower average standby power consumption than the standard Wi-Fi option, making it suitable for battery-powered Wi-Fi devices.

  • This solution has a slightly higher average standby power consumption than the Wi-Fi power-off solution, but it enables control commands to be sent at any time.

Development process

Create product

See the Create Product section in Quick Start for the steps.

Things to note

  • Wi-Fi or Wi-Fi and Bluetooth Low Energy (LE) combo protocol is available for various standard categories, including electrical devices, sensors, and fitness health.

  • For battery-powered low-power products, choose Low Power for the power type. This choice relates to the module and firmware selection later on.

    Low Power Wi-Fi
  • The average power consumption of the Wi-Fi power-off module is much lower than that of the standard Wi-Fi module. However, its peak current can exceed 400 mA with a duration of microseconds. The consideration for electricity allowance is required in your circuit design.

  • The Wi-Fi module achieves low power by being powered off. Your hardware design should allow the MCU to control the module’s power state.

Product development

See Hardware Development and download the development materials.

Things to note

  • The Wi-Fi power-off solution and the Wi-Fi keep-alive solution each have their own dedicated MCU SDK, which cannot be used interchangeably with the standard Wi-Fi module. The MCU SDK is automatically generated after the product is created. Make sure to select the correct power type during product creation.

    Low Power Wi-Fi
  • For more information, see MCU SDK Porting.

Development and debugging

See Develop and Debug to test the hardware, software, and overall functionality.

You can use the Module Debugging Assistant along with the provided debugging file to streamline product development. For more information, see Module Debugging Assistant.

When debugging the Wi-Fi power-off solution with the Module Debugging Assistant, select Wi-Fi > Wi-Fi Low Power Protocol for Protocol.

Low Power Wi-Fi

FAQs

Why does reverse current occur in some Wi-Fi power-off modules?

Cause

For the MCU that can control the on/off of the module, its TX and RX are idle high in most hardware designs. Therefore, the TX and RX on the MCU are configured as push-pull output and input respectively. This can cause the TX and RX to output a low current.

When the module is disconnected from the VCC, it cannot be powered off completely due to the low current from the TX and RX on the MCU. This might cause some problems with hardware operation.

Solution

To address the reverse current issue without altering the circuit, design the MCU program to disable its power supply function using the following logic.

  • Disable the serial port while powering off the module, putting the TX and RX either as an open-drain output in high impedance or as a low level.
  • If the TX or RX is connected to a pull-up resistor, it must be set to a low level.

Reference

The following figures illustrate how the MCU powers the module on and off:

  • Sequence diagram: We recommend that the t be within five milliseconds. You can adjust it based on your hardware. Note that if the t is set too short, the module might not start properly.

    Low Power Wi-Fi
  • The MCU powers off the Wi-Fi module:

    Data exchange completed.
    Release the serial port and
    set TX and RX as open-drain or low level.
    Power off the Wi-Fi through I/O.
  • The MCU powers on the Wi-Fi module:

    MCU proactively reports data.
    Implement powering on/off
    Wi-Fi module through I/O.
    Delay 5 ms, adjusted as needed.
    Enable serial port.
    MCU receives Wi-Fi information via the serial port.
    MCU reports data via the serial port.