Electronic – Arduino + ESP8266 electromagnetic interference

arduinoesp8266

I made a board for a weather station that has an Arduino chip on it with an ESP8266 WiFi module mounted right next to it.
When I power the board, the ESP8266 seems to be unable to connect to my WiFi network.
It took me a while to figure out why as the module worked perfectly fine when connected directly to a USB-to-serial converter and writing AT commands directly to it.

So I tried to connect the ESP8266 module to my board using a ~15cm ribbon cable and suddenly it all works.
Seems like there is some electromagnetic interference when the Arduino (board) and ESP8266 are placed close to each other.

Has anyone encountered this before and is there another solution than placing the 2 parts away from each other?

EDIT: Added pictures to clarify

This doesn't work:
This doesn't work

This works:
This works

Best Answer

Put that radio module close to the MCU while still connected via the ribbon cable. If it stops working, it really was radio interference (but I doubt it). If it still works, then it's something else. Maybe you have transients which are reduced by the cable. Maybe you have connections which are unaccounted for when you plug the module directly (the cable has 6 poles, while the connector has 8). Hard to tell without a schematic, really.