From e71a4d4e2ee629d082fc8c2cf9f29f206c550f3f Mon Sep 17 00:00:00 2001 From: blakadder Date: Sun, 7 Apr 2019 22:33:05 +0200 Subject: [PATCH] Revamp --- Hardware-Preparation.md | 61 ++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 32 deletions(-) diff --git a/Hardware-Preparation.md b/Hardware-Preparation.md index dd78b45c..25cca37a 100644 --- a/Hardware-Preparation.md +++ b/Hardware-Preparation.md @@ -1,59 +1,56 @@ ## Hardware Preparation -You need to make the serial programming interface of the Sonoff module / the ESP8266 microchip available. In most cases the pins are available on the PCB but connectors need to be soldered or otherwise applied to allow interfacing. You'll furthermore need a **USB UART TTL 3.3V Converter/Programmer** (e.g. CP2102, CH340G, FT232, PL2303) (or if available use your [RaspberryPi](https://github.com/arendst/Sonoff-Tasmota/wiki/Flash-Sonoff-using-Raspberry-Pi)). +We need to connect to the serial programming interface of the ESP8266 chip. This is done by connecting our serial-to-USB converter TX and RX pins to the ESP8266 RX and TX pins and powering the chip with the 3.3V and GND pins. -Be careful - some so called 3V3 FTDI cables actually supply 5v on the VCC line. It is suggested to measure before connecting to your Sonoff. +In most cases those pins are available on the PCB in the form of pin holes or solder pads but pin headers or jumper wires need to be soldered or otherwise applied. In some cases you will need to solder wires directly on the chip's pins which requires some experience and good soldering equipment. Sonoff Pow Bricked -### Attention ⚠️️⚠️️⚠️️ +### ⚠️️⚠️️⚠️️ WARNING BEFORE PROCEEDING ⚠️️⚠️️⚠️️ -**DO NOT CONNECT TO MAINS AC WHILE THE COVER IS OPEN AND CIRCUIT BOARD IS EXPOSED** +**DO NOT CONNECT DEVICES TO MAINS POWER WHILE THE COVER IS OPEN AND CIRCUIT BOARD IS EXPOSED!!!** -**NEVER TRY TO FLASH A SONOFF WHILE IT IS CONNECTED TO MAINS AC** +**NEVER TRY TO FLASH A SONOFF WHILE IT IS CONNECTED TO MAINS POWER!!!** -**A SONOFF IS NOT A TOY. YOU CAN BE ELECTROCUTED IF YOU DON'T KNOW WHAT YOU ARE DOING** +**YOU CAN BE ELECTROCUTED IF YOU DON'T KNOW WHAT YOU ARE DOING!** If you are not careful, your own health will be in danger. - -Also, shorting your serial interface with AC will fry your module or programmer and will also harm or destroy your PC. -It is a must to always have all high power cables disconnected from the Sonoff module while being connected via serial/USB or even while the case of the module is opened. +Shorting your serial interface with AC will fry your module and programmer and will also harm or destroy your computer. +It is important to always have all mains power cables disconnected from the device while being connected via serial or even while the case of the module is opened. ## Serial Connection +Each device has its pins labelled differently. If the labelling isn't visible on the PCB please refer to the devices wiki entry or search the internet for correct pin locations. Device specific instructions and restrictions are documented in [Supported Modules](Supported-Modules) -The following table shows the connection between the connectors of the programmer and the modules. Pay attention to crossed RX and TX lines. +When you have identified pins on your device, connect wires according to the table: -|Programmer | Sonoff Module | -|------------|--------------------| -| 3V3 | 3V3 / VCC | +|Serial adapter | ESP8266 device | +|-----------:|:-------------------| +| 3V3 | 3V3 or VCC | | TX | RX | | RX | TX | | GND | GND | -Some Sonoff modules expose a five pin header. The fifth pin is irrelevant for the serial connection. Please check the specific module pages to find out more. +**Note that TX from your adapter goes to RX on the ESP8266 device and RX from adapter goes to TX on the device!** -### Bringing the Module in Flash Mode +## Bringing the Module in Flash Mode -The "brain" of the Sonoff module (normally the ESP8266) needs to be put into Flash Mode before the Sonoff-Tasmota firmware can be transferred. This is done by pulling the GPIO0 pin to GND while the chip is booting. On most modules the installed control button is connected to GPIO0 and GND, making entering Flash Mode very easy. On other modules you will need to connect pins on the PCB. See device specific articles for details. +ESP8266 needs to be put into **Flash Mode** before the firmware can be uploaded. This is done by pulling the GPIO0 pin to GND while the chip is booting. -To bring a Sonoff module into Flash Mode: +On most devices the installed control button is connected to GPIO0 and GND, making entering Flash Mode very easy. On others you will need to short the pins on the PCB or directly on the chip with a jumper wire. See device specific articles for additional details. -1. Disconnect serial programmer and power -2. Connect GPIO0 and GND (e.g., by pressing the on-board button or connection via cable) -3. Connect the serial programmer (VCC, RX, TX, GND), e.g. by connecting the belonging USB cable -4. Disconnect GPIO0 from GND (after one-two seconds) +To bring ESP8266 into Flash Mode: -If everything went well, you are now in Flash Mode and ready to continue with the Sonoff-Tasmota firmware [Upload](https://github.com/arendst/Sonoff-Tasmota/wiki/Upload). If the upload is not able to start, disconnect the module and start the hardware preparations from the beginning. +1. Disconnect serial-to-USB adapter and power +2. Connect GPIO0 and GND (by pressing the on-board button or connection with a wire) +3. Connect the serial-to-USB adapter to your computer +4. After a few seconds disconnect GPIO0 from GND (release button or break wire connection) -### Module Specific Articles +If everything went well, you are now in Flash Mode and ready to continue with the [upload](https://github.com/arendst/Sonoff-Tasmota/wiki/Upload). If the upload is unable to start, disconnect the module and retry the steps. -Check the module specific instructions and restrictions documented in the **device specific articles linked in the menu on the right** 🡺 - -* [Sonoff Basic](Sonoff-Basic#serial-connection) -* [Sonoff Dual](Sonoff-Dual-and-Dual-R2#serial-connection) -* [Sonoff RF](Sonoff-RF#serial-connection) -* [Sonoff Pow and Pow R2](Sonoff-Pow-and-Pow-R2) -* [Sonoff Touch](Sonoff-Touch) -* [Sonoff 4CH / 4CH Pro](Sonoff-4CH-and-4CH-Pro) -* ... (see menu on the right) +## Common Mistakes +- Double check the wire connections and soldering job for overflow +- Releasing GPIO0 button/wire before booting is finished +- Insufficient power delivered over the serial-to-USB adapter can prevent flashing. Supply more power with an additional 3.3V power supply or get an adapter with abetter power supply. +- Not switching RX and TX pins +- Recheck your serial-to-USB adapter so it supplies 3.3V power instead of 5V