22

I’m a hobbyist and have used Arduino so far for simple projects. Now I want to build a project involving addressable LEDs, I want to write several programs on the Arduino for the LEDs and on my phone I select which ones to run.

I found ESP8266 as a good and cheap solution to talk to my Arduino. Searching on the web to learn getting it to work I found that It has its own mcu on it and I can write and upload my code in Arduino IDE! 20kB of RAM, 80MHz CPU and 4MB of flash for 3 USD (However I’m not sure of these numbers but even one fourth of it is great)!! If I just need a few GPIOs why should use an Arduino UNO? Is this module reliable?

ahmadx87
  • 549
  • 2
  • 9
  • 16

4 Answers4

13

Well, the answer of the question "Can it replace Arduino" - yes, in many cases it can.
Whether it would be "the Arduino killer" - I doubt it.
There are multiple arduinos and ESPs in my home and 1 ESP in my office running 24/7 as a part of my self-made (and constantly under development) smart home solution, together with 1-2 PCs. On top of that I have several experiments / unfinished projects involving the ESP.
So, from my not-so-limited experience, here are the pros and cons of ESP compared to Arduino:

++++ Internet connectivity built in!
++ Faster clock and more memory.
+ Runs on 3V3 (most, but not all Arduinos are 5V) so it can interface 3v3 devices (like most of the display modules) directly, without level shifters.
+ The "basic" ESP-12E costs about as much as an Arduino nano or pro micro.

- The "basic" ESP-12E is 2.0mm pitch, not 2.54mm, making it a pain in the ass to work with.
- There are breakouts that make it easier for prototyping, but they increase the cost and take too much space on a breadboard / protoboard.
- The most common breakout - NodeMCU - is more expensive and has pins remapped, major annoyance, unless you program it in Lua, which is only ok for very simple projects. IMO, it should be used for prototyping only.
- They run on 3v3, making it hard to interface 5V modules, fully turn on most MOSFETs, etc.
- They are extremely picky on their power supply.
- They draw significantly more power than the Arduino when not transmitting and much more when transmitting.
- They are almost always worse for battery operated projects - you need 3v3 regulator (which has quiescent current), you need to sleep a lot (and you need GPIO16 broken out for that) and at the end of the day an arduino + a low-power radio will do the same job while lasting significantly longer on battery.
- They have less GPIO pins and some of them must have set voltages at startup (GPIO0 - high, GPIO2 - high or floating, GPIO15 - low), also they "wiggle" some of their IO pins on startup, often making them unusable for many devices.
- They only have one ADC, and to my knowledge it is slower than the already slow Arduino ADCs, plus you can only use it with 0-1.1V (internal reference).
- Many of the Arduino libraries work out of the box or are already ported, but many don't. You either have to port them yourself or wait for someone to do it. In general, the Arduino community is much bigger and more mature, so most "noob-friendly" tutorials, libraries, etc. are provided for the Arduino.

Having that said, the ESP8266 is still great and extremely useful. Even Lua is useful for quick small projects. In most cases where internet connectivity is required, they seem to be the best solution. In many other cases, whether you will use ESP or Arduino actually doesn't matter. And sometimes the Arduino (or the little ATTiny85) is the better choice.
As always, "the right tool for the job" is the way to go.
Or combination of tools.

Mishony
  • 425
  • 2
  • 6
1

If you can program it, then of course it is viable to directly control your lights. It doesn't have a large number of I/O pins like the Arduino does, but as long as you have enough to do the job, it certainly drops the cost, the size, and the power requirements.

1

Yes there are a few I/O pins, so in theory you could drive one or a few leds or use an I/O port expander (I2C) for example.

And yes you can develop software and download it into even the low cost modules. The Arduino-like angle is just one way to do this. It is not an ARM as one might be lead to believe. But there is a gnu toolchain for the esp8266, etc. Yes 80 or 160MHz, 32 bit RISC, some flash, some ram.

old_timer
  • 186
  • 2
1

The Arduino Uno board and the ESP module are not the same, but as long as the GPIO of the ESP8266 provides the hardware that you need for your application it will work.

One of my concerns is certification. The product has received several certifications, you'ld need to check if your version is also certified. You can lookup the manufacturer's certifications (and some documentation) from the FCC Search Page by entering 2AC7Z as the grantee code. The board you use may depend on those or require their own certification.

As you noticed, it can be added as a board type to the Arduino tool which makes it a lot easier for hobiests to play with it.

I just checked the grants and all three of them require that the WiFi antenna is kept at least 20 cm of all persons.

le_top
  • 121
  • 8