关于休眠功耗的处理

lushikaikk
Posts: 4
Joined: Wed Sep 23, 2015 10:13 am

关于休眠功耗的处理

Postby lushikaikk » Wed Sep 23, 2015 11:19 am

我们想得到平均电流小于1mA的工作功耗:使用light sleep模式下测试发现电流还是有几mA,官方的资料上显示能达到0.9mA左右,于是我们有一些疑问:
1 官方的测试系统是否外置了FLASH芯片?还是单个ESP8266测试。意思是官方的0.9mA是否是带有外置flash芯片的系统电流?
2 在网络连接不断掉的情况下,是否有更好的方式使工作电流小于1mA?不改变其他设备的设置的情况下。
3 把sdk的大部分程序块放入ESP8266中,也就是不用ICACHE_FLASH_ATTR的命令,是否能达到省电的目的?

现在有一个项目在这个方面很纠结,希望得到一些支持,不胜感谢!!

tve
Posts: 123
Joined: Sun Feb 15, 2015 4:33 pm

Re: 关于休眠功耗的处理

Postby tve » Thu Sep 24, 2015 12:44 am

You have to be careful, there are now two slightl different light sleep modes. There is the automatic light sleep mode selected by wifi_set_sleep_type() and there is the manual light sleep mode set via the new wifi_fpm_*() functions.

With the manual light sleep mode you have to turn wifi off, so you will have the 0.9mA power consumption, but the only way to wake-up the chip is via a time-out or via an external gpio input.

With the automatic light sleep mode the system turns wifi on every DTIM interval, so the power consumption depends on the access point configuration as well as on the amount of traffic over the wifi. At my home the resulting average power consumption is much larger than 1mA.

ESP_Alfred
Posts: 56
Joined: Mon Nov 10, 2014 7:31 pm

Re: 关于休眠功耗的处理

Postby ESP_Alfred » Thu Sep 24, 2015 2:41 pm

lushikaikk wrote:我们想得到平均电流小于1mA的工作功耗:使用light sleep模式下测试发现电流还是有几mA,官方的资料上显示能达到0.9mA左右,于是我们有一些疑问:
1 官方的测试系统是否外置了FLASH芯片?还是单个ESP8266测试。意思是官方的0.9mA是否是带有外置flash芯片的系统电流?
2 在网络连接不断掉的情况下,是否有更好的方式使工作电流小于1mA?不改变其他设备的设置的情况下。
3 把sdk的大部分程序块放入ESP8266中,也就是不用ICACHE_FLASH_ATTR的命令,是否能达到省电的目的?

现在有一个项目在这个方面很纠结,希望得到一些支持,不胜感谢!!


您好,
1、单芯片测试
2、目前8266如果不断掉连接的话 light sleep是功耗比较低的模式。
3、我们不建议把所有程序都放到内部RAM中,可能会导致程序运行出现问题。
建议,
1、可对比选择出功耗较低的flash芯片。
2、可适当减少TX功率

icomet
Posts: 6
Joined: Tue Jun 09, 2015 9:26 pm

Re: 关于休眠功耗的处理

Postby icomet » Sun Sep 27, 2015 10:03 am

请问怎么进入light sleep模式?在文档上没找到。

lushikaikk
Posts: 4
Joined: Wed Sep 23, 2015 10:13 am

Re: 关于休眠功耗的处理

Postby lushikaikk » Mon Sep 28, 2015 11:00 am

icomet wrote:请问怎么进入light sleep模式?在文档上没找到。


通过测试,我是这么理解的,调用 wifi_set_sleep_type(LIGHT_SLEEP_T);当CPU处于空闲时,自动进入SLEEP模式,是只要CPU一直工作,比如TIME回调不停在自我计数,就不会进入sleep。

lushikaikk
Posts: 4
Joined: Wed Sep 23, 2015 10:13 am

Re: 关于休眠功耗的处理

Postby lushikaikk » Mon Sep 28, 2015 11:08 am

tve wrote:You have to be careful, there are now two slightl different light sleep modes. There is the automatic light sleep mode selected by wifi_set_sleep_type() and there is the manual light sleep mode set via the new wifi_fpm_*() functions.

With the manual light sleep mode you have to turn wifi off, so you will have the 0.9mA power consumption, but the only way to wake-up the chip is via a time-out or via an external gpio input.

With the automatic light sleep mode the system turns wifi on every DTIM interval, so the power consumption depends on the access point configuration as well as on the amount of traffic over the wifi. At my home the resulting average power consumption is much larger than 1mA.


manual light sleep mode下,wifi需要断开再重新连接,这无形中会影响到一些需要快速进行数据交换的场合,比如智能控制的体验!

ESP_Alfred
Posts: 56
Joined: Mon Nov 10, 2014 7:31 pm

Re: 关于休眠功耗的处理

Postby ESP_Alfred » Mon Sep 28, 2015 9:34 pm

1、Modem-sleep 仅在 Station 模式下,连接路由器后生效。 ESP8266 通过 Wi-Fi 的 DTIM Beacon 机制与路由器保持连接。在 Modem-sleep 模式下, ESP8266 会在两次 DTIM Beacon 间隔时间内,关闭 Wi-Fi 模块电路,达到省电效果,在下次 Beacon 到来前自动唤醒。睡眠时间由路由器的 DTIM Beacon 时间决定。睡眠同时可以保持与路由器的 WiFi 连接。
API wifi_set_sleep_type(MODEM_SLEEP_T)

2、Light-sleep 的工作模式与 Modem-sleep 相似,不同的是,除了关闭 Wi-Fi 模块电路以外,在 Light-sleep 模式下,还会关闭时钟并暂停内部 CPU,比 Modem-sleep 功耗更低。在 Wi-Fi 连接后,并且 CPU 处于空闲状态时,会自动进入 Light-sleep 状态。
API wifi_set_sleep_type(LIGHT_SLEEP_T)

3、相对于其他两种模式, Deep-sleep 由用户控制,调用接口函数就可立即进入 Deep-sleep 模式。在该模式下,芯片会断开所有 Wi-Fi 连接与数据连接,进入睡眠模式,只有 RTC 模块仍然工作,负责芯片的定时唤醒。使用 Deep-sleep 必须将 GPIO16 与芯片 EXT_RSTB 管脚连接。
API void system_deep_sleep(uint32 time_in_us)

Who is online

Users browsing this forum: No registered users and 27 guests