ESP8266 and ATMEGA2560 Mega Board

ESP8266 and Atmega 2560You may recall my blog entry about my “universal peripheral” – using the little Arduino Nano or similar clones with an ESP8266 – with the former providing GPIO via an I2c connection.

Well, that led me to getting this little number from Banggood – the Wemos Atmega + WiFi R2 Atmega2560+ESP8266 32Mb Memory board.

It’s not 32 MEG of course – it is 4MB – but that’s the same as a normal ESP12. but with the GPIO power of an Atmega 2560 – all in one neat board.

Initial impressions – it looks well put together.  According to the underside, it takes DC 7-16v in – and has DC out at 5v 1.6A and 3.3v at 1 amp – so it actually is a little more than just the two boards – looks like there’s lots of power there for peripherals.

I must admit, I’m not a fan of these boards renaming GPIO on the ESP8266 to pretend it is an Arduino – makes wiring up for those of us used to the ESP8266 just that bit more difficult. On this board, some of the ESP8266 pins (that connector in the middle) retain their original names – CH_PD, GPIO5, GPIO4, GPIO12, GPIO0, GPIO2, GPIO16…. the rest are buried away along the edge connectors.

The important thing is that they’ve not tried to be too clever and the I2c pins on the Atmega are not connected up to the ESP – just as well because different people use different pins on the ESP8266, I use GPIO4 and GPIO5. There is a TINY dip-switch in the middle of this board which lets you set what connections if any you want between the two boards.

It might take a little while for me to modify (easy enough) the “universal peripheral” code to take into account the extra pins and features of the 2560 but that is what I’ll do (that’s not stopping anyone else in the meantime of course as I published the code in previous articles) – basically add another node to my home control system, this one with more GPIO than you could shake a stick at!!

ESP8266 and ATMEGA2560


13 thoughts on “ESP8266 and ATMEGA2560 Mega Board

  1. Ulrich, The little slide switch should be set to Tx3 / Rx3, the DIP switches are set to the ‘special solution’ as shown in the table above. On the picture you posted those highlighted pins are attached to the ESP8266 and, if you are running ESP-link on the ESP8266, you do not need to re-define them.
    I have one of these boards and I have flashed the ESP8266 with the latest version of ESP-Link. I am currently evaluating its stability by periodically powering it down and then powering it back up to make sure it performs reliably. I have sought information on several websites and the consensus is that this combination of ESP8266 and MEGA perform reliably.

    1. Hi Bob, thank you for your helpful comment. I’m going to flash the ESP8266 with ESP-Link Firmware. The mode button has to pressed during flashing operation, right?

      1. Ulrich, my apologies for the delay I’ve been off the blog for a few days. Yes, you press the mode button when you initialize the flash, once the flash starts you can release it.

  2. Hi Peter,

    I’m struggling with the communiction between ATMega2560 -> ESP8266. ESP -> ATMega works. The little onboard switch is set to RXD0/TXD0.

    I wrote a sketch for a standalone access point. Returned data from the ATMega has to go to the ESP8266.

    On the screenshot attached I defined a red area. Do these pins belong to the ESP8266? If so, I could experiment with different pins, define them as Tx/Rx including softwareSerial.h and connect them to pins of AtMega. I do not find any board description on the internet. As I’m not very experienced in this case, the advice of an expert would be very helpful!


  3. I’ve used this board for a few months now, with a good antenna it’s been rock solid (better than my breadboard attempt at joining the two anyway!) I found the attached image helpful in setting it up and switching between the two devices.

    Not bad for 10 quid.

  4. These boards are great for running rflink, with the esp bit doing the backhaul to the MQTT broker as a serial-wifi link. I have had one running 24/7 for about 6 months.

  5. I’ve read your warning and I’ll be bending the pins as needed. I get a lot from your site and it’s references. 🙂

    I guess I should say thanks … 😉

  6. Pete,
    Talking 32 magic number why not Wemos Zero Classic and lite (as Coca-Cola) so 32 bits and more peripherals more Mhz more CPU power.
    Not as cheap (yet?) but buyable, to me the Rocky (people) of China (R.O.C.) has started the SAMD21 (sale) revolution

  7. Nice find, interesting board.

    I know this is a minor point but 32Mb = 4MB. It would be nice if everyone stuck to one or the other but they seldom do.

    My favorite is the ads with 4mb (???), those tend to be the older ESP-01 with 512KB flash.

    1. Yes I did point out that the board is 4MB. I think people do this in the hope that some will be fooled – though what you’d do with 32MB on an ESP8266 I have no idea – you can only use 1Meg for programs + 1Meg for OTA -leaving a couple of Meg for data and that, I would have thought was enough for anyone. Now, if there was a way (there is not) to increase RAM – well, I would be in heaven.

      I have utterly stopped supporting the old boards with 512KB (4Mb). No point in crippling oneself.

      1. I reprogram the 512KB boards with solder (and a larger flash chip). 😉

        I find the ESP-01s are still good for a few things but it must support the OTA upgrade otherwise it useless.

        1. I’ve done that Neil – and on ESP-01 boards – but sometimes you end up with chips slightly wider which makes things painful.

Comments are closed.