As my tinkerings with the little ESP01 boards continued I found my self beginning to struggle with the 1MB of RAM that they came with. Its fine for small projects but if you want to run anything substantial on them you will be needing more RAM. After a look around the web, I discovered that you can do a direct replacement of the on board 1MB flash chip with a 16MB flash chip. The ESP8266 can handle a maximum of 16MB, but I found the 32Mb chips were cheaper and still compatible for just 37p each!! (eBay link here). Being that I had 4 I figured I would take a punt and upgrade one to see if it worked. The pictures below are during and after the upgrade, in the first picture the origional chip is on the left and the new ones are on the right, you can see the pads on the board in the middle which then I cleaned up with some desolder braid.

                      

You will need a steady hand and a very small soldering iron tip, also ensure you get the new chip on the right way round. The small 'locator' dot goes top right as you are looking at the board from this perspective as in the 2nd picture.

Once you have upgraded the flash you will discover that the standard firmware and flashing procedure will only result in having 4MB of useable RAM (Still better than 1MB).

This is something to do with poor auto detection on the ESP8266 but luckily its not too difficult to overcome. Grab the source for the ESP Open SDK from here and build it. You are looking for a file called 'esp_init_data_default.bin' which is located in 'ESP8266_NONOS_SDK-2.1.0-18-g61248df/bin/'. Copy this to the same directory as your MicroPython firmware file. 

Erase the flash as normal then use this command to flash the two images to the ESP01, it forces the flash size to 16MB instead of using the auto detect:

esptool.py --port /dev/cu.usbserial --baud 460800 write_flash -fm dio -fs 16MB 0 esp8266-20180511-v1.9.4.bin 0xffc000 esp_init_data_default.bin

Asuming all goes well, you should be able to connect it to uPyCraft (or any serial terminal app) and issue the following commands to confirm the Flash Size is correctly recognised.

import esp

esp.flash_size()

You should see this:

And there you have it a 16MB ESP01 with very little effort or cost! I have subsequently upgraded all of my ESP01's to 16MB.