Home Automation (IoT) with Arduino: ESP8266/ESP32 vs. Regular Arduino Boards - Discussion on Their Respective Advantages and Disadvantages

I am currently working on a home automation (IoT) project and hope to achieve the following goals:

Control devices such as lights and fans

Read environmental sensors (temperature, humidity, illuminance, etc.)

Remote control via Wi-Fi or BLE

I hope the overall cost won't be too high

When choosing a development board, I'm hesitating:
ESP8266 / ESP32 series vs. Traditional Arduino (Uno/Mega/Nano, etc.)

My current understanding (which may not be entirely accurate
Advantages of ESP8266 / ESP32
Built-in Wi-Fi (ESP32 also comes with BLE, which is much faster in processing speed, has large memory, low cost, and strong support for IoT (MQTT, HTTP, WebServer, etc.)

Potential disadvantages of ESP8266 / ESP32:
GPIO is less than Uno (ESP8266), 3.3V devices, many 5V sensors need to be converted, some library compatibility is not as good as AVR, power-on and flashing need to pay attention to the Boot pin

Advantages of traditional Arduino (Uno/Mega) :
Stable, simple and suitable for beginners, with a large number of ready-made tutorials and libraries, a wider voltage tolerance (5V), and better controllability of real-time performance (PWM, timer)

Potential disadvantages of traditional Arduino: No Wi-Fi/BLE, requires additional modules, weak performance, and the cost may even be higher (after adding a Wi-Fi module)

I would like to ask the forum

Has the ESP series completely replaced traditional Arduino for home automation?

In your project experience, which scenarios are still more suitable for Uno/Mega?

Are there any recommended entry-level architectures (MQTT, Home Assistant, Web Control, etc.)?

Thank you all very much for sharing your experiences!

Faster processor, more memory, built-in wifi, bluetooth, a modern controller using 3v3 peripherals. Arduino 5vdc peripherals are becoming outdated.

1 Like

second ESP32 recommendation! very powerful, versatile and low cost (in UK ESP32 and ESP32S3 dev boards are typically about £7)

I have not used 5V logic microcontrollers and devices in educational, commercial and research projects for over 20/30 years - probably last device was a MC68020

If you are operating lights you need to think how you will do it - something behind the existing switch ? Lighting wired to central point ? How is it powered, relay , triac output?? I have used the little remote ket fob switches you can get on eBay , the RF solutions Zetaplus for coin battery powered switches , and NFRL24’s
This is probably more important than processor choice as is your chosen communication method and power consumption .
Specify how it will all work then see what processor setup works best .

Don’t dismiss commercial parts such as the little modules designed for this by rf solutions , and others - one I forget by who , is 8266 based and hackable . Kinetic switches ?
Think about electrical safety and how you package parts - that may favour commercial parts .

Hacking socket

2 Likes

why reinvent the wheel

sonoff + tasmota or fauxmoESP

forgot add sonoff diy to list of possibilites with node-red

1 Like

Ah .. Sonoff - that maybe the 8266 based unit .

Yes why re invent - it’s easy to under estimate the effort required to make a reliable well packaged device .

they are running ESP32 nowadays.


@emmamama - to your question

In my family we are very Apple driven so we are all HomeKit users. So xhen it comes to my home automation for fun (I've redone my home with KNX otherwise) one of my requirement is compatibility with HomeKit.

When I develop gadgets, I use ESP32 with HomeSpan mostly

I do have an RPi running HomeBridge for my older developments

Recently for Lights and animations (Halloween and now Xmas) I've deployed SONOFF MINIR4M Matter over WiFi enabled relays. They are pretty small

and embed an ESP32-C3

and you can then just say "Hey Siri, turn on animations" or "Hey Siri, turn on Xmas lights" or whatever. Of course would work with a fan or standard light in your home and the module is small enough to fit in a junction box (you need neutral).

Accroding to Tasmota 's web site

Despite using a compatible ESP32-C3 Sonoff has locked the chip to prevent serial flashing of new firmware due to Matter certification requirements.

This device is functionally the same as Sonoff MINIR4 which is a better choice if you want to flash custom firmware

so for hacking, the Sonoff MINIR4 might be a better option.

2 Likes

Besides building and operating projects, if you wish to become academically rich on the microcontroller architecture, you may start with Arduino UNOR3; whereas, the ESP32 has highly abstracted its hardware and associated software.

The best way is to work with both the Arduino UNOR3 and ESP32 in parallel and choose one or the other or even both depending on project requirements.

1 Like

Some Sonoff stuff is OK but some isn't.

The TH10 device is potentially useful with DS18B20, but temperature updating is poor and temperatures can display different values in manual or auto mode. Switching between the two modes is iffy at best. If better, it would make a programmable thermostat.

They still haven't mastered the effective times as far as local and daylight time changes go.
And technical support is poor.

However, it's better than XBee based Zigbee.

I'm still looking to see if sub-GHz can do any better

No. AVRs are still around.

I have both, some legacy UNO/MEGA with Ethernet Shield and ESP8266/ESP32.
Today I wouldn't start a basic "home automation project" with AVR but with an ESP.

For visualization and integration of several vendors, I can recommend Home Assistant (HA).

When you are already deep into AVR and/or ESP programming, integration of any JSON based communication to Home Assistant is straight forward. HA supports for example the RESTful interface, which can cover lot of usecases.

When you are on Home Assistant but with less experience with ESPs have a look at ESPHome - it reduces integration of ESP based modules to a simple copy-paste.

No experience, but a warning. If you ever expect to sell or leave your home, you will need to remove all your stuff so everything is back to standard.

1 Like

good point !
all the Home IOT equipment I have permanently connected, e.g. burglar alarms, fire alarms, heat pumps, video cameras, etc, are all commercial devices
if I sold the house I pass the user manuals, web links, etc to the new owners

at various times I have implemented various sensors, e.g. river level monitor, room temperature data logger, three phase house load data logger, etc, which I would not leave if I sold the house

Having that on your house brochure wouldn't be a good move anyway :slight_smile:

I there is a specific reason to keep the UNO format, then there is also the UNO R4 that combines UNO and ESP S3 in one package. The onboard Renesas MCU is 5V compatible as well, although the ESP32 is a 3.3V device.

For compactness, consider the Nano R3 (5V, 328P/B), Nano R4 (5V, Renesas), or if you want WiFi as well then Nano Connect (3.3V, WiFi only), Nano 33 (3.3V, BLE only), Nano ESP (3.3V, WiFi+BLE) or Pico W, Pico2 W (3.3V, Wifi+BLE, lots of pins).

when the river floods the drive,garden etc is under water
bit difficult to hide it

1 Like

I use the original or china Nano for my system, each node has one. Because of RF noise etc mine is using CAN, which does not require much memory but is reasonably fast (250K), inexpensive and dependent on nothing outside my home. I chose the Nano because it has enough memory etc for each node. I also built adapter boards where these plug into which support the drivers etc for the lighting relays etc. I also put the RTC, additional I/O, FRAM memory on that board with pin out for additional devices.

Yes, that's a good point.
Not every buyer would relish the idea of getting to grips with a commercial programmable room thermostat, let alone a box with an Arduino board in it or some hub.
It's a good idea to have an exit strategy with all the information needed for a quick return to standard controls.
Either that, or drop the price and suggest the buyer gets an electrician in.
However, none of the houses I have bought came with anything like an instruction book, let alone a wiring diagram, so the buyer should expect to do some leg work.

I was thinking more of a conversation with an agent you contract with to attempt to sell the place. Then how would the agent explain all the stuff to other agents and finally to a potential buyer. One-on-one, seller to buyer might be easy, but real world won’t work.