I'm trying to connect a WiFi module, ESP8266-01 to an Arduino Uno. But, as I've understood, this module will only work with 3.3 V. Since all of the data pins use 5 V, one of the solutions is to use a voltage regulator, such as LM2596.

My questions are:

  • Does anyone know if there already exists a tutorial that describes the way this WiFi module can be connected to an Arduino Uno?
  • For a simple server, would I need to use several voltage regulators (since there are quite many pins)?
  • Since Rx is the receiver, it would not need a voltage regulator because that pin can handle up to 5 volts?
  • Is there any need for an external power source, such as a cell?
  • One example - replacing a voltage regulator, learn.adafruit.com/arduino-tips-tricks-and-techniques/… – soerium Oct 2 '15 at 21:37
  • 1
    Does anyone know if there already exists a tutorial that describes the way this WiFi module can be connected to an Arduino Uno? - I Googled ESP8266 arduino and got over half a million hits, so yes, I believe you could find information about it. – Nick Gammon Oct 2 '15 at 21:50

Since all of the data pins use 5 V, one of the solutions is to use a voltage regulator, such as LM2596.

You do not want a voltage regulator you need a level shifter.

You can buy them cheaply or make them up with a transistor or MOSFET.

I gather the ESP8266 has a Tx (transmit) to the Arduino. You probably don't need to level-shift that, as the Arduino Uno will interpret 3V upwards as a HIGH. For the Rx (receive) from the Arduino you need to level-shift the data pin (possibly a voltage-divider might work) since the 5V from the Arduino needs to be converted down to 3.3V.

The ESP8266 Vcc and CH_PD can go to the Arduino 3.3V pin.

Disclaimer - I haven't done this, I am summarizing what I read on various web pages. Read some of the answers on the pages you get when you do a Google search for more details.


| improve this answer | |
  • Thank you for your answer! I have two more questions: Wouldn't it work to use the voltage regulator as described in youtube.com/watch?v=XdGFzLANsd4? Is it possible to output 3.3V using an analog pin (marked with ~)? The voltage regulator I was thinking to use is: kjell.com/sortiment/el/elektronik/arduino/moduler/…. – Artem Oct 3 '15 at 10:26
  • He appears (for some strange reason) to be using a separate regulator to supply power to the ESP8266 - ignoring the fact that the Arduino has a 3.3V pin which does just that. He also connects Tx/Rx without any level shifting which is wrong. In particular, sending to the ESP8266 should be via a level shifter, or at least a voltage divider. – Nick Gammon Oct 3 '15 at 21:24

Check out the ESP-Link project over on Github. It has a pretty decent implementation of communicating with an Arduino via UART. As mentioned in another comment you will need a 5v-3.3v level shifter. But if you want to make things a little less messy you could just get a 3.3v Arduino mini for probably around the same price as the level shifter. Esp-link is built with the esp-open-sdk so you will have to spend some time setting up the toolchain if you haven't already.

I'm working on a project right now using a Moteino + ESP-12E and it's working great. However I'm planning on porting the RFM69 library and removing the Arduino portion completely. I would recommend doing the same if you can. The link below shows how to use the ESP with a port-expander (using SPI) so you can have more GPIO with the ESP. https://github.com/MetalPhreak/ESP8266_MCP23S17

| improve this answer | |

If you want a simplest solution, you can just connect your 5V pin of Arduino to the 3.3V external power supply. It will work just fine on 3.3V and all of its GPIO pins will be 3.3V too.

Warning: You must be careful because if you plug your Arduino to the USB wire, you will instantly get the 5V on all the pins, so you will burn your ESP. So you will have to disconnect ESP during programming.

The easiest (and safe) way for me in this scenario is to just use a standalone ATMEGA328P-PU chip on a breadboard and connect it manually. You just have to plug in 4 capacitors, a 16M oscillator and a resistor and upload sketch using a programmer (like USBasp) and "Upload using a programmer" button. You can then safely run everything on 3.3V because the programmer has a jumper and can work on 3.3V too and you don't have to use ANY level shifters and or voltage dividers. In my case they were not even working (I don't know why). You connect such "environment" once on a breadboard and you can safely work with it later. Let me know if you need more info on this.

Warning: If you work with SPI bus (MISO, MOSI, SCK), like an SD card reader for example, then you must secure the SPI lines of the device (card reader) with resistors, because you may also burn your chip if 2 opposite signals are directed to the same line by 2 separate devices. I've burned my 328P like this once.

Warning: Don't use a programmer for supplying power to your circuit. It can work for programming, but when your ESP starts connecting to WiFi it will require much more power than the programmer can provide! In best scenario it will just not work and hang up or reset.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.