General area when it fits no where else

Moderator: Mmiscool

User avatar
By Oldbod
#44202 Hi. I'm looking at temperature reporting, and need to run some units battery powered. One alternative is just to use commercial Oregon Scientific units, which just bash some values every 40 secs or so out on 433mhz . The batteries on these last quite a long time,possibly because they transmit on lower power but also because the transmit sequence is short (no handshaking).

I have seen somewhere that it takes the esp8266 a while to wake up and transmit a value, possibly partly to dowith reestablishing communication with the receiving AP after a sleep.

So - I'm wondering If power consumption might be lower if rather than a complete deep sleep (which from reading the spec for 8266basic and the spec for the chip Im assuming is the standard deep sleep/reboot) followed by restart and reestablishing a link, it might be lighter on power to keep the link alive.

Problem I have is twofold - firstly I have no facts to support this nor knowledge of the protocol that keeps the 8266 - ap link current, and secondly I don't know how/if basic supports the lighter sleep modes. I'm also wondering if basic uses the 512bytes of user rtc ram for its own purposes? Eg variable/chaining info.

Or if im barking up completely the wrong tree?

Btw - came across another version of basic for 8266 the other day, based on a mature product tree. This one is many streets(probably cities!) ahead in terms of ease of use. Great achievement!
User avatar
By AmineSmiri
#44505
Oldbod wrote:Hi. I'm looking at temperature reporting, and need to run some units battery powered. One alternative is just to use commercial Oregon Scientific units, which just bash some values every 40 secs or so out on 433mhz . The batteries on these last quite a long time,possibly because they transmit on lower power but also because the transmit sequence is short (no handshaking).

I have seen somewhere that it takes the esp8266 a while to wake up and transmit a value, possibly partly to dowith reestablishing communication with the receiving AP after a sleep.

So - I'm wondering If power consumption might be lower if rather than a complete deep sleep (which from reading the spec for 8266basic and the spec for the chip Im assuming is the standard deep sleep/reboot) followed by restart and reestablishing a link, it might be lighter on power to keep the link alive.

Problem I have is twofold - firstly I have no facts to support this nor knowledge of the protocol that keeps the 8266 - ap link current, and secondly I don't know how/if basic supports the lighter sleep modes. I'm also wondering if basic uses the 512bytes of user rtc ram for its own purposes? Eg variable/chaining info.

Or if im barking up completely the wrong tree?

Btw - came across another version of basic for 8266 the other day, based on a mature product tree. This one is many streets(probably cities!) ahead in terms of ease of use. Great achievement!


The meaning of "connection" varies alot.
Connection on the Network/Transport layers is very different from Application layers. (You might wanna check OSI standarization before continuing reading).
Connection on Network/Transport layers requires what we call a "heartbeat", or "keepalive". If two machines want to keep connection, they must send a signal before the keepalive time. For example, if machine A doesn't send a signal in 2 seconds, machine A is considered disconnected.
Connection on Application layer is a whole other thing. The easiest example to give would be sessions on Facebook. If you've read about MQTT, it would be the persistent session option.

Anyway, what you could do is :
- Using a static IP instead of DHCP : DHCP being the protocol used by the AP to give an IP adress to each connected machine. A machine with a static IP wouldn't require DHCP.
- Keeping your AP open (with no password, nor encryption) : Now we're talking about WEP, WPA stuff ... Using such protection is not only about having a password so to connect; all data keeps being encrypted before sending.
- Keeping visibility between AP and the chip
- Avoiding the use of mobile phones as AP : sure it would work using it as an AP but a mobile phone is not as fast as a router.

Applying all of these might make you gain up to 2 seconds.

You could reduce the duty time (I call it this way :p the time while the chip is waken-up) by managing delays in your program. Try installing some sort of pseudo-threading. By using pseudo-threading, I succeeded in bringing the duty time from 22 seconds down to 9 seconds.

I hope that helped, and please, if I made any mistakes, lemme know.
User avatar
By Oldbod
#51892 Hi. I won't go into a load of waffle now, just wanted to thank you for your reply. I thought I'd done that and with detail at the time, but looking back for this post I found it obviously hadn't gone/stuck for some reason. Probably posting from my phone and not patient enough....

Thanks again!
User avatar
By forlotto
#52079 What version of basic are you talking about care to share a link to it?

Definition of mature differs so much do you mean that the interface is easier to use but it has less support?

Yes simple answer you are correct on most of your assumptions it appears.

However I would like to add a couple of things.

Wave propagation is an interesting thing. The higher the rating the more times the wave wiggles back and forth more or less thus the wave itself is a shorter wave able to carry a much stronger signal and a much higher amount of bandwidth. However it suffers from a few things losses at longer distances the requirement of more power as well to keep things in line with consumer needs. However when it comes to wifi the esp8266 is likely one of the lower powered devices currently available. If you need power like this I would suggest looking into solar power and a rechargeable battery pack.

Or else yes 433mhz wireless is a good spec to play with while anything is possible alternatives out there will put any ratified wifi device a/b/g/n/ac to shame when it comes to power consumption but I believe people tend to miss the fact that it is brutally easy to hook up a rechargeable battery bank to these devices and either go out there and manually bump that pack with another pack or even setup solar charging as there is enough sunlight even in the dead of winter to keep this thing running if you execute sleep modes correctly. If a guy really wanted he could just charge up a car battery with a panel and use a dc to dc converter to power the device as well I don't think you would ever have to worry about much at that point.

On the cheap you could restore an old car battery with the old epson salt trick and you could make your own panel with some 36 6x6 cells an old window for free that no one wants and some slygaurd and a water proof backing of some sort. So the only out of pocket cost would be epson salt, slygaurd, cells, tabbing, and solder as well as your device of course.

But this is all very possible or you could just get smaller panels made for 5v ...

-forlotto