2015/04/04

WiFi for everything

A few years ago making a hobby circuit WiFi capable costed at least 30$-40$. In the past year Espressif Systems introduced a very cheap and smart solution for WiFi connectivity.
In my old-new blog I am going to present my applications and experiments regarding it's new WiFi product.


ESP8266 is a highly integrated chip with complete and self-contained WiFi networking solution, either to host an application or to offload all WiFi networking functions from another application processor. It contains a 32-bit RISC processor, on-chip memory and external memory interfaces.
On the market are many types of module variants built-up from this chip, with or without antenna. I am using this variant, which costs 3$:


The firmware of the chip is still being developed by the producer, in addition an open source SDK is available as well. That means, the users are able to write programs directly to the chip without using a host microcontroller. Besides, the users can use several hardware peripherals (Flash memory, UART, SPI, GPIO, ...) as well.

Every SDK package contains an official AT firmware, which is flashed into the chip by default. It is useful, when the user has a host controller in the application, and does not want to use the ESP chip as a master CPU. In this case the WiFi module is just a slave. In order to communicate with the chip, a simple serial data transfer is being used (UART) with AT commands. These are ASCII commands, so it is quite simple to test the module using a serial terminal program on PC.

I chose this AT firmware, because it is simpler, it is under the development of the manufacturer, and I did not want to use the SDK. I wanted the module only manage the WiFi stuff, and not the whole application.

To be honest, AT commands are easy to read for a human being, but a little bit difficult to interpret in a microcontroller. Actually, it is not so hard, but I did not want to implement a complex two-way serial communication in my all programs over and over again. In my opinion UART is just a low-level communication, and in the host microcontroller's code I want to use only mid- and high-level functions (WiFi, UDP, TCP, HTTP).

Therefore, my first goal was to create a software library for the microcontroller, which manages the communication with the AT firmware. The development was a little bit difficult and long, because the command sheet of the firmware is not quite complete and clear. The chip gave in some circumstances weird responses, so I needed to check all the commands and replies using a PC serial terminal program. That means a lot of times :-)


My library supports now settings, WiFi-related, and TCP/UDP data transfer functions, and was compiled in mikroC. Some of the AT commands are missing yet, but these are not so crucial. You can download it from here.

I made a little test hardware based on a PIC18F14K50 microcontroller to try the UDP communication out. It worked very well, you can see it in the video below.




The next step is a long term TCP test. I will probably use a temperature sensor in the circuit, and will try to get the actual temperature value using a Windows or Windows Phone 8.1 app. Nothing complicated, just dealing with TCP sockets...

16 comments:

  1. What an informative blog post! Thank you so much for sharing this knowledge with your readers. I will apreciate if you keep posting stuff like that. Thanks!

    ReplyDelete
  2. If you have a large audience to reach out to with SMS, organizing your database is the most important task. Segmentation plays an important role in marketing. Then you need to seek out a quality Mass Texting Service provider with a global reach and since it would be your first time, go for one with the lowest prices and maximum features.

    ReplyDelete
  3. Huge electronic stores have multiple brand products and if they offer deals on these products, it attracts customers. The customers too, benefit from these deals as they get to buy other stuff too apart from the electronic goods. Range Hood Repair in San Diego

    ReplyDelete
  4. It is simple to shop online for electronics products since all the data that you require is readily available at your fingertips. industrial motor repair

    ReplyDelete
  5. The importance of electronics recycling is evident when taking a closer look at electronic waste. Up to thirty-eight separate chemical elements are incorporated in electronic waste. identity theft protection

    ReplyDelete
  6. Even an absolute beginner can see that selling electronics through a used electronics site is the fastest, Honest review simplest way to get money for your old devices. There really are only a few steps to it.

    ReplyDelete
  7. A person who is interested in electronics can buy these items and indulge in making and Cooktop Repair experimenting with a variety of fancy electronics items that range from clocks to robots.

    ReplyDelete
  8. Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. IRF4905 alternative

    ReplyDelete
  9. Electronic Commerce applications are upheld by frameworks and their execution is subject to four significant regions, for example, visit this blog soldering irons and stations

    ReplyDelete
  10. There are many factors that shape the competitive landscape of the car rental industry. Exotic Miami rentals

    ReplyDelete
  11. Great post! I am actually getting ready to across this information, is very helpful my friend. Also great blog here with all of the valuable information you have. Keep up the good work you are doing here. 192.168 o 1.1

    ReplyDelete
  12. Make the most of mainly premium substances - you will find him or her for: Printed Circuit Board

    ReplyDelete
  13. This is a smart blog. I mean it. You have so much knowledge about this issue, and so much passion. You also know how to make people rally behind it, obviously from the responses. shower standing handle

    ReplyDelete
  14. This is just the information I am finding everywhere. Thanks for your blog, I just subscribe your blog. This is a nice blog.. resistor

    ReplyDelete
  15. Our guide explaining everything related to the 192.168.10.253 IP address ends here. We are expecting that you have extracted the maximum knowledge from this blog.

    ReplyDelete