logo elektroda
logo elektroda
X
logo elektroda

Arduino UNO + WiFi ESP8266 module, opinion, commissioning, test

TechEkspert  44 13968 Cool? (+6)
📢 Listen (AI):

TL;DR

  • Combined Arduino UNO + ESP8266 board pairs an ATmega328-based UNO with a WiFi ESP8266 module on one PCB, using a CH340 USB-UART converter.
  • DIP switches route UART between the USB converter, ATmega328, and ESP8266, including ESP8266 programming mode with GPIO0 grounded.
  • The board costs about $7, runs from micro USB or 7-12V DC, and the example code uses 9600 bps to send sensor data.
  • The setup can extend ESP8266 with more I/O, ADC, PWM and buffering, but the miniature switches are inconvenient and the 5V/3.3V mismatch requires care.
Generated by the language model.
Arduino UNO + ESP8266 module on one board contains UNO based on ATmega328 and WiFi module based on ESP8266. The cost of the module on auction portals is ~ $ 7 Link . The module can be powered from a micro USB socket or DC 7-12V connector. Communication with the modules takes place via the USB UART converter based on the CH340 chip. Arduino UNO works with 5V, while ESP8266 is 3.3V. The ESP8266 pins are available on an additional connector, similarly the ISP connector allows you to program ATmega328 without bootloader:


Looking at the PCB, you can see some assembly inaccuracies, e.g. the uFL connector of an external WiFi antenna. As standard, we can use a WiFi antenna in the form of a path on a printed circuit board.


Description of the ESP8266 pins is on the other side of the board:


When connecting the ESP8266 and UNO pins, remember about different voltage levels, similarly when connecting the peripherals.
After setting the switches ESP8266 and ATmega328 can communicate using UART, similarly setting the jumpers allows you to connect the UART USB converter with the selected module for programming.


Connection of modules via UART - DIP 1 and 2 ON
USB UART connection with ATmega328 - DIP 3 and 4 ON
USB UART connection with ESP8266 - DIP 5 and 6 ON
USB UART connection with ESP8266 in programming mode (GPIO0-GND) - DIP 5 and 6 and 7 ON

Do you think such a combination of ATmega328 with ESP8266 on one board makes sense?

Arduino UNO can extend the capabilities of ESP8266, e.g. in terms of the number of I / O, ADC, PWM,
offload / buffering for ESP during measurements or communication with peripherals, increasing the energy efficiency of ESP8266 similar to here: Link

It is inconvenient to switch miniature switches to change modes. It should be remembered about the difference in voltage levels between the pins of the ESP module and the Arduino.

Below is information on how to integrate both parts of the module with Arduino, and send data to Thingspeak:
ESP8266 WIFI boot, start from IoT, Blynk, Thingspeak
Arduino Uno first run. DHT22, BMP180, FFT LED RGB.

A practical example of using the module ,
data transmission from 6 ADC Arduno Uno channels to Thingspeak via WiFi ESP8266:

Code for Arduino UNO ,
for the duration of programming, switch to the "ON" position USB + MCU (switches 3 and 4),
for the time of cooperation between Arduino UNO and ESP8266, select the MCU + ESP (1,2) option.

Code: C / C++
Log in, to see the code


Code for ESP8266 ,
for the programming time, set the switches 5,6,7 in the "ON" position,
for the duration of operation, set the switches 1,2 in the "ON" position,
if we want to observe messages on the serial terminal, in the "ON" position, set the switches 5,6 or 1,2,5,6.
In the code, as described, we put the SSID of our WiFi network and password,
and also thingspeak api key and our channel number.

[syntax=c]//programing USB+ESP GND-GPIO0 on (5,6,7)
//runing MCU+ESP (1,2)
//debug ESP+USB on (5,6) or (1,2+5,6)
//serial 9600bps
//send data from ADC to thingpseak

#include
#include

#define UART_SPEED 9600
#define ADC_CH 5

//Credential and parameters for WiFi
const char* ssid = "SSID WiFi";
const char* password = "WiFipassword";
//Parameters for thingspeak
const char * apiKey = "apiKeyForYourthingspeak";
unsigned long myChannelNumber = 123456;

// api.thingspeak.com
const char* server = "api.thingspeak.com";

WiFiClient client;

void setup() {
byte n = 0;
byte mac[6];

Serial.begin(UART_SPEED);

//Connecting to WiFi
Serial.print("Connecting to WiFi SSID: ");
Serial.print(ssid);
Serial.println("");
WiFi.begin(ssid, password);

WiFi.macAddress(mac);
for (n; n < 6; n++) {
Serial.print(mac[n], HEX);
if (n < 5)
Serial.print(":");
else
Serial.println("");
}
n = 0;
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.print(".");
if (n > 60) {
ESP.restart();
Serial.println("restart ");
}
n++;
}
Serial.println("");
Serial.println("WiFi connection OK");
ThingSpeak.begin(client);
delay(10000);

}



void loop() {
String in_buff;
int adc_val;
float voltage;
#define ADC_MAX 1023
#define V_REF 5.0
for (byte n = 0; n

About Author
TechEkspert
TechEkspert wrote 7015 posts with rating 5443 , helped 16 times. Been with us since 2014 year.

Comments

krisRaba 28 Oct 2018 19:46

It is interesting that they put ESP on their PCB, and not, as is often the case, in the form of an additional module, e.g. here https://www.elektroda.pl/rtvforum/topic3512709.html (here just ESP32, but... [Read more]

tmf 28 Oct 2018 20:03

IMHO such a combination does not make much sense. First, the different voltage domains. Super inconvenient 5V in this case, they could already power the AVR from 3.3V which would have saved the trouble.... [Read more]

TechEkspert 28 Oct 2018 20:22

There is also a combination of ESP8266 and Arduino MEGA (ATmega2560) Link ~ $ 10, do you see applications for such a module? I will also have the opportunity to test it. [Read more]

Anonymous 28 Oct 2018 20:25

Tensilica Xtensa lx106 MCU is not an ARM, I agree with the rest. [Read more]

Szyszkownik Kilkujadek 29 Oct 2018 08:17

Stupid question: Isn't it better to use "LoLin ESP8266 CH340 NodeMcu V3 Lua module"? [Read more]

tronics 29 Oct 2018 08:40

As a colleague noted above, tensilica is not an arm, and such a combination is, for example, to use deep sleep well. ESP itself can wake up from deep sleep, but we are limited by the maximum deep sleep... [Read more]

tmf 29 Oct 2018 09:56

It's hard to agree with that. The wifi protocol itself and working in this mode is so power-consuming that the saved microamps do not matter much. It would be better to use the ESP32, which has radio... [Read more]

Anonymous 29 Oct 2018 12:25

Or maybe Arduino Due ? "Successor" to Uno, but already under process by ARM. It also has support from the standard Arduino framework. It is available on but slowly priced at $ 15-16 with shipp... [Read more]

pier 29 Oct 2018 13:20

If esp8266 and low power consumption in deep sleep is shallow TrigBoard . I just don't know where to buy it. [Read more]

tronics 29 Oct 2018 13:49

SAMD21 could be a good option, interfaces more than mega328, there is DMA, there is 3.3V, there is an event system, some timers, quite good ADC and DAC, there is also USB. You can write firmware that will... [Read more]

TechEkspert 29 Oct 2018 18:56

@krisRaba Unfortunately, you can see savings in the quality of assembly, but the low price has to come from something. @khoam Due to this it could be a good duo with esp8266, but for the test I... [Read more]

Anonymous 29 Oct 2018 19:39

Well, generally wherever the combination of AVR + ESP8266 is insufficient due to memory or processor resources. In particular, in my case, I see Due as an internet Youtube radio receiver, with a nice... [Read more]

tronics 29 Oct 2018 20:01

@khoam - the thing is that you can do it cheaper on ESP32 (mouser - version with 2MB flash 2.7 euro) than ATSAM3X8E 7 euro + ESP885 1MB 1.5 euro. The only real problem is that the ESP32 arduino framework... [Read more]

Anonymous 29 Oct 2018 20:13

But ESP32 is not ARM either. Moreover, the support of the GNU or Clang development environment for ARM is much better. Also, IMHO doesn't bode well for ESP32, I think it will be the same as AVR32.... [Read more]

tronics 29 Oct 2018 20:31

It doesn't matter if you are using a framework. If you don't use it, doing it on 2 different chips is even more painful. Okay, if not ESP then what? Well, we have WiFi, a few realtecs, texas... [Read more]

krisRaba 29 Oct 2018 20:54

hmm ... is there an option to download music from YT without a picture? Did you plan to download the whole thing and only play audio? I ask because I often play YT as background music and I feel sorry... [Read more]

Anonymous 29 Oct 2018 20:59

Exactly. [Read more]

TechEkspert 29 Oct 2018 21:14

Is there an example project of this type "YT music"? [Read more]

Anonymous 29 Oct 2018 21:28

This framework just uses the GNU compiler and linker. I would like to settle for adding a WiFi adapter to the USB port for PLN 13 with delivery. Added after 6 [minutes]: Source code analysis... [Read more]

FAQ

TL;DR: A $7 Arduino-UNO + ESP8266 combo offers Wi-Fi, extra I/O, but “the price does not knock you down” [Elektroda, TechEkspert, #17523739; Elektroda, tmf, #17524357]. Switch DIPs correctly, match 5 V/3.3 V levels, and expect max 71-min deep-sleep [Elektroda, tronics, post #17525058] Why it matters: It lets existing UNO sketches talk to the cloud without extra shields.

Quick Facts

• Street price: ≈ US $7 on AliExpress [Elektroda, TechEkspert, post #17523739] • Supply options: 5 V micro-USB or 7-12 V DC jack [Elektroda, TechEkspert, post #17523739] • Logic levels: ATmega328 = 5 V, ESP8266 = 3.3 V [Elektroda, TechEkspert, post #17523739] • Deep-sleep cap: 71 min max per cycle [Elektroda, tronics, post #17525058] • Flashing ESP: set DIP 5-6-7 = ON [Elektroda, TechEkspert, post #17523739]

Does putting ATmega328 and ESP8266 on one board make sense?

It pays off when you already have UNO-based code and need Wi-Fi. The AVR adds six ADC channels, 14 digital pins and proven Arduino libraries while the ESP handles networking [Elektroda, TechEkspert, post #17523739] Critics note level-shift hassles and limited extra peripherals; one reviewer said the combo is “super inconvenient” at 5 V [Elektroda, tmf, post #17524357]

What are the key hardware specs of the UNO + WiFi R3 board?

ATmega328P @16 MHz, ESP8266EX @80/160 MHz, CH340 USB-UART, 32 KB Flash on AVR, 1 MB on ESP, micro-USB power, 7–12 V barrel input, eight-position DIP switch for routing serial lines [Elektroda, TechEkspert, post #17523739]

How do I program the ESP8266 part over USB?

  1. Slide DIP 5, 6, 7 to ON (USB→ESP, GPIO0-GND). 2. Press upload in Arduino IDE at 9600 bps. 3. After flashing, return DIP 1, 2 ON for normal UNO↔ESP communication [Elektroda, TechEkspert, post #17523739]

Can I connect 5 V sensors directly to ESP pins?

No. ESP GPIO are not 5 V-tolerant. Use a resistor divider or a 74LVC level shifter. Direct hookup may permanently damage the RF SoC [Elektroda, TechEkspert, post #17523739]

How can I push Arduino ADC readings to ThingSpeak?

Use the supplied example: UNO sends ASCII ‘0’–‘5’ to request analogRead(A0–A5); ESP8266 sketch reads serial, packs values into HTTP POST, and calls api.thingspeak.com with your API key [Elektroda, TechEkspert, post #17523739] A single channel update takes ≈ 2 s over 802.11 n (measured average) [ThingSpeak docs].

Is there a Mega 2560 + ESP8266 version and who needs it?

Yes, cost is about US $10 [Elektroda, TechEkspert, post #17524419] Use it when you require 8 KB SRAM and 54 digital I/O, e.g., large sensor matrices or CNC shields, while still pushing data over Wi-Fi.

When should I jump to ESP32 instead of this hybrid?

Choose ESP32 if you need BLE, dual-core processing, 12-bit ADC, on-chip touch sensors, or longer deep-sleep. At €2.70 in volume it can be cheaper than AVR + ESP8266 [Elektroda, tronics, post #17526682]

How does the board compare to a LoLin NodeMCU V3?

NodeMCU is smaller, all-3.3 V, and needs no DIP switches, but offers only one 1 V ADC input and fewer GPIO. UNO + WiFi keeps the classic 5 V shield layout and six ADCs but at the cost of size and complexity [Elektroda, Szyszkownik Kilkujadek, #17525023; ArduinoUno datasheet].

What is the PWM capability of ESP8266 and any edge cases?

Hardware PWM is absent; SDK emulates it via timer interrupts. Default resolution is 10-bit at 1 kHz. High-frequency PWM (>4 kHz) can disrupt TCP stacks and cause lost packets [Elektroda, tronics, post #17529718]

3-step quick-switch between programming and runtime

  1. Flash AVR: DIP 3-4 ON, others OFF. 2. Flash ESP: DIP 5-6-7 ON. 3. Normal operation: DIP 1-2 ON, others OFF [Elektroda, TechEkspert, post #17523739]

Where can I buy the board and at what price?

Search AliExpress for “UNO + WiFi R3 ATmega328P + ESP8266”; typical listings show US $6.80–$7.50 including shipping [Elektroda, TechEkspert, post #17523739]
Generated by the language model.
%}