How to Expand Sonoff Basic to 4MB Flash - RTurala/Sonoff-Tasmota GitHub Wiki

Heya,

in this memo i'll describe how to expand the flash of a sonoff basic from 1MB to 4MB. The advantage for this change is, to avoid to double flash with the minimal and then with the normal firmware and to use more features like Webserver and SSL encryption.

It was hard to find those information,i'll give credits to some users from the german CreationX Forum.

Because to unsolder the flash isn't that easy as just solder in pins, this is only for advances users.

Dont forget, its your own risk and the device could be damaged permamently.

The Hardware

  • Soldering iron
  • Tin
  • Tweezers

The Flash

The origin flash block is a XTX PN25F08B 1725XDG. We exchange it with a WINBOND W25Q32FVSIG 1416. You can find the WINBOND Flash on eBay (another ebay) or AliExpress

winbond1

winbond-diffrent

Those China Flashs are cheap productions, means the chance to solder in a new defect not working flash block is hight! Be ready to re-do the operation if the upload fails.

If you want to test the flash block, build yourself a test module, something like this for easy soldering in a flash and test it before soldering it in another sonoff basics board. flash test

The Operation

You will notice that the LED is in the way. Get a pen and mark on of its Pin with the board, so you can solder it in back later in the correct Position. Its a Red-Green LED, if you solder it in the wrong way, it will light up in red.

After the LED is out of the way, you give some tin on the pins from the flash block and connect all 4 pins in a row together with tin. This way it will be easier to desolder it, because you need to melt all pins at the same time.

Now get a thin object between the flash and the board, try to gently lift the flash up and at the same time melt both rows of the flash pins tin rotatory. If you got enough space between the board and the flash change to the tweezers and finally take the flash block off.

Now refresh the contacts on the board for the new flash block with a lil bit of fresh tin. Dont forget to give a lil bit tin to the new pins of the flash block, too!

Now put it on the contacts on the board and try to lock it with the tweezers. Next take the solder iron and head just one pin and try to arrange the flashblock in the center now. Finally, heat and solder the other pins to the board.

enter image description here

You can also use a hot air pistol (dont know the english name sry), this would be much safer, but also more expensive (Amazon). Be sure to protect the rest of the board if using the air pistol! enter image description here

Good job, you are done :)

Flashing

The next step is to tell Atom (i did not do it with Arduino IDE, sry) to use the whole new 4MB Flash. Note: You can only use 3MB, because 1MB is needed for SPIFFS.

To do this, you need to edit the platformio.ini file. Search for your prefered language Block and copy the whole Block. Rename it to e.g. Sonoff-DE-4M Now change the following line

build_flags = -Wl,-Tesp8266.flash.1m0.ld -DMY_LANGUAGE=de-DE

to

build_flags = -Wl,-Tesp8266.flash.4m1m.ld -DMY_LANGUAGE=de-DE

Now scroll back to the top and enter a new default environment with the name of your newly created block

env_default = sonoff-DE-4M

You are done with the preparations, connect the Sonoff with the 4MB Flash in Flashmode (hold button while plugin in), click clean, click build, click upload. config1enter image description here

Result

On the Information Page on the tasmota web interface you can now see the 4MB flash :) info1 info