Reworking the AI Thinker T5 – Part V

For this instalment of the rework series, we’re going to keep things simple and only do one, relatively straightforward modification.  Although there’s only one goal, it’s a relatively important one; we’re going to update one of the switches on the T5 board to provide “program” functionality for the ESP8266.  In other words, holding down the switch when you power on the board will put the module into programming mode.

The switches on the board are labelled as “K1” and “K2”.  It turns out that, after a little probing with a meter, the schematic provided for the board is incorrect, in that it shows K1 as being connected to pin-4 of the QFP chip and K2 as being connected to pin-5.  This is actually the reverse of the physical connections on the board, which actually has K1 connecting to pin-5 and K2 connecting to pin-4.   While this is immaterial in the context of this rework, it might be useful information for anyone (AI Thinker?) still trying to struggle along with the original QFP 8051 chip (I should probably add here that, despite all of my AI Thinker “bashing” in this series of posts, the vast majority of the ESP8266 modules which I own were manufactured by AI Thinker and the vast majority of them are actually great products …it’s only this one that turned out to be a stinker).

When you look at the T5 board, one of the things which is very noticeable is that there are some tiny vias and traces on the board which are signals and there are other, much larger, vias and traces which are dedicated to the power rails.  This is standard practice and it also simplifies the work of tracing signals and connections.

“K1” Switch Wiring

It also gives another couple of options when trying to formulate a rework plan (how best to physically connect and route wires and place components) to give us the least amount of work for what we want to achieve.  I this particular case, a via provides a useful connection to the 3v3 supply line on the top (component) side of the board in a location which is almost ideally placed; very close to the K1 and K2 switches.  For this modification, we’re going to provide a pull-up resistor on the GPIO0 line and connect it to the K1 switch, which will become our “Program Mode” switch.  Because the via is so well placed, we’re actually going to use it to provide a second pull-up for K2 as well, but we’ll leave the actual implementation of that second switch for a later article (K2 will become the “User” switch).  So the first part of our rework modification is to add a couple of 22K resistors (this value isn’t critical, but 22K is a good compromise between stability and current draw) between VCC and the switches K1 and K2 (the other side already being connected to ground).  Looking at the photograph above, the ground connections are one the two pins of the switches furthest from the edge of the board (the pencil drawing to the left of the board shows these connected together in a continuous line).  The logic signal connections go to the two pins on each switch closest to the edge of the board.

Pull-ups first …grab two, 1/8 watt 22K resistors, hold them side by side and wrap a couple of turns of one lead from one resistor around the (still straight) lead of the other.  Solder the wrapped joint and trim back the bent lead to make it tidy.  Locate the VCC via on the board between switch K1 and the QFP pads (click on the photo above to see a larger version).  The via has a trace running to pin-10 of the QFP, so it’s easily identified.  Scrape the via clean (if needed), so that the copper is visible (a small, cross-point “plus” driver will work for this).  Bend the soldered leg of the resistor pair to a 90-degree angle, push it through the via and solder in place.  On the resistor which is closest to switch K1, cut the lead short (about 4mm), bend it into a “U” and solder it to the adjacent pin on K1 (again, see photo for details).  The long lead on the remaining resistor should be neatly bent clear of the metal casing of K1, parallel with the edge of the board and soldered to the same pin on switch K2.  You now have pull-ups on both switches.

That was the easy part.  The next bit is a little fiddly (which is why we’re only doing one).  Take some thin, single strand wire (insulated wire-wrap wire is a good choice, you might want to try varnished bell/coil wire if you’re confident that you can get the varnish coating off to tin the end reliably).

“K1” Switch Wiring

We’re going to join switch K1 to GPIO0, so you need to solder one end of the wire to the second pin in on the corner of the ESP8266 next to the DHT11 sensor (I take issue with the pin numbering on these modules …if it was an IC and the antenna was the notched end, then it would be pin number 8.  If that doesn’t make any sense to you, just check the photo instead).  Note that we’ve already, in a previous posting, connected the adjacent pin, GPIO2, to the DHT11 data pin, so you  should now have two wires next to each other.  Route your new, GPIO0 wire under the DHT11, down along the side of the jumperblock and then solder it to the pin on K1 which is opposite the pin where you connected the pull-up resistor earlier.  Tack your wiring down with a couple of small drops of “Super-Glue” (if they sell it where you live …in my country of residence it’s actually an illegal substance — dunno why* — so I use toe-nail** pairings from a hot-glue gun stick, melted with the soldering iron onto the wire***).  Check your work with a meter and hopefully you’re good to go.

Why didn’t we wire up K2 as a “reset” switch?  Well, there’s already a slide switch in the supply line on the T5, so we can save switch K2 for use as a user-defined input device (yup, a “switch”).  To use your new program switch, simply turn off the power to the T5 using the slide switch; hold down switch K1 and then slide the power switch back to the “on” position.  You can let go of K1 pretty much immediately.  That’s it, you’re in program mode …you can throw away those fiddly jumpers now.

For our next instalment, we’ll be adding long jumper wires (now that you’ve got the hang of it) to connect up the green and red LEDs and updating our program to implement a spinning colour wheel.  Whee!  Blinkenlights!


  • – Perhaps the powers-that-be are scared that people will glue all of the politicians’ mouths shut.  🙂
  • Don’t use real toe-nails!
  • Don’t breathe in the fumes.  Do clean the tip of the iron ASAP.

One thought on “Reworking the AI Thinker T5 – Part V

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s