Itead Smart Switch Flash Upgrade | Home Automation Tech Blog

Fun with Embedded Electronics

Itead Smart Switch Flash Upgrade

20161115_133249

I purchased 2 Itead Studio smart switches, V1.0.0, according to the PCB but the FLASH is only 8Mb so not enough to support the firmware I use so I need to remove the old one and fit some new replacement units. These are 32Mb and made by Winbond and the part number isĀ W25Q32BVSIG. I got mine locally for a little more cost than what they go for on eBay but I only had to wait 1 day for them.

These boards are much easier to work on and replace the FLASH chip compared to the SONOFF modules. Peter Scargill documents his work on that here (http://tech.scargill.net/32mb-esp01/)

TOOLS NEEDED

To do this properly with as little damage to the board as possible, you will need a hot air rework station.I use an Atten 8586 that I got on eBay. Well worth the price as it will save your day if you ever solder in a chip the wrong way or need to fit QFN devices to your project boards.

FIRST UP

First you have to open the case and it’s secured with 1 screw located under the sticker on the bottom of the unit as shown here (screw already removed).

20161115_084604

Next you need a plastic spatula to ease the case apart as it is clipped together. One of those you get in mobile phone kits are ideal and you can open without doing any damage as you would with a screw driver.

Once open, the PCB is secured with 2 screws so remove these and then lift it out. The FLASH chip is on the rear as shown here.

20161114_062420

Using the hot air tool, apply heat to the area around the IC only and after a few seconds it should lift of cleanly. I set the temperature to 360 deg C for this. The board is assembled with lead free solder so needs a bit more heat than usual.

20161114_062435

Use tweezers to check that the solder has molten and then lift it clear and remove the heat. Let the board cool naturally. Be careful not to touch any of the other components around the IC as these are likely to move as the solder may be molten on them too. Allow the board to cool down for the next step.

20161114_062549

Now to clean it up. Use a good sized soldering iron top and some solder wick as show here and carefully get the pads as clean as possible so they are nice and flat.

20161114_062712

Once cleaned, apply a layer of flux to the pad area and apply a small amount of solder to one of the pads. Usually the pad in one of the corners makes it easier to solder them. Here you can see the FLUX applied.

20161115_105514

Next the IC is located onto the pads and the corner soldered down and then check the rest are lined up. Once OK, solder the remaining pads.

20161115_105609

And finally the rest of the PADS are soldered in. Use a flux remover and check the pads are OK.

PROGRAMMING HEADER

To make programming easier I soldered a header to the PCB to allow me to plug in the UART to USB board that I use. I have a converter that maps the 4 pins of this header to the 6 pins of the USB module.

20161114_063456

Now all we have to do is reprogram them. I have 2 options now thanks to some recent posting from Peter Scargill on his blog (New This Weekend)

Peter and Aiden’s C/C++ based with Eclipse and Espressif SDK

https://bitbucket.org/scargill/esp-mqtt-dev

To programme the board, hold down the BUTTON and power it up from the USB port. DO NOT PLUG IT INTO THE MAINS at this point to prevent electrical shock. The USB port will have enough power to programme the board.

If the board programmes OK (I used NODEMCUFLASHER) then power if off and then switch it back on, use the same USB connection. The GREEN LED on the board should start flashing rapidly. Open up a terminal on your PC and configure the device as needed. See the documentation for the settings.

Using this code, the relay is on OUT12. I can’t get the button to send out an MQTT message yet so need to chat with Peter on this. May need some minor changes to support this. You can enable {wifi_button:0} to allow you to toggle this output on and off from the button. Handy for local control.

 

Arduino IDE based

https://github.com/arendst/Sonoff-MQTT-OTA-Arduino

I am going to programme the second board with this firmware to try it out. I’ll update later in another post on how this went.


Post a Comment