WeMOS Mega + WiFi R3 ATmega2560 + ESP8266 USB-TTL

About receivers, transmitters, transceivers, connections, antennas etc.

Moderators: rtenklooster, Voyager, BertB, Stuntteam

Post Reply
Message
Author
sheridat
New user
Posts: 2
Joined: 13 Nov 2017, 11:17

WeMOS Mega + WiFi R3 ATmega2560 + ESP8266 USB-TTL

#1 Post by sheridat » 13 Nov 2017, 11:27

Hello,

There is a board available that combines an ATmega 2560 with an ESP8266 WeMos. Effectively the serial output from the "arduino" goes to the ESP8266.

Has anyone used one of these boards as the basis for an RFLink Gateway to communicate with a Raspberry PI over TCP/IP?

Here is a link to one of these boards from ebay.co.uk http://www.ebay.co.uk/itm/WeMOS-Mega-Wi ... SwblZZNDR1

reinhold
Normal user
Posts: 15
Joined: 19 Jun 2017, 22:52
Location: Vienna, Austria
Contact:

Re: WeMOS Mega + WiFi R3 ATmega2560 + ESP8266 USB-TTL

#2 Post by reinhold » 13 Nov 2017, 18:52

I'm using one of those boards (bought from aliexpress.com for ~11 Euros: https://www.aliexpress.com/item/WEMOS-M ... 0.0.FezHg4 ) with RFLink on the mega and a self-made script on the esp8266 to connect to my local wifi and parse and submit all RFLink messages to my local MQTT broker (running on my RasPi).

Once you have figured out how to use the DIP switches to connect the USB port to the ESP for uploading and testing (and for connecting the mega and the esp), it's really easy to use. Disadvantage is that you cannot read the serial debug output from the esp or the mega while having the two connected. So troubleshooting is a bit of a pain. I worked around this by inserting debug messages sent over wifi to the mqtt broker (which of course does not help debugging connection problems, but it makes debugging message parsing easier)

There was, however, one problem with very frequent resets of the esp when I tried running the board from a normal Micro USB power supply. Those went away when I switched to a 9V power supply for the arduino (https://www.aliexpress.com/item/10pcs-L ... 0.0.1LQqAL). The board has been running without problems for ~3 months now.

Best regards,
Reinhold

sheridat
New user
Posts: 2
Joined: 13 Nov 2017, 11:17

Re: WeMOS Mega + WiFi R3 ATmega2560 + ESP8266 USB-TTL

#3 Post by sheridat » 13 Nov 2017, 22:54

Thank You so much for replying and advising me of the the pros and cons.

I can see that debugging the solution is challenging but it does seem like an ideal setup to replace my current NodeMCU 433mhz to MQTT gateway which only supports my own custom message format.

Regards,
Sheridat

beamzer
New user
Posts: 2
Joined: 18 Mar 2018, 12:32

Re: WeMOS Mega + WiFi R3 ATmega2560 + ESP8266 USB-TTL

#4 Post by beamzer » 18 Mar 2018, 13:19

reinhold wrote: 13 Nov 2017, 18:52 I'm using one of those boards (bought from aliexpress.com for ~11 Euros: https://www.aliexpress.com/item/WEMOS-M ... 0.0.FezHg4 ) with RFLink on the mega and a self-made script on the esp8266 to connect to my local wifi and parse and submit all RFLink messages to my local MQTT broker (running on my RasPi).
...
Any chance on sharing that 8266 code? It would free up the Raspberry Pi i am now using to do the serial to wifi work ;)

thanks in advance,
Ewald...

reinhold
Normal user
Posts: 15
Joined: 19 Jun 2017, 22:52
Location: Vienna, Austria
Contact:

Re: WeMOS Mega + WiFi R3 ATmega2560 + ESP8266 USB-TTL

#5 Post by reinhold » 18 Mar 2018, 14:05

I'm using a copy of Phil Whilson's rflink-to-mqtt code:
https://github.com/kainhofer/rflink-to-mqtt

Compared to Phil's original version (https://github.com/Phileep/rflink-to-mqtt), I had to change some things to make it work with the WeMOS Megat+ESP8266 board. In particular
  • fix negative temperatures
  • Make debug output configurable (swSerial is not accessible, Serial is for communication with the Mega
  • Add MQTT login
  • Allow debug messages to the sent over mqtt
  • Fix some crashes
  • etc.
Please be prepared to adjust the code to your needs, I tailored some parts to my needs, so they might not be ideal for you.

Best regards,
Reinhold

beamzer
New user
Posts: 2
Joined: 18 Mar 2018, 12:32

Re: WeMOS Mega + WiFi R3 ATmega2560 + ESP8266 USB-TTL

#6 Post by beamzer » 18 Mar 2018, 17:10

great,
thanks!

Ewald....

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests