Hello! i have question.(Newbie) - nodemcu esp8266

Hello, I am studying Arduino and esp.
I searched for the lack of information in our community and found this forum here.
I apologize in advance for being a little awkward because I'm using a translator.

Please let me know if you are not allowed to post any questions here. I understand and will re-post the questions where appropriate.

I'm curious about two problems while studying the pull-up resistance and pull-down resistance while using nodemcu.

  1. It's a basic configuration that uses a switch to display on a serial monitor, and I heard that if you don't use pull-up/pull-down, you'll get a floating phenomenon. However, I can sketch with a simple configuration (D3-GND) and the monitor displays well without any problems. (0 and 1)
    In what situation does the floating happen and when is it not necessary to use it?

  2. While configuring, I accidentally connected 3.3v and GND directly. I thought the substrate would fail because this is a short circuit, but it turned off for a while and turned off again after releasing the short circuit.

Do most substrates have the function of preventing short circuit?

1 Like

Welcome! You have a lot of fun and headaches ahead of you. You are allowed to post and if you check you may find this forum in your language. Doing a little work with your search engine will give you what you need on pull up and pull down resistors. They are used to put something such as a processor pin in a known state that can be changed by some external force such as a button without damaging anything. Floating is quite involved but the inputs of processors have protection circuits etc and they will leak a minimal amount of current from both the positive rail and the negative rail. The actual value is indeterminate but usually about 50% of the processors voltage. The resistance is generally in the millions of ohms so any electrical field can cause it to go high or low or both (oscillate). This you do not want. Not sure what you mean bu substrate. The pins of the processor are very rugged and will take some abuse but about 10mA is the max, processor dependent. When working I use a lab power supply so I can limit my current to a safe level, that keeps me from frying the parts. Here is a simple rules to help:
Gil's Crispy Critter Rules, they also apply to Raspberry Pie hardware:
Rule #1. A Power Supply the Arduino is NOT!
Good luck and most important have fun.
Rule #2. Never Connect Anything Inductive to an Arduino!
Rule #3 when first starting out, add a 220R resistor in series with both Input and Output pins. (LarryD)
Rule #4 buy a DMM to measure voltages, currents and resistance. (LarryD)
Violating these rules tends to make crispy critters out of Arduinos.

D3 as well as D4 are a special case.
D3 is the pin that is used to select the boot-mode and is also connected to the 'flash' button and most dev-boards have a pullup resistor on that pin already.
D4 (GPIO 2) is the pin connected to the internal LED which is active LOW and so is also pulled up already.
D8 (GPIO 15) has a pulldown resistor on it already or the ESP won't work.

Boot mode selection is done by pulling certain pins LOW on boot, and you should keep this in mind with your project. GPIO 0, 1 & 2 should not be pulled LOW at boot for normal operation.
For a simple switch you should always use a pullup (or pulldown) but easiest is to just define the pinMode as

pinMode(GPIO, INPUT_PULLUP);

which sets the internal pullup resistor.

The 3.3v regulators that are on those boards usually have an overheat protection, and some have an over-current protection. (as do some USB hubs) Do not expect these protections to always work for you ! Things that went ok once, may result in damage the next time.

remove power from the board while you are making and breaking connections.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.