logo elektroda
logo elektroda
X
logo elektroda

[Solved] Uploading Programs to NodeMCU Board: Utilizing Micro USB or Pin Output?

lexom 8193 5
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 19065869
    lexom
    Level 12  
    Hello.
    I have a nodeMCU board as in the picture below. The board is powered from the power supply (+5V) through the Vin and GND connectors (marked in the picture).
    My question: if I want to upload the program to this board, I connect directly to the computer with a micro usb cable and upload the program or do I have to somehow output it from the pins and then to the computer?

    Someone help? I don't want to break the plate.

    Uploading Programs to NodeMCU Board: Utilizing Micro USB or Pin Output?
  • ADVERTISEMENT
  • #2 19065893
    kaczakat
    Level 34  
    It's safer to disconnect Vin power while uploading, and how often you modify the program, use uploading via WIFI - OTA, add a few lines in the code, install a few programs on your computer to detect ESP in the network as an upload port and there is no need to even bring the board around PC. At least that's what you can do with Arduino.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 19065937
    lexom
    Level 12  
    I would prefer to do it traditionally via cable.
    Unplugging the power supply for the time of uploading will cause the 5V module to stop working.
    Can't upload via UART? By connecting RX, TX with UART1 on the board?
    Then I would have taken care of the 5V power supply and uploading the program.
  • ADVERTISEMENT
  • Helpful post
    #4 19066088
    khoam
    Level 42  
    According to the diagram (below) VDD5V is "separated" from VDDUSB by a 1N4007 diode, so as long as the VDDUSB voltage (from the USB port) is not more than 0.5V higher than the one indicated on the VIN, then nothing bad should happen. So much in theory ;)

    lexom wrote:
    Can't upload via UART? By connecting RX, TX with UART1 on the board?

    The CH340G bridge is powered from VDD5V, so it will also work when powered from VIN, and the RX/TX from UART0 are connected to this bridge. On the other hand, UART1 is "incomplete" - only TX on GPIO2 is available, so it cannot be used to upload the program.

    Uploading Programs to NodeMCU Board: Utilizing Micro USB or Pin Output?
  • ADVERTISEMENT
  • #5 19068514
    ex-or
    Level 28  
    khoam wrote:
    According to the diagram (below) VDD5V is "separated" from VDDUSB by a 1N4007 diode, so as long as the VDDUSB voltage (from the USB port) is not more than 0.5V higher than the one indicated on the VIN, then nothing bad should happen. So much in theory

    On the first pin of the J1 connector (i.e. VIN) VDDUSB is given so there is no separation! As for me, a terrible lime and I wonder what the friend wanted to achieve. Maybe it was the 5V output from USB to an external chip, and the pin description is a hoax? Or maybe the scheme is wrong or is for a different NodeMcu? For example, the penultimate pin on this connector is described in the diagram as ADC and the print on the board reads "G":-/
  • #6 19068527
    khoam
    Level 42  
    Yes, there is an error in the description of this pin in the diagram.
    If you look closely, this is version 0.1 of NodeMCU.

    Added after 1 [hours] 49 [minutes]:

    ex-or wrote:
    For example, the penultimate pin on this connector is described in the diagram as ADC and the print on the board reads "G":-/

    Pinout of this board version below.

    Uploading Programs to NodeMCU Board: Utilizing Micro USB or Pin Output?
ADVERTISEMENT