RFLink on Robotdyn ATMEGA 2560 with embedded ESP8266 and ESPEasy

After strugling a day with making my RFLink work with the ESP8266 I’ve finally got it working.

Hardware
Robotdyn WiFi R3 ATmega2560 + ESP8266 - https://goo.gl/GoNb6v

Downloads
ESPEasy Mega 4mb - Releases · letscontrolit/ESPEasy · GitHub
RFLink RFLink Gateway - HomeAutomation

ATmega2560 part

  1. Set the dipswitches of the Robotdyn to
    a. 1: off, 2:off, 3:on, 4:on, 5:off, 6:off, 7:off, 8:off
    b. This will enable sketch uploading for the ATmega2560
  2. Connect the Robotdyn to the computer with an usb cable
  3. Extract the RFLink zip, and open the ‘RFLinkLoader.exe’
  4. Open the ‘RFLink.cpp.hex’ from the select firmware to load box
  5. Select the right COM port on which the Robotdyn is connected or just press the ‘Scan Available Ports’ button
  6. Press the ‘Upload/Program Firmware to device’ button to upload the firmware, be cautious, do not disconnect the device now.
  7. When it is ready close the RFLinkLoader

ESP8266 part

  1. Set the dipswitches of the Robotdyn to
    a. 1: off, 2: off, 3: off, 4: off, 5: on, 6: on, 7: on, 8:off
    b. This will enable sketch uploading for the ESP8266
  2. Check if the Robotdyn is still connected to the computer with an usb cable
  3. Extract the ESPMega zip file, and open ‘FlashESP8266.exe’
  4. Select the right COM port (which should be the same as in the RFLink uploading part) and select the right Firmware (ESP_Easy_mega-20180809_normal_ESP8266_4096.bin)
  5. Press ‘Flash’ to upload the file to the Robotdyn, be cautious, do not disconnect the device now.
  6. When it is ready close the flashing tool
  7. The ESP8266 will now emit a wifi signal, connect with it with the following password: ‘configesp’ (more information at h-ttps://www.letscontrolit.com/wiki/index.php/ESPEasy#Introduction)
  8. After connection a screen opens in which you can let the ESP8266 connect to your WIFI, if succesfull its new IP address will be shown.
  9. Go to this IP address in your browser and click on devices
  10. Click on Edit of the first task and select ‘Communication - Serial Server’ from the dropdown list
  11. Fill in the form as following:
    a. Name: RFLINK
    b. Enabled: checked
    c. TCP Port: a number between 1000 and 9999
    d. Baud Rate: 57600
    e. Data bits: 8
    f. Parity: No Parity
    g. Stop bits: 1
    h. Reset target after boot: - none –
    i. RX receive timeout: 0
    j. Event processing: RFLINK
  12. Press Submit

Home Assistant
• Go to the configuration file and add:

rflink:
  host: ipaddress of the ESP8266 
  port: TCP port you added in the devices tab of the ESP8266

• Restart Home Assistant
• More information at h-ttps://www.home-assistant.io/components/rflink/

Wiring
• Disconnect the Robotdyn from power.
• Wire as following:
o Transmitter

VCC to D14
DATA to D15
GND to GND

o Reciever

VCC to D16
DATA to D19
GND to GND

Finishing

  1. Set the dipswitches of the Robotdyn to
    a. 1: on, 2: on, 3: on, 4: on, 5: off, 6: off, 7: off, 8:off
    b. This will enable communication between the ATmega2560 and the ESP8266
  2. Set the larger dipswitch to RXD0 and TXD0
  3. Supply the Robotdyn with power
5 Likes