NODEMcu Usb Port Not Working? Upload the Code Using USB to TTL(FTDI) Module in Just 2 Steps

Introduction: NODEMcu Usb Port Not Working? Upload the Code Using USB to TTL(FTDI) Module in Just 2 Steps

About: Hobbyist and tech enthusiastic
  • Tired of connecting to many wires from USB to TTL module to the NODEMcu, follow this instructable, to upload the code in just 2 step.
  • If the USB port of the NODEMcu is not working, then do not panic. Its just the USB driver chip or the USB connector, that may be broken, the ESP8266 will be still functional.
  • In many cases while testing, the USB driver gets burnt, there's no need to worry.
  • By using the USB to TTL module in just 2 steps we can upload the code.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: MATERIALS NEEDED:

Step 2: CONNECTIONS

NODEMcu----- USB to TTL module

Vin ---------------> 5 volts

Gnd ---------------> Gnd

Tx ---------------> Rx

Rx ---------------> Tx

Step 3: Procedure

Once the connections are made as mentioned, then follow the following steps:

  1. If we now try to upload the code, it will still show the error as shown in the image.
  2. So as to successfully upload the code using the USB to TTL module, first press the flash button and while you keep the flash button pressed, press the reset button, and then release them together.
  3. Then try to upload the code, the code will get successfully uploaded.

NOTE: EVERY TIME WE UPLOAD THE CODE FOLLOW THE ABOVE STEP

HAVE A NICE DAY......CODING.................................

#include<byebye>

Be the First to Share

    Recommendations

    • Backyard Contest

      Backyard Contest
    • Silly Hats Speed Challenge

      Silly Hats Speed Challenge
    • Arduino Contest 2020

      Arduino Contest 2020

    7 Discussions

    1
    FardousA
    FardousA

    1 year ago

    Have anyone tested it yet?

    1
    marcolinux46
    marcolinux46

    Best Answer 1 year ago

    It's working for me....

    0
    spiroqosja
    spiroqosja

    Reply 7 weeks ago

    And for me it's ok but some time it is not. I din't why?

    0
    dizonmarvin58
    dizonmarvin58

    2 months ago

    Tried to program my chinese nodemcu using my chinese arduino nano as usb to uart. It works! what i did was, I long pressed the flash button while powering it ON and release after it boot up for 1sec, then i upload my sketch and it works!

    0
    mcu32767
    mcu32767

    3 months ago


    Hello All

    As of the date of this message, the solution above is incomplete and may not work for you - perhaps it has been corrected by the time you read this. Here is the more-complete solution to the problem above. And no, you don't have to read all of my blathering plea/campaign below, so here is a possible solution if you are still experiencing the same error described:

    >> Start the board with the Flash button being held down
    until you see the blue LED flash - the board starting <<

    You can view the button sequence in two different (and confusing) ways but if you follow the last statement instead above, it will work.

    If this helped you, please read on and then perhaps my 15-minutes of typing here may save many-many developers an hour or so of wondering if they are losing their mind. This type of experience discourages new developers, or those developers just new to the NodeMCU. Help fight tech ambiguity when it really matters.

    TLDR; - jump to the bottom and read "In simple terms" if you want to see all the wiring and button sequence steps.

    Please help in my my business and tech battle against ambiguity and shortcuts - they are costly.

    I mean no offense to the author above, as I have been guilty of this type of ambiguity as well during my career. We are all guilty of this and we should all hope to improve on this. I am just using this simple example of how ambiguity can be a discouraging costly headache. And since this ambiguity is found in most solutions to this NodeMCU issue, I will be sure to post this plea (perhaps shorter) in other less-deal solution I see posted to this problem. I encourage you to so this when you can. Your 1-minute correction can save thousands of hours of lost time and encourage someone to not give up in solving an incomplete solution to a problem. Pay-it-forward! Try to take the time when can even though we all know it isn't always possible. I coded all day and decide type for a few this evening. :)

    Ambiguity often appears and makes things miserable for others, so it is best to try to (within reason) reduce ambiguity when possible. Open Source is often full of ambiguity - because there is generally no back pressure to reduce it. In tech and many other fields, ambiguity and infinity never play well together. :) In binary, "close-enough" doesn't cut it. Have you notice, especially in the last 20 years (vs earlier simpler times) that almost ALL system and developer examples and walk-through's simply DO NOT WORK? Communication and documentation (and often QA) is not given much attention. I just bought a nice and expense large screen USB power tester today, only to see that it was NOT QA tested - the Power, AH and WH readings had the decimal in the wrong place! I actually feel bad for the product owners, but they took a shortcut and it bit them, and me (more them than me thanks to the nice return policy).

    With this simple fix (and notice, it isn't a technical fix) I hope to save the many thousands of readers from the headache of ambiguity (perhaps the biggest problem in modern business) mixed with infinity. The instructions above, work just fine, expect possibly one small spot, unless you are just lucky. Luck is never a good way to solve a problem.

    The word "together" (aka, "at the same time").
    It all comes down to the use of word "together" in the instructions above. Is within 10ms good enough? How about 1ms? How about 1ns? How about less than that? The author apparently does it the right way (and we are thankful for the article) and possibly assumed that you would just do it right way as well. But what is the right way? Remember that conversion error on that Mars lander? Ambiguity can be costly. Luckily in this case here it is only some time lost.

    The reason ambiguity is everywhere:
    Most people have a tendency to take short cuts (save 1s here, 2s there) and expect others to just read their mind (this often doesn't turn out well). Or we often see those who create something (a product) expect that others (new-comers) have been with them on the project since day one and are thinking exactly like they are thinking. At times I am guilty of this too, but I really try hard to catch my ambiguity and do that old-school thing of restating something without the ambiguity - even restating something two different ways to be clear. So often 5 seconds saved by one, costs 100's if not 1000's of hours with others .

    Audience and Context is important:
    Brevity (abbreviating, taking short cuts) is fine in the right context, as in: if we are both in the US and you ask me what the temperature outside is and I say 80 (when it is 80F) , because of the context (both of us the US) you are most likely going to know that I mean 80F - if we were in EU then perhaps I would be ambiguous in say just 80. If really thought that I meant 80C then we are both (actually everyone) in trouble soon.

    In the case of many current NodeMCU boards (probably your as well, but perhaps not, so keep that in mind here) the precise sequence of pressing the FLASH and RST is important and there is no room for ambiguity - if you it to work 100% of the time (not just when lucky). For this I am using an Amica produced NodeMCU board bought in late 2019.

    === In simple terms ===
    When you are ready to upload your code to the board
    Connect (Serial Converter -> NodeMCU board):
    [1] RX -> TX
    [2] TX -> RX
    [3] 5v -> VIN (not 3.3v to VIN, but 5v to VIN, notice no ambiguity there)
    [4] GND -> GND
    [5] Button Sequence: Hold down the Flash button and tap and release Rst button, then after about 1sec release Flash (read that twice) - be sure to keep the Flash button down while you first release the Rst button (if you do not do this, you will not put the board into upload/programming mode. As far as I can tell, it is safe to say that when you see the blue led flash, you can release the Flash button - but only knowing the wiring of the NodeMCU can you know for sure. Remember, the release of the Rst button causes the reset/start of the board.

    After the upload/programming is completed, your NodeMCU program should begin to execute - if not, press the Rst button to restart to brak out of programming mode. If you want to upload again you must follow the steps again as the board is no longer in upload/programming mode. A Wemos Esp-8266 will not work this way as there is no Flash button as there in on a NodeMCU board.
    ====================

    *** I am going to repeat that last step again so that it is very clear ***
    Press and hold Flash, then tap Rst (reset) and then about 1 second later release the Flash button.

    What you are really doing here here with the sequence of events is rebooting/[re]starting/resetting the board, and you are ensuring that the board is restarting/resetting with the Flash button being held down (by following that exact sequence). This is the important part that was not clearly stated - and perhaps you just knew - and then you wouldn't have needed to read this article in the first place.

    The reason for the ambiguity is the use of the word "together". Because of the laws of the universe, and the concept of infinity, the use of the word "together" cannot be used here in this context. No two event in the universe happen at the same time. You were expected to just know (not really possible) that what was meant was to start the board with the Flash button held down and the releasing it after the start (and really, when did start, none of us knows the exact moment in time - a keep point).

    If you were helped here, try to remember this moment (and this way-too-long article that put you to sleep) and be sure that you too try to reduce ambiguity in your communication with others. Think of the many thousands of hours of human time you will save the species if you do that. Now I hope I will do the same. :) Please let me know if didn't here, or if don't in the future.

    I typed this because after decades of seeing millions of dollars wasted in tech on 5-second shortcuts. All that loss costs us all.

    * Some keywords to help this message index:
    NodeMCU
    Serial to TTL Converter
    Upload
    Button
    RST
    RESET
    FLASH
    espcomm_sync
    espcomm_open
    espcomm_upload_mem
    failed


    0
    zyon2k
    zyon2k

    10 months ago

    Not work for my module

    0
    lolipop8867
    lolipop8867

    Reply 10 months ago

    Which wifi module are you using?