# RTL8720DF power consumption while maintaining MQTT connection with server

**URL:** <https://forum.amebaiot.com/t/rtl8720df-power-consumption-while-maintaining-mqtt-connection-with-server/1011>\
**Category:** WiFi\
**Tags:** rtl872xd\
**Created:** [December 31, 2021, 10:55am UTC](https://forum.amebaiot.com/t/rtl8720df-power-consumption-while-maintaining-mqtt-connection-with-server/1011 "2021-12-31T10:55:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jitendra\_Singh](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/jitendra_singh/32/820_2.png) [@Jitendra\_Singh](https://forum.amebaiot.com/u/Jitendra_Singh)\
**Post date:** [December 31, 2021, 10:55am UTC](https://forum.amebaiot.com/t/rtl8720df-power-consumption-while-maintaining-mqtt-connection-with-server/1011/1 "2021-12-31T10:55:20Z")

</div>

Hi,

I went through the datasheet and application note for the SoC but was not able to find details about the power consumption of the SoC. I am looking to use the SoC for a battery-powered application.  
The SoC is required to maintain an MQTT connection with the server in different DTIM modes.

Regards

---

<div class="post-metadata">

**Author:** ![xidameng](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/xidameng/32/18_2.png) [@xidameng](https://forum.amebaiot.com/u/xidameng)\
**Post date:** [January 3, 2022, 3:10am UTC](https://forum.amebaiot.com/t/rtl8720df-power-consumption-while-maintaining-mqtt-connection-with-server/1011/2 "2022-01-03T03:10:38Z")

</div>

Hi @Jitendra_Singh  
You ca refer to [this](https://www.amebaiot.com/en/amebad-arduino-deepsleepmode/) deep sleep mode guide as a reference,

> The power consumptions of Deep Sleep mode is around 7μA to 8μA as compared to normal state which is around 22mA

However, maintaining WiFi connection and MQTT will consume abit more, but exact data are to be determined according to user’s application and environment

---

<div class="post-metadata">

**Author:** ![wingee](https://avatars.discourse-cdn.com/v4/letter/w/35a633/32.png) [@wingee](https://forum.amebaiot.com/u/wingee)\
**Post date:** [November 22, 2023, 2:19am UTC](https://forum.amebaiot.com/t/rtl8720df-power-consumption-while-maintaining-mqtt-connection-with-server/1011/3 "2023-11-22T02:19:45Z")

</div>

Is there an example of using wifi and sleep mode available?

---

<div class="post-metadata">

**Author:** ![dakamaster](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/dakamaster/32/1744_2.png) [@dakamaster](https://forum.amebaiot.com/u/dakamaster)\
**Post date:** [November 22, 2023, 2:33am UTC](https://forum.amebaiot.com/t/rtl8720df-power-consumption-while-maintaining-mqtt-connection-with-server/1011/4 "2023-11-22T02:33:37Z")

</div>

Please find power save examples via our Github : [https://github.com/ambiot/ambd\_arduino/blob/dev/Arduino\_package/hardware/libraries/PowerSave/examples/DeepSleepMode/DeepSleepMode.ino](https://github.com/ambiot/ambd_arduino/blob/dev/Arduino_package/hardware/libraries/PowerSave/examples/DeepSleepMode/DeepSleepMode.ino)  
Meanwhile, Wi-Fi related examples can be found here:  
[https://github.com/ambiot/ambd\_arduino/tree/dev/Arduino\_package/hardware/libraries/WiFi](https://github.com/ambiot/ambd_arduino/tree/dev/Arduino_package/hardware/libraries/WiFi)  
Thanks

---

<div class="post-metadata">

**Author:** ![wingee](https://avatars.discourse-cdn.com/v4/letter/w/35a633/32.png) [@wingee](https://forum.amebaiot.com/u/wingee)\
**Post date:** [November 23, 2023, 1:07pm UTC](https://forum.amebaiot.com/t/rtl8720df-power-consumption-while-maintaining-mqtt-connection-with-server/1011/5 "2023-11-23T13:07:17Z")

</div>

I’ve looked at both of those examples but (unless i’m missing something) there doesn’t seem to be support wakeup from wlan in them.

Does anyone have an example where sleep mode is used with wifi?

I did find this post but can’t find the code to the sample mentioned, so if anyone has that it might help: [Power Management – Use WiFi in sleep mode – Realtek IoT/Wi-Fi MCU Solutions (amebaiot.com)](https://www.amebaiot.com/en/ameba-arduino-power-management-wifi/)

---

<div class="post-metadata">

**Author:** ![Kelvin\_Huang](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/kelvin_huang/32/2130_2.png) [@Kelvin\_Huang](https://forum.amebaiot.com/u/Kelvin_Huang)\
**Post date:** [November 28, 2023, 3:36am UTC](https://forum.amebaiot.com/t/rtl8720df-power-consumption-while-maintaining-mqtt-connection-with-server/1011/6 "2023-11-28T03:36:52Z")

</div>

Hi @wingee, I think currently there is no such example code for sleep mode with wifi. That example is probably written quite some time ago, and we are unable to find the source code for that example. This feature has to be ported again. This can be a possible future improvements to the existing examples.

Thank you.
