Go Down

Topic: ESP8266 (Read 73494 times) previous topic - next topic

rxpc

Hi everyone, looks like you guys have done some great work on this new chip already, does anyone know if the ESP8266 offers power management features?

Happy New Year!

rogerClark

AFIK

 The ESP8266 has 2 low power modes, but I have to tried either.

I'm not sure if the AT command set supports either, but as the AT firmware is open source, its quite possible to enhance and recompile and reflash the device.

In fact, its almost impossible to use the device in the first place without reflashing it, because there is no way to know what firmware it comes with from China.

Of course if you buy a board from PaulWare he would put the correct firmware in th esp8266 I presume ;-)

Anyway, back to power modes.

Deep sleep seems to be the most used method, and the API function causes deep sleep for a predefined length of time.

Theoretically you can also do wake on interrupt, but I've not seen any code that demonstrates how to do that.

From what I recall, on wake from deep sleep is virtually the same as power cycling the device, I.e I don't think internal ram vars are retained, but it is possible to store stuff in flash albeit with a limited number of write cycles.

I think there may be another less drastic low power mode, but I have not investigated it, so is could be wrong about its existence. Note there is a lot of conflicting information out there about the ESP8266

So take everything you read with a pinch of salt.
Freelance developer and IT consultant
www.rogerclark.net

rogerClark

Paul

Btw have you seem the new 0.1 in pitch esp8266 modules that are appearing on eBay recently?

Not exactly Arduino compatible, but they at least plug into a breadboard
Freelance developer and IT consultant
www.rogerclark.net

Paulware8

I've only used the ESP-01, and used the firmware that the vendors have provided.
Can you post a link to the ebay modules?
thanks

rxpc

After reading through these posts, I became interested in these chips. I've seen the ESP-01's on Ebay for about $2.70 a piece. I might check these out...

http://www.ebay.com/itm/2-69-each-ESP8266-ESP-01-5x-Simple-Serial-WIFIArrive-1-10-BizDays-/281470224472?pt=LH_DefaultDomain_0&hash=item4188eec858

rogerClark

IMHO ESP-01's are quite limited unless you are need absolutely the smallest device.

I think there is only one usable GPIO line, unless you use RX and TX serial lines as GPIO

A better bet is the ESP-03 or even better the ESP-12.

I have all 3 types and only the ESP-12 has the analog input line to a pin on the PCB and also its the only one that has GPIO16 to the PCB, and GPIO16 is needed if you want to use the onboard deep sleep mode without needing an external processor to control this device.

If you are just buying for testing, an even better option is the 0.1 inch pitch boards which have recently become available.

I thought these 0.1 pitch boards, which will plug into a breadboard were on ebay, but now that I've looked I can't see them, but perhaps they are only on ebay.com or another ebay site, ie. not on my local ebay.com.au


Take a look on www.esp8266.com in the general discussion  forum, you can probably find a link in there is you are interested.




Freelance developer and IT consultant
www.rogerclark.net

Paulware8

Or you could use the atmega328 for gpio (like an arduino), and use the esp8266 for network traffic.
I connect them together in a small footprint (1.5 inc * 2 inch) pcb, and use the Arduino ide for programming.

My eagle schematic (using 3.3V regulator) is located in the github directory: https://github.com/Paulware/ESP8266/tree/master/Schematics/ESP8266Tiny.

For this purpose the ESP-01 is adequate.

rxpc

Ahh, great, thank you guys for the information.  I mainly wanted to just run some tests with one of these chips.  Right now all my sensor nodes use RFM12B's with an attiny85.  All the nodes work great and the power saving features of the both these chips is very good, coin batteries last a long time(over a year now).

While my sensor nodes are small, I wish I could get them even smaller, I have a plant water level sensor, but I used an old walwart housing for it.  All the components fit snug, but it's very noticeable next to the plant.

I was hoping to miniaturize the nodes I already have, with comparable power saving features and possibly using less components.

oroboss

#38
Jan 07, 2015, 06:12 pm Last Edit: Jan 07, 2015, 06:12 pm by oroboss
I am not sure ... can be ethernet shield replaced with this ESP8266?

Paulware8

#39
Jan 07, 2015, 11:55 pm Last Edit: Jan 25, 2015, 03:32 am by Paulware Reason: change diagram
Basically the esp8266 provides the capability of a wifi shield.

Some differences are:
 ESP8266 protocol is serial: Whatever you send to its serial line is interpreted as AT commands.
 Since the normal serial line is also used to flash an Arduino, I think you should either use a MEGA (which has more than one serial port) or use soft serial to communicate with the ESP8266.  One caveat is that soft serial does not work at the higher baud rates.  I've had best result with the lowest baud rate (9600).

There is a shield schematic in https://github.com/Paulware/ESP8266/tree/master/Schematics/ESP8266Shield that could be a replacement for an ethernet shield, but it would give you the additional wifi capability and would need AT commands to talk on the network.

No sensor is complete without a watchdog guarding against system lock-ups.  I've had trouble using atmega328's internal hardware watchdog, so I will try to create one using a 555 timer.  This will be similiar to the project: https://github.com/mattbornski/Arduino-Watchdog-Circuit, but I think I will use an npn transistor to ground the trigger line.  Attached is a .jpg diagram of the idea.



flagtrax

Hi all, I don't know if anyone else has come across the documentation for the AT commands, and their returned values, but I came across a document translated from Chinese to German, to English by
bafeigum on the hackaday blog. (thank you bafeigum!) Good information for newbies getting started, as well as great reference material.

flagtrax

Well, you guy's are definitely way ahead of me for sure. Seems I spend more time searching for information than anything. I'm posting some of what I find in an effort to be helpful to those just picking up on this interesting module. I have been able to send commands through it to the UNO, described in a tutorial on the AllaboutEE site. That was the good news. The bad news is that the desired result, in this case clicking a button on an html page to turn on an LED has a tremendous lag. Also it seems that if a command is sent to quickly behind a previous one things get backlogged. It may take minutes to clear out. I'm not sure where all that is happening, but it definitely builds a case for programming the ESP for use on its own. In that regard, I came across a youtube video that helps understanding that concept. In case one hasn't seen it.

https://www.youtube.com/watch?v=pWo-ErpVZC4#t=64

rogerClark

flagtrax

I'm not using this myself, but I'd recommend you take a look at the lua firmware, it can operate as a basic web server and you can still communicate to the Arduino via Serial , but you'd need to write your own command parser in lua

Freelance developer and IT consultant
www.rogerclark.net

Chagrin

I'm not using this myself, but I'd recommend you take a look at the lua firmware, it can operate as a basic web server and you can still communicate to the Arduino via Serial , but you'd need to write your own command parser in lua
The word I assume you're looking for is "NodeMCU" (link to firmware) and yeah I really recommend it as well. I wouldn't say it's required to spend a lot of learning time with lua though; in my case I just set it to act as a Wifi-to-serial bridge using some example programs I grabbed from the esp8266.com forums. I don't need an additional speck of lua code in my Arduino sketch after that initial setup.

rogerClark

Quote
The word I assume you're looking for is "NodeMCU" (link to firmware)
Yes ;-)
Freelance developer and IT consultant
www.rogerclark.net

Go Up