Notifications
Clear all

Looking ESP8266 Beginner Documents

17 Posts
4 Users
0 Likes
4,050 Views
Ruplicator
(@ruplicator)
Member
Joined: 4 years ago
Posts: 127
Topic starter  

I'm hoping someone here can point me to a basic but thorough document on all the got'yas in using the ESP8266 NodeMCU.

I've been working on a weather station using ultrasonic detectors for wind speed and direction as well as the usual temperature, humidity, barometric pressure, rain total and rate, UV Index and pollen/particle detection. I was using an Arduino Uno and had the code working but was running low on ram. I had decided to change physical location for the weather station much closer to my house giving me the opportunity to connect to my WiFi network and display weather information via HTML.  With memory low and the need for WiFi the things I had read about the ESP8266 seemed like a perfect fit for my needs.

I had only found one pair of sensors that I was using that were going to need level shifting from 5V to 3.7V. And in my naive thinking I thought my code had been written for easy pin redefinitions. 

Compared to the Uno the ESP8266 has been a nightmare for me. I'm on my third day and finally found a guide that allowed me to get "blink" to work. However, if I connect any sensors or use more complex code I get continual reboots. 

I've looked up the reset code that indicates it is a WDT (Watch Dog Timer) software time out. However, reading all the problems people have had with power supply issues that get this same error message, I'm currently investigating this.

The more I piece together about this MCU the more I find out how complicated it is and how little I know about using it. It is not just a couple of pin number changes and hardware level shifts I need to be aware.

Any help you can give me in finding the good material on the use of this processor would be greatly appreciated.


   
Quote
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1037
 

@ruplicator

Have you considered the ESP32 from Espressif Systems?  Take a look here.

 

SteveG


   
ReplyQuote
triform
(@triform)
Member
Joined: 5 years ago
Posts: 324
 

@ruplicator

The ESP is really picky about power.  You will need to have a good supply to it and don't use any power regulator on the ESP8266 boards to power sensors and devices.  I would also add a decoupling capacitor to the esp Vcc and GND.  I run separate power regulators for my ESP projects, and just have a ground reference between them and any external devices. 

Hope this helps.

Scott

 


   
ReplyQuote
Ruplicator
(@ruplicator)
Member
Joined: 4 years ago
Posts: 127
Topic starter  

Thanks guys,

@codecage

I have an ESP32 in route. It seemed to me to be a little overkill for this project. I'm just so new to either of these devices I'm probably going to have trouble regardless of the device I pick. I'm on a steep learning curve and my frustration is high right now. I really would like to get the ESP8266 working for this application but if it doesn't work out I have the ESP32 to fall back on. Can you give me specific reasons you would pick the ESP32 over the ESP8266?

 

@triform

Thanks for the tips. The symptoms I was seeing leads me to believe that my current problems are power related. I am using the USB connector to my laptop right now with a 30Uf capacitor across the 3.7V supply. I really don't think that is getting it. By the way I measured the voltage on the regulated output and it was only 3.2V. Is that correct and if not do I have any way to change it? I have a 5V supply at 1A I'll give it a try tomorrow.


   
ReplyQuote
Ruplicator
(@ruplicator)
Member
Joined: 4 years ago
Posts: 127
Topic starter  

Just in case anyone else looks at this thread I have located a resource that shows a few of the idiosyncrasies of the ESP8266.

https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide/using-the-arduino-addon

Here is another one:

https://techtutorialsx.com/2017/01/21/esp8266-watchdog-functions/

I believe I already have experienced a couple of these peculiarities in my short relationship with this device. 


   
ReplyQuote
triform
(@triform)
Member
Joined: 5 years ago
Posts: 324
 

@ruplicator

3.2v is within the range of 3.3v supply, but it's the current that the esp has an issue with.  I know when the esp came out, I beat my head getting it to work with other toys 🙂 I made up two PCB boards last year and I did one with two regulators, and it works ok with other children, but the other one, I had a brain-laps and only did one regulator and it is a problem that I have to fix.  Just a few nights ago, I had a brown-out loop on a project I'm working on on my bench.  The ESP is great and I love it, but it can throw a temper tantrum sometimes 🙂

 


   
ReplyQuote
Ruplicator
(@ruplicator)
Member
Joined: 4 years ago
Posts: 127
Topic starter  

@triform

If I put  regulated 5V on the VIN and still use the USB for programming, is there any conflict with the USB supply?


   
ReplyQuote
triform
(@triform)
Member
Joined: 5 years ago
Posts: 324
 

@ruplicator

 

Yes, you will want to either power that regulator off or pull the esp out of the circuit.  It can be fiddly during development 🙁


   
ReplyQuote
Ruplicator
(@ruplicator)
Member
Joined: 4 years ago
Posts: 127
Topic starter  

Thanks again for the help. I'll give it another try later today and see how far I get.


   
ReplyQuote
Ruplicator
(@ruplicator)
Member
Joined: 4 years ago
Posts: 127
Topic starter  

Here are a couple more ESP8266 documents that I thought would be useful to anyone working with this MCU:

Usable Input/Output pins:

 

Pin functionality:


   
ReplyQuote
Ruplicator
(@ruplicator)
Member
Joined: 4 years ago
Posts: 127
Topic starter  

@codecage

Well it looks like I will be going with the ESP32 after all. It took several days to get enough information from documentation on the web and through experiments but I finally determined that the ESP8266 just didn't have the quantity of pins that could be used for input/output as I needed. I gave it a valiant try and consolidated as much as I could but the  number of usable pins on the ESP8266 is nowhere close to the advertised.

It was quite a learning curve with all the yield() and ESP.wdtfeed(); required commands and the the pins that can't be held low or high during boot or that the MCU holds high during boot. Not to mention the finicky power requirements and all the level shifts required to work with some 5v sensors I'm using. 

I realize some these challenges will not go away with the ESP32 but not having enough control pins on the ESP8266 was a show stopper.


   
ReplyQuote
JoeLyddon
(@joelyddon)
Member
Joined: 5 years ago
Posts: 157
 
Posted by: @ruplicator

Here are a couple more ESP8266 documents that I thought would be useful to anyone working with this MCU:

Usable Input/Output pins:

 

Pin functionality:

This is strange...  In the original post, the links were NOT displayed...  just a blank area...  On both of them.

Now, when I go to reply with a Quote, the links show up!  I will have to click on them after I post this msg to see them.

 

Have Fun,
Joe Lyddon

www.woodworkstuff.net


   
ReplyQuote
JoeLyddon
(@joelyddon)
Member
Joined: 5 years ago
Posts: 157
 

Now they go away again!!  Weird!!  Yes?

 

Have Fun,
Joe Lyddon

www.woodworkstuff.net


   
ReplyQuote
JoeLyddon
(@joelyddon)
Member
Joined: 5 years ago
Posts: 157
 
Posted by: @joelyddon
Posted by: @ruplicator

Here are a couple more ESP8266 documents that I thought would be useful to anyone working with this MCU:

Usable Input/Output pins:

 

Pin functionality:

This is strange...  In the original post, the links were NOT displayed...  just a blank area...  On both of them.

Now, when I go to reply with a Quote, the links show up!  I will have to click on them after I post this msg to see them.

I captured the jpg's and will try to insert them here:

 

image
image

 

 

Have Fun,
Joe Lyddon

www.woodworkstuff.net


   
ReplyQuote
JoeLyddon
(@joelyddon)
Member
Joined: 5 years ago
Posts: 157
 

It worked!!

Crazy...  I had to display the pic on my computer THEN, COPY it and Paste it to the Msg to Post.

 

Have Fun,
Joe Lyddon

www.woodworkstuff.net


   
ReplyQuote
Page 1 / 2