Power saving is an essential feature of IoT devices, this will help in the long life of the modules and will enhance the reliability of the network. But the implementation of power saving in the ESP8266 was difficult using direct software methods. This was overcome by allowing the controller to reset at fixed time intervals by making a physical connection with the D0 pin and the RST pin, which will reset the activities based on the signals received at fixed intervals defined when going to deep sleep.
Duplex two-way communication was not getting implemented between the bridge module and the gateway, this made it difficult to allow dynamic sleep modes for the bridge based on the data received from the web interface. Since the project was developed within the constraints of the coursework for Sensors Actuators and IoT, the system activation according to the change rate received from the cloud platform was handled in the gateway part. The data received during the change time will not be shared with the cloud database and the gateway will only allow the transfer of data received after this change period, so as to fulfil the network requirements.
During the initial stages of the project, the data visualization was planned using the home assistant application, which will enable access to data via mobile devices. But the implementation of the home assistant was giving errors in the logic, and the team decided to focus on more important ideas of delay planning and data encryption. Thus, the data visualization was implemented with the dashboard functionality available in the node-red, and data can be seen by accessing the dashboard on the web-based platform.
The quantitative analysis of the Client module is performed to analyze the life time of the device. Based on the references for the perfomance of similar applications the average time for various activities is as follows:
Total Sampling Time = 5070 mS
Active Sampling Duty Cycle = Push Button Engagement / Total Time = 0.001972
Active Processing Duty Cycle = Processing Time / Total Time = 0.009862
Active Transmission Duty Cycle = Transmission Time / Total Time = 0.001972
Inactive Sampling Time = 1 - Active Sampling Duty Cycle = 0.998028
Inactive Processing Time = 1 - Active Processing Duty Cycle = 0.990138
Inactive Transmission Time = 1 - Active Transmission Duty Cycle = 0.998028
Total Active Time = Active Sampling Duty Cycle + Active Processing Duty Cycle + Active Transmission Duty Cycle = 0.013807
Total Inactive Time = Inactive Sampling Time + Inactive Processing Time + Inactive Transmission Time = 2.986193
The current Consumption for various activities performed by ESP8266 are as follows
Therefore,
Total Power Consumed = Total Active Time * Operational Current + Total Inactive Time * Sleep Current = 1.16426
For a Battery capacity of 2000 mAH
Life Time in Hours =2000 / Total Power Consumed = 1717.829 hours
Life Time in Days = Life Time in Hours / 24 = 71.5762 Days
So for a sleep time of 5 seconds, the device can be operated for 71 days, and the sleep time can be changed according to the application. If the sleep time is considered to be 1 minute the lifetime of the device can be extended to 544 days. This can be further extended by increasing the battery capacity, but this will increase the size of the device as well as can cause a significant cost increase per unit of the client module.
A dynamic duty cycle can be adopted, in which the sleep time can be controlled using the web interface hosted in the cloud so that the sleep time of all client modules can be changed at a time. But this idea was not implemented in the current logic due to time constraints.
If you want to calculate the life time according to your application needs, you can use the link below for reference.