Electrical – Can’t connect ESP8266 to Raspberry serial

esp8266serial

I have been trying to get ESP8266 WIFI module (ESP-12E) to connect to Raspberry PI 3 serial port, but I've tried everything I could think of, but still can't get it to connect.

Connection

I have connected it directly to Raspberry Pi 3 the following way:
enter image description here

I followed this datasheet: http://www.kloppenborg.net/images/blog/esp8266/esp8266-esp12e-specs.pdf

Which states:

  MODE        GPIO15     GPIO0     GPIO2

  UART        Low        Low       High
  Flash Boot  Low        High      High

So far so good, but when I apply the power, nothing happens and when I touch the module, I can feel that it's warm. If I disconnect the GPIO2 pin, the blue LED blinks once on power up, but according to the manual, it should blink twice. Manual also states that there should be a red LED, which apparently doesn't exist for this version.

Raspberry

  1. I ran raspi-config and disabled "Login shell over serial"
  2. I edited /boot/config.txt and added "enable_uart=1"
  3. I edited /boot/cmdline.txt and it currently looks like this:

    dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

  4. dmesg | grep tty returns:

    Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa02082 bcm2709.serial=0x99a45a3 smsc95xx.macaddr=B8:27:EB:9A:45:A3 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
    console [tty1] enabled
    3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 59, base_baud = 31250000) is a 16550
    3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
    systemd[1]: Starting system-getty.slice.
    systemd[1]: Created slice system-getty.slice.
    
  5. Finally I tried to connect using the following commands:

    picocom /dev/ttyAMA0 -b 9600
    picocom /dev/ttyAMA0 -b 57600
    picocom /dev/ttyAMA0 -b 76800
    picocom /dev/ttyAMA0 -b 115200
    
    picocom /dev/ttyS0 -b 9600
    picocom /dev/ttyS0 -b 57600
    picocom /dev/ttyS0 -b 76800
    picocom /dev/ttyS0 -b 115200
    

But I can't type anything and when I restart the ESP8266, I see the blue LED blinking once (if GPIO2 is disconnected), but no data. Any ideas what am I doing wrong? Thanks!

Best Answer

VCC RaspberryPi 3V3

And there's your problem.

The 3V3 connection is rated for 50mA. The ESP8266 can draw over 200mA. Get a LDO regulator and connect it to the 5V connection instead.