logo elektroda
logo elektroda
X
logo elektroda

Changing firmware increasingly difficult? Smart Switch on T34 and QFN soldering

p.kaczmarek2 351 9
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • Changing firmware increasingly difficult? Smart Switch on T34 and QFN soldering
    There are an increasing number of backplane relay modules on the market based on the T34 chip. The T34 is an integrated Wi-Fi chip that is a smaller version of the popular CB2S/CB3S/itd based on the BK7231N core. Although it is still the same chip from the software side, it is more difficult to change its software, because the serial port is no longer brought out in the new devices and you have to solder this chip in the QFN housing off the board. Here I will try to show this process.

    Let me remind you of the main topic about the T34: T34 datasheet, pinout, flashing and common mistakes - soldering to QFN pins, smart plug
    In that topic, the T34 occurred in a version where you could solder wires to its pads:
    Changing firmware increasingly difficult? Smart Switch on T34 and QFN soldering
    Here it will be more difficult - access to the pads is not available! This means that we no longer have a "shortcut" and we have to solder the whole T34 off the PCB, and after programming it has to go back in place.

    This topic will be special, because I will show it on the example of two relays. This type of gadget can be bought for as little as a dozen zloty, you get a tiny box:
    Changing firmware increasingly difficult? Smart Switch on T34 and QFN soldering Changing firmware increasingly difficult? Smart Switch on T34 and QFN soldering
    There is a module and instructions inside:
    Changing firmware increasingly difficult? Smart Switch on T34 and QFN soldering Changing firmware increasingly difficult? Smart Switch on T34 and QFN soldering Changing firmware increasingly difficult? Smart Switch on T34 and QFN soldering
    Let's take a look inside:
    Green PCB with visible traces, terminal block and soldered components. Remote relay module with green terminal block and black JY3FF relay Electronic circuit board with relay and screw terminal block in close-up
    Electronic module with relay, capacitors, and screw terminal Close-up of a blue PCB with electronic components and a green screw terminal Electronic module with relay, capacitors, and screw terminal block
    There is no access to the pads mentioned in the topic about T34 catalogue note .
    Changing firmware increasingly difficult? Smart Switch on T34 and QFN soldering
    We'll have something on this in a moment, but the construction of such a module can still be discussed briefly.
    Here we have a single relay powered by 5 V (JY3FF-SH-DC5V-A(K) or similar), a step-down converter providing 5 V from 230 V AC (after rectification), probably on a BP2525, an LDO AMS1117-3.3 providing 3.3 V from 5 V, and a title T34 together with an antenna on the PCB. In addition, some of these modules also support an RF control option thanks to an additional WF480RA IC in the corner of the PCB along with its quartz resonator and antenna.

    ADVERTISEMENT


    Programming T34
    Verification with the datalogue note shows that one of the UART pins needed for programming is not routed out here. You need to apply flux, preferably also protect nearby components with kapton tape and remove the T34.
    Changing firmware increasingly difficult? Smart Switch on T34 and QFN soldering
    GPIO pulls:
    Changing firmware increasingly difficult? Smart Switch on T34 and QFN soldering
    After soldering, you can see that the TXD1 pad has no path:
    Changing firmware increasingly difficult? Smart Switch on T34 and QFN soldering Changing firmware increasingly difficult? Smart Switch on T34 and QFN soldering
    This way we have the module soldered out. Necessarily I advise against soldering thick wires to it - it is easy for it to tear off the pad, I have already been through this, I spoiled one circuit myself this way. It is better to make a stand, e.g. from a cardboard box, mark the first pin and then fix the wires to the stand (e.g. with hot glue) and solder to them:
    Changing firmware increasingly difficult? Smart Switch on T34 and QFN soldering
    You can also buy QFN breakout board with a compatible pin count and raster. I didn't have one on hand myself, but my method works too - I even took a souvenir photo while reading the Flash memory:
    Changing firmware increasingly difficult? Smart Switch on T34 and QFN soldering
    Another copy - another risky method, but again, wires to not break the pads:
    Changing firmware increasingly difficult? Smart Switch on T34 and QFN soldering
    We use our flasher and USB to UART converter for programming:
    https://github.com/openshwprojects/BK7231GUIFlashTool
    The programmer correctly discovers the GPIO configuration:
    Screenshot of BK7231 GUI Flash Tool showing extracted T34 GPIO configuration
    Then the chip goes back into place:
    Relay module with QFN-packaged T34 chip held in hand
    I do not reapply binder to such a layout. I just add a little flux, not too much, position it and heat it with hot air. With a bit of luck the layout sits and positions itself correctly. Sometimes it needs a little help with tweezers.

    Tuya's JSON detected (GPIO configuration):
    Code: JSON
    Log in, to see the code

    Verbal description:
    
    Device seems to be using T34 module, which is BK7231T chip.
    - Relay (channel 1) on P26
    - WiFi LED on P8
    - TglChannelToggle (channel 1) on P23
    - Pair/Toggle All Pin on P10
    

    We perform the rest of the configuration as usual.



    Pairing with Home Assistant:





    Summary
    Unlike the previous thread about the T34 , this time the conclusion is different. This device is unlikely to be reprogrammed without using hot air - because how? Does anyone have any ideas? Without the derived pads, I don't see this as a possibility.
    All this means that now having such, say, 5 modules, we have to solder the chip in QFN 5 times, solder the wires to it, program it, and then solder it back in place.... well, at least a bit more people will practice working with SMD components.
    Is there any way to make your job easier? There was one suggestion on Elektroda.com:
    Pink 3D-printed adapter with pins and desoldered QFN-package T34 chip on a surface
    This is a printed adapter for programming the T34 without soldering. It simplifies the second step, as the T34 has to be further soldered and re-soldered from the PCB. Source: https://www.elektroda.com/rtvforum/viewtopic.php?p=21732349#21732349
    Interesting concept, although it still requires probably the most difficult step.
    How do you rate the level of difficulty of such a firmware change? Have you worked with components in enclosures such as QFNs?

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 13130 posts with rating 10911, helped 604 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 21737271
    piotr_go
    DIY electronics designer
    LGA not QFN.
  • ADVERTISEMENT
  • #3 21737291
    Mastertech
    Level 28  
    Well, I don't know. To hook up to ground and plus you will probably find somewhere on the pcb. The question is whether the Rx and Tx go somewhere on the pcb so you can catch them, you need to look closely at the photo with the soldered circuit.
  • ADVERTISEMENT
  • #4 21737307
    p.kaczmarek2
    Moderator Smart Home
    Precisely the problem is that one of the UART lines is not led anywhere. That's why I gave pictures with the circuit soldered out:
    Close-up of QFN chip on PCB with exposed pads, one area marked with red circle. Close-up of a PCB with an LGA pad unconnected, pointed by a red arrow
    So you have 3.3 volts, you have ground, and you have one of the UART pins too - but what about the other?

    As for the nomenclature, I'll have to check, as when I looked before publishing it didn't seem to fit me in the bland way this LGA name does, but I'm probably looking wrong.
    NXP documentation page showing LGA package description with three package diagrams
    Helpful post? Buy me a coffee.
  • #5 21737367
    chemik_16
    Level 26  
    you can file in the circuit/pcb :)
    or press with a piece of tape
  • ADVERTISEMENT
  • #6 21737420
    piotr_go
    DIY electronics designer
    :) Darkest under the torch:
    Changing firmware increasingly difficult? Smart Switch on T34 and QFN soldering
  • #7 21737429
    p.kaczmarek2
    Moderator Smart Home
    And that's what I saw, but about that I had doubts because I know that T34s come in two versions - with pads accessible from the side and without. Although I guess that document from NXP what I gave a screenshot earlier clarified the difference for me a bit, there it says that LGA with pads only at the edges, it is also called as "laminated QFN".

    So there are at least two types of this T34 - with or without "side" access.

    @chemik_16 I'll try it at the next switch. File the side of the chip?
    Helpful post? Buy me a coffee.
📢 Listen (AI):
ADVERTISEMENT