Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

ESP8266 fun - no question or problems

Status
Not open for further replies.

3v0

Coop Build Coordinator
Forum Supporter
It took me a while but I finally got to where these are working for me. I am programming ESP12E's and a sparkfun thing using the Arduino IDE.

My first project is a doorbell system. It uses a PIR in conjunction with the doorbell switch. I will know that the FEDEX driver did not ring the bell! The ESP connects to my local wifi and uses the Pushetta server to push an alert to my iphone. A bit convoluted but latency is only a second or three.

The coding is easy with all the good examples. I did run into that rebooting thing. Not sure exactly why, went back to a version of the code that worked and coded from there. No problems.

I purchased some of the white breakout boards. One has to run a few wires to setup the ESP to work.

The adverts claim the 12F is more stable. I have some on order from banggood. Never used them before. Put in a 2nd order for 5 MB102 dual rail power supplies. Can't think about building them for $1 each.

Having read the previous threads about the ESP I need to add this: I don't worry about wearing out a PIC's flash so I don't see whey one would worry about the flash on a cheap part like this. The 12F's are 3 for $5. Not that it matters much but Arduino code is compiled and lua used a byte code interpreter. Use what you want its a free country.

I miss ICD but as the title says I am having fun and that is what it is all about.
 
There lots of fun I don't flash is a problem myself but there is so fast at changing parts not for sure what you have. I use one to turn on the light lol
 
Hi 3v0.

I'm interested in what you're doing. I just got a Nano a couple weeks ago when I noticed the prices dropping below $2 from the Chinese vendors and I've been having a blast while reading and researching and experimenting like crazy.

The ESP8266 + Arduino articles and tutorials I've been reading are fascinating and I'm wondering if you think a NodeMcu v3 board (ESP-12F) might be worth the investment ($3.10) for me?

Cheerful regards, Mike
 
There 5 for $13 even free shipping You two not have a problem with them LOL. The one's that do is because they just jump in and never read anything I spent weeks reading the sdk forum .
It's a really fun chip I buy just the modules and add my own usb to serial chip.

Not my best board but it worked
espBoard.jpg
 
Last edited:
Here the Schematic i use to program the esp 12

That looks like an awful lot of work for little gain, why not just use a cheap FTDI USB/Serial module?, like these:

https://www.banggood.com/5Pcs-FT232RL-FTDI-USB-To-TTL-Serial-Converter-Adapter-Module-p-959209.html

I've just ordered a couple of ESP12's, as well as some ESP01's complete with adaptor boards, making them nice and easy to use, easy pin connections and 5V supply and data lines:

https://www.banggood.com/ESP8266-ES...ess-Adapter-Module-For-Arduino-p-1049585.html
 
Nice Burt.

Mike I would go with a 12F. Burt likes the nodemcu and lua. By the time I got the ESP talking I had already switched to Arduino.

I am running the first ESP12 on a breakout board on a solderless breadboard. The TP roll tube contains the PIR. The small IC in the back left is a logic probe. Switches are pgm and reset. For serial com I am using a cheap USB to TTL cable. A while back I purchased a bunch of them for $1 each. The only drawback is they use a pirated FTDI design and any time a change is made to any PC com port you have to re-select the older FTDI driver that works with them.

2016-05-22 05.26.06_small.jpg


Unless more circuitry is need when I deploy the doorbell I can add a bit of grass and a resistor or two to the back of the breakout instead of laying out a PCB.

As I mentioned in my first post I miss a real debugger. So I am installing linux on a virtual box on my windows 10 machine.

Found an good video that steps through the process, so far so good, it takes over an hour and I am not yet finished.
Published on Nov 19, 2015
A walk through of building a development environment using VirtualBox, Ununtu (Linux), Eclipse and an ESP8266 tool chain. The end result is an environment where you can compile and flash C applications for an ESP8266.
<iframe width="640" height="360" src="https://www.youtube.com/embed/AEWoeL1hH2I" frameborder="0" allowfullscreen></iframe>

If that don't work here is the URL.

I will post again if/WHEN I get it working.
 
I have to agree with Nigel. The Chinese are selling so many useful electronic modules and such for next to nothing that using their stuff can save a load of work.

This is what my USB to TTL's look like. If you need flow control lines these will not work. They only have TX RX 5V and GND. The Tx line is 3.3V. They are Chinese but purchased on ebay from a seller in California. I was working on the miwi mesh net and wanted one for each of my test nodes. Thinking I paid $10 for 10 of them.
s-l1600.jpg
 
I have to agree with Nigel. The Chinese are selling so many useful electronic modules and such for next to nothing that using their stuff can save a load of work.

This is what my USB to TTL's look like. If you need flow control lines these will not work. They only have TX RX 5V and GND. The Tx line is 3.3V. They are Chinese but purchased on ebay from a seller in California. I was working on the miwi mesh net and wanted one for each of my test nodes. Thinking I paid $10 for 10 of them.
s-l1600.jpg

I've just ordered some of those as well, depending on type the USB plug clips apart, and you can select either 5V or 3.3V power on the red lead. In my specific case I'm wanting 5V anyway, as I simply want a USB/serial to feed an HC12 wireless module, which I will fit in a small plastic box - and it's far easier to just stick the HC12 in the small box, and wire the lead directly through a hole in the box, rather than try and squeeze an FTDI PCB in there, and try and arrange for a mini-USB plug to fit through the casing into the PCB.
 
The Schematic I posted is just to program the the module it let you use the arduino ide or as what 3v0 said he wants to use
I mentioned in my first post I miss a real debugger. So I am installing linux on a virtual box on my windows 10 machine.
There tool chain on linux it works with ubuntu should work with windows but for some reason it don't but works great on virtual box linux running on windows
does not work on a stand alone linux box without changes.
They made the sdk on a windows box running linux virtual and i guess it has file placed differently.
But you got have a way to program these there not breadboard friendly
s-l225.jpg

I made a carrierboard to bring the pins out and program them then put them in what I want
Like the light I turn on with my cellphone. I tried about every way to program these I kind of still like Lua and use the sdk to make firmware without stuff I don't need.
 
Last edited:
I don't want to work with the bare ESP-12F board at this point and that's why I was looking at the NodeMcu v3 device. Now I'm kind of leaning towards the Wemos D1 Mini for $2.88 (including shipping). For a mere $1 over the cost of a bare ESP-12F module, it's a carrier/breakout board with built-in serial-to-usb. There are also several shields available (prototype, micro-sd, oled display, etc.).

Regards, Mike

wemos.png
 
Last edited:
I have a node mcu its a nice board but it's childs play to use just the modules and there cheap if you get them 5 or 10 at time
That board looks great going by the pictures on there website it's a E or a Q on it You never know what your getting with the esp -12 modules I got some from banggood that said they where 4 meg esp - 12 but they where the q ones that bring out program pins for debugging and stuff on the end there 6 solder pads on the end. To really get inside one of these you need one with the module that's on this one or a module like it that brings out the 6 pads on the end.
ESP8266-NodeMCU-Pinout.png

These modules like on this one don't bring out the pins you need to debug from what I read but you can flash both with new firmware. I never tried any debugging code don't work I fix it and flash it till it does.
nodemcu-wifi-wireless-c-esp8266-nodemcu-p-arduino-299601-MLB20372606876_082015-F.jpg
 
Last edited:
I've used the ESP8266. Made a little breakout and made some test applications, but I just can't find anything useful for it. Wifi is just not that great for small node networks. Power consumption is a little too high. Pin count is pretty much non-existent. Looking at the projects that people have made, they are mostly just sensor nodes for data viewing over the web.
 
Good for turning on the lights too but it's web based too. There coming out with a new one that may change all that there fun to play with really easy to use with lua and the arduino ide but they use a lot of power mine just a plain module that is programed uses up to 200 mA ide its like 80 mA
 
  • Like
Reactions: 3v0
Have the Eclipse/Ubuntu/VirtualBox setup running. It compiles code and downloads but that is where I get confused. The video talked about a second serial channel for output from the print statement. Will have to look into that the next time it is too ugly to work outside.

I have a good many applications where the ESP will be perfect. It will be great to have the shop lights controlled by these. Maybe add a PIR that will turn them off. Even with the cost of asolid state relays it will not cost any more than putting pull switches on each light fixture.

Put one ESP on the dust collector and another in my pocket. Or maybe maybe get fancy and do current sensing on the machines using the dust collector.

I have a few things powered by extension cords. Freezers and pond pumps are two I can think of. It would be nice to know if they lost power. Have the ESP powered by the same cord send out a heart beat every minute or so. When the beat stops you know the power is disconnected.

Also thinking about going to a tree network instead of a mesh.
treeNet.png

Each of the center or root nodes would talk to my WiFi router Maybe have redundant root nodes so one does not loose all the leaves on a single tree should the root fail.

Either the entire net goes down when power fails or battery backup is needed on any roots with battery backed up leaves. Also the WiFi router.

Just dreaming here.



.
 
I have a good many applications where the ESP will be perfect. It will be great to have the shop lights controlled by these. Maybe add a PIR that will turn them off. Even with the cost of asolid state relays it will not cost any more than putting pull switches on each light fixture..

I have a wireless network around my home for such things. Although it's peer-to-peer proprietary amplitude-modulated. Some are 500 feet away. Wi-Fi wouldn't reach that far. I have quite a number of nodes - weather station, time service, power controls on remote outlets, garage door etc. It even has Internet gateway which can send texts on my phone where something goes wrong. I also have about a dozen of new ones which I want to build when(if?) I have time.
 
  • Like
Reactions: 3v0
Wifi-TCP/IP is just overly complex for a simple network requirement like this. Creating a server/client relationship for each connection would make it tough to make a mesh network with collision detection. A simple network using RF modules is just easier and more versatile. You can then match the microcontroller to the end nodes task.

I have a simple RF network I just made up. It controls two light dimmers and my gas fireplace so far. The remote control uses a touch screen LCD that the ESP8266 just couldn't handle because the number of pins. It runs off batteries. I'm working on the current use, but I currently have it down to a month and a half between recharging the batteries with basic use.

I made up a simple light switch with an ESP8266 with web access, but connecting with the phone or tablet was just too much of a hassle to do anything real time. It would be great for datalogging, but I just don't have anything interesting I'd like to log.

I've always liked CNLohr's channel and he does some amazing things with the ESP8266.
https://www.youtube.com/user/CNLohr
 
I don't care how complex something is so long as its hidden from me and it works well. After you remove the serial port messages and clean up the code a bit this is about all it takes to connect to WiFi.

const char* ssid = "myWiFi"; // your network SSID (name)
const char* pass = "suchAsimpleThing"; // your network password
int tries = 0;

IPAddress ipMulti (192, 168, 1, 255);

// setting up Station AP
WiFi.begin(ssid, pass);

// Wait for connect to AP
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
if (++tries > 30) break;
}

A PIR in my office senses me as I enter. By the time my butt hits the chair it has connected to my WiFi, notified pushetta, and pushetta pushed a msg to my iphone. It's doing this for about a week. When the PSU's arrive I will deploy it to the front door.
 
Wifi connecting is not node networking. You brought up the leaf network rather than mesh, which is node to node networking. Just connecting to wifi is easy, sure. I assumed you were trying to implement a network that was self forming.

At some point I will likely use one to connect my little RF network to the web, but not really certain.
 
I have not settled on s network topology. I have been down the mesh net road with MiWi. The stack leaves room for little else on an 18f. I started to move to the 24F about the time microchip switched compilers. Never got around to merging my work eith the new stack.

There is a mesh code demo for the esp8266. On the sparkfun thing it went into the weeds. I have not looked at the source. Installed the eclipse ide so I could do some debugging. Still not quite there.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top