-1

Scenario :

  • I want to connect ESP8266 to Raspberry-pi's wifi network.

  • Arduino Uno is connected to ESP8266

  • Raspberry-pi will send a signal (1/0) to ESP8266, when its 1 Arduino will turn on/off a Relay.

  • I do not have a USB to UART Serial module

So my question is how to complete this task? Is it a feasible one?

I had been looking for many websites, almost all are using USB to UART Serial module to burn firmware to ESP8266.

closed as too broad by gre_gor, user31481, per1234, jose can u c, Avamander Dec 11 '17 at 15:44

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

2

You can use the USB-to-Serial adapter of the Arduino UNO, it has one on-board (ATmega16U2). Check the schematic of the UNO to understand what's going on.

First, upload an empty sketch to the UNO's ATmega328P, to make sure that it doesn't use the UART.

Connect the TX pin of the ATmega16U2 (i.e. the RX pin of the Arduino, digital pin 0) to the RX pin of the ESP8266. Connect a 2kΩ resistor between the ESP's RX pin. Together with the 1kΩ resistor on the ATmega16U2's TX line (on the Arduino), this creates a voltage divider that acts as a level shifter from 5V to 3.3V.

Connect the RX pin of the ATmega16U2 (i.e. the TX pin of the Arduino, digital pin 1) to the TX pin of the ESP8266.

Connect the grounds together as well.

In the Arduino IDE, select the ESP8266 under Tools > Board. Then enter programming mode on the ESP:

  1. Bring reset low
  2. Bring GPIO0 low
  3. Bring reset high
  4. Bring GPIO0 high

Then upload your sketch to the ESP.

I recommend adding simple push buttons and pull-up resistors: Pushbuttons for entering programming mode (The ESP-01 has GPIO15 shorted to ground internally, so you don't have to worry about that. If you were using an ESP-## module that breaks out this pin, you need an external pull-down resistor.)

Keep in mind that you will also need a decent 3.3V power source, and some decoupling capacitors.

A Beginner's Guide to the ESP8266

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