loading

In this Instructable I will show you how to build the minimal circuit in order to flash a user program to the ESP-12F ESP8266 module.

This instructable is following the first testing of the module and is the second of my ESP8266 collection.

It can be used to flash a sketch done with Arduino IDE as I will show you here but the same circuit can be used in order to flash back again the AT commands software or to upgrade the SDK.

Step 1: Parts Needed

The Hardware needed is the same as in my the first test plus a breadboard.

Here is the list:

  1. ESP-12F Module from ebay for example around 2.31USD
  2. An USB to serial TTL UART Module (like CP2102 from ebay for exemple): 1.24USDA
  3. 3.3V Power supply like MB102 from ebay: two for 1.67USD
  4. A Breadboard starting from a few dollars on ebay for example
  5. An optional ESP-12 adapter like this ones from ebay: 3 for 1.20USD

If you are using the ESP-12 Adapter follow this step in order to solder the ESP-12F module on the adapter.

Step 2: Mount the Power Supply on the Breadboard

Please set the to jumpers on both sides of the breadboard to 3.3v.

Then plug the power supply on the breadboard.

Step 3: Wire the ESP-12F on the Breadboard

If you are using the adapter module like mine then you can see on the first photo that no space remains on the sides for wirering.

So the wireing has to be done before putting the module on the breadboard.

Wire in such a way that you have the corresponding pins of the module available on the breadboard in the same order. I have labelled on one of the picture the pins.

At the end of this step you have the power supply on one side the ESP-12F on the other leaving plenty of space on the breadboard.

Step 4: The Minimal Circuit

First lets see the schematic. You can find some ressources for example on ESP8266 Arduino Github.

  • EN (CH_PD) Enable Pin has to be pulled up (R1)
  • RESET Pin has to be pulled up (R3). In order to retart the module we connect also a push button to ground (S1)
  • In all of the boot modes
    • GIO15 has to be pulled down (R2)
    • GIPO2 has to be pulled up (R4)
  • GIPO0 has to be pulled up (R5) for running the program (flash boot). I has to be low in order to enter programming mode (UART). For this we add the S2 push button.
  • We also connect the USB to Serial port
    • GND are connected together
    • RX module is connected to TX serial
    • TX module is connected to RX serial

Furthermore we add a capacitor between VCC and GND.

Step 5: What the Breadboard Should Look Like

If you are not using the adapter module the breadboard should look like in this drawing.

We connect all the pins of the ESP-12F in the same order on the breadboard in order to have them in advance wired.

It makes a lot of wires but this will be usefull for our future testing. For a final design I would use only the usefull wires.

Step 6: Real Wiring

As we are using the adapter module we do not have to connect R1 and R2. They are already in the adapter module.

C1 has to be placed the closer possible to the module.

Step 7: First Program

We are doing here a very simple program.

Start Arduino IDE and if not done already follow this instructions to install ESP8266 addon: http://esp8266.github.io/Arduino/versions/2.3.0/d...

Entrer this first program:

/* example from  http://www.arduinesp.com/examples  */
/* to be flashed directly to ESP8266 */
int ledPin = 2;
void setup() 
{
pinMode(ledPin, OUTPUT);
}
void loop()
{
digitalWrite(ledPin, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(ledPin, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

Step 8: Select Board

Select Generic ESP8266 Module in boards.

Look at all the other settings.

Select the right COM port.

Step 9: Flash

Run "Upload" in Arduino IDE.

Get ready for restarting the module: keep pressed the FLASH button.

When "esptool.exe .... -cp COM...." appears in the messages area then quickly press and release RESET. Then release FLASH button.

You should see in the messages area the flashing process.

After the flashing the you should see the the blue led blinking.

Step 10: Using Wifi to Control GPIO2

This is another simple sketch.

It creates a http server on the ESP8266 allowing you to turn on and off GPIO2.

Set in line 16 and 17 the credetials to you WiFi network.

Have a look on you Serial connection on your computer. This will show you the IP address of esp8266.

This shetch showed me one thing: the LED on the ESP-12f is connected between VCC and GPIO2.

Step 11: Files

Here is the Fritzing file of the Hardware.

About This Instructable

3,004views

50favorites

License:

More by flav1972:ESP-12F: Flashing AT Firmware ESP-12F: ESP8266 Module - Minimal Breadboard for Flashing ESP-12F: ESP8266 module - connection test 
Add instructable to: