MOD-WIFI-ESP8266 on OLIMEXINO-32U4

Started by dobril.dobrilov, March 23, 2016, 12:27:02 PM

Previous topic - Next topic

dobril.dobrilov

Hello

I tried to connect MOD-WIFI-ESP8266  on OLIMEXINO-32U4 , first I tried on UEXT but without success, WiFi get power but there are no TX/RX on Serial. After that I connected with dupont cables as follow: WiFI UEXT -pin1 -> OLIMEXINO-32U4 - 3.3v , pin2 -> GND , pin3 -> 32U4- D10 , pin4 ->D11. Then I see response on Serial , but with some unknown chars, for example when I send AT , it send response: OK..7& (..7& - are unknown chars). It was operational by this way about a week , yesterday just stop. There are no TX/RX response. PWR LED is OFF , TX blinks. After some search I read something like: WiFi power use 3.3V but TX/TX are on 5V and I need to use switched-mode power supply. Is it true ? For me is not problem to buy new WiFI module because probably current one is fired but , I need to know how exactly I have to connect properly WiFi module on  OLIMEXINO-32U4 ? For Arduino UNO would be useful too.

LubOlimex

Hey,

About the hardware connection - just plug MOD-WIFI-ESP8266 into the UEXT connector of OLIMEXINO-32U4 - this would establish the required connections - PWR, GND, RX, TX.

All signals at the UEXT of OLIMEXINO-32u4 are 3.3V - don't worry about incompatibility.

It is probably a software problem. Notice that when you open the serial terminal in Arduino you need to have CR+LF selected (ESP8266 expects <CR><LF> or CarriageReturn and LineFeed at the end of each command). There is also something very important for OLIMEXINO-32u4 (in order to enable powering of the UEXT):

The power output at the UEXT is controlled by pin D8, also called UEXT_PWR_E. This signal is connected to a FET. You need to drive D8 to low level to enable 3.3V on the UEXT. Add the following code in your program:

// UEXT power enable --> PORTB4 --> D8

pinMode(8, OUTPUT);
digitalWrite(8, LOW);

Also double check your UART bridge code. The typical UART bridge code would be:

void setup()
{
Serial.begin (9600);  // initialize software UART (USB)
Serial1.begin (115200); // initialize hardware UART
}

void loop()
{
if (Serial.available ())  // check if we have available data on software UART
Serial1.write (Serial.read());  // read it and send it to the hardware UART

if (Serial1.available ())  // check if we have available data on hardware UART
Serial.write (Serial1.read());  // read it and send it to the software UART
}

Notice that you can use MOD-WIFI-ESP8266 directly with Arduino IDE (but you would have to change jumpers every time unless the board has a button for the bootloader mode). The instructions for ESP8266-EVB are suitable (just entering the bootloader mode might be much more difficult): https://www.olimex.com/Products/IoT/ESP8266-EVB/resources/ESP8266-EVB-how-to-use-Arduino.pdf

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex