As promised a short description of my ESP8266/RFM69 gateway.
I made several attempts on building a gateway on breadboards/veroboards, but they didn't work well (NRF24 worked fine). The RF part was very sensible. I either had to touch the antenna with a finger to get things working, or move the antenna away from the board. Eventually I decided to try to make a real PCB. It was also a good excuse to get back into making my own PCB's as the last one I made was made with OrCAD under MSDOS, more than 20 years ago!
This is the schematic:
And the finished PCB - top layer:
...and the bottom layer with the RFM69
A few comments:
All passives are 0805 which are pretty easy to solder.
The library I used for ESP8266 have GPIO4 and 5 swapped, which means SDA and SCL are swapped on J1. Not a big issue for a gateway, but I decided to include I2C support for display or local sensors
I added the ATSHA204, because there was room on the board - I think I screwed up on this, since this is the 8-pin version and everyone else uses the 3-pin version with the proprietary Atmel interface.
PCB's was ordered from Dirty PCB's and showed up in approx 3 weeks - it's a 1.6 mm PCB - next time I should order 1.2 mm PCB's to avoid having to bend the legs on the SMA connector
On the positive side - it works. No issues with touching the antenna and the ESP8266 doesn't crash. I2C is also tested with a different (non-MySensors) sketch. ATSHA support is untested and probably doesn't work.
The reason for using GPIO16 as chip-select, is because chip select doesn't need a hardware interrupt and it frees up GPIO4+5 for I2C
The radio related part of the sketch:
#define MY_RADIO_RFM69 #define MY_RFM69_FREQUENCY RF69_868MHZ #define MY_RF69_IRQ_PIN 15 #define MY_RF69_SPI_CS 16 #define MY_IS_RFM69HW true // #define MY_RFM69_ENABLE_ENCRYPTION true