0

I want to connect an Esp8266 Wifi module to an Arduino nano. I am wondering if I need to implement level-shifting for the Arduino TX line to Esp RX line?

I find different schema's on the net. Some with, some without level-shifting:

With: http://community.blynk.cc/t/robot-with-esp8266-shield-and-arduino-nano/3316/8

Without: Arduino Nano v3.0 with ESP8266

Some use a capacitor between GND and Esp CH_PD pin, others use a 10K resister between the 3.3V and the CH_PD pin (https://blogs.msdn.microsoft.com/abhinaba/2016/01/23/esp8266-wifi-with-arduino-uno-and-nano/)...

What is the most basic but required setup for a Arduino Nano and a Esp8266? (I have Esp8266-12e modules)

Thanks!

  • You might also consider if one of the implementations of the ESP8266 with more I/Os could host your software under the available Arduino port, removing the need for the nano entirely. – Chris Stratton May 9 '16 at 17:05
  • @ChrisStratton do you have a link to such ESP8266 module? – mvermand May 10 '16 at 14:39
  • There are many available, probably including whatever one your are running now, unless it is especially short on memory. This is basically a software solution, not a hardware one. – Chris Stratton May 10 '16 at 14:41
1

You could use a simple diode, between the Arduino TX and ESP RX. That's what the Adafruit Huzzah uses.

It takes advantage of the internal pull-up on the RX pin of the ESP. The diode will allow a LOW, to pull the signal low, through the diode. But it will block a HIGH 5 Volt signal from going into the ESP.

  • Yes, but for signals going in the other direction you have to also do something similarly, or hope that the pin the Arduino is receiving on never accidentally gets configured as an output instead and driven high. – Chris Stratton May 9 '16 at 17:04
  • Well, that goes for a lot of thing. The same could be said for the MISO pin on an SPI device connected to an Arduino. I've seen any protection on SPI lines, except maybe a resistor. – Gerben May 9 '16 at 18:03
  • 1
    @ChrisStratton I dont get what you mean. One would assume that Arduino's RX pin is already configured as an input in firmware, when its used for serial comms. The risk here is no more than the usual when you connect the serial pins of 2 5V devices together. – TisteAndii May 9 '16 at 23:00
  • It might boot up that way, but all it takes is mistakenly making that pin an output (perhaps while trying to make another pin one) to damage the ESP8266. In the Arduino world, mistakes (especially purely software ones) should be considered normal, so it is unfortunate if one can cause damage. And yes, it is even more a risk with SPI where the MISO pin is even more likely to be used for a different purpose in code that might be loaded with insufficient thought. There's a difference between a cost-optimized solution, and an experimenter-friendly one. – Chris Stratton May 9 '16 at 23:21
1

The arduino nano v3's logic is 5v, and the ESP8266's logic is 3.3V, so you need to do level shifting between both. Using a voltage divider drains more current (guess not an issue in this case) and it's ok only when going from 5V to 3.3V (when the signal must be shifted from 3.3V to 5V in the links you provide, it looks like it's based on that 3.3V is still considered "HIGH" on a TTL signal).

I personally prefer using a level shifter, it just complicates a bit the Bill Of Materials, but you won't have to debug the level shifting part.

And better than that, using an arduino mini pro @3.3v working directly at 3.3V gets rid of this hassle.

  • Shouldn't arduino nano 3.3v be arduino nano v3? – Gerben May 9 '16 at 9:02
  • arduino nano v3 refers to the version of the architecture. afaik there's no arduino nano working at 3.3v. it must be an arduino mini – Roberto May 9 '16 at 9:48

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.