logo elektroda
logo elektroda
X
logo elektroda

ESP32 WROOM-32D - Which GPIO Pins Stay LOW on Boot for Safe Relay/LED Control?

ademba 183 2
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 21538219
    ademba
    Level 2  
    I have an Arduino based circuit built that simulates my use of various buttons on the remote control (the corresponding led lights up on the receiver), but I want to switch to ESP32 and this is new to me.

    There are different pins on ESP32 and not all of them can be used. For example, pin GPIO5 on startup is high which causes the LED connected to this pin to turn on and off, but I can use this pin as on startup at most the user will notice the LED flashing which means the system is starting up.

    However, I also need other pins which will simulate other functions, and they must have a low state on startup and during operation, there must never be a high state there, because this would cause, for example, a relay connected to this pin to be activated without the user's knowledge.

    On the Arduino I had such pins, now I want to switch to the ESP32, so using the pins I have described here, will I not have a collision situation that at some point in the operation without my knowledge one of the pins will be activated?

    // Definicje pinów dla diod LED na ESP32
    const int buttonSystem = 18;  // Przycisk aktywujący/dezaktywujący odbiornik
    const int buttonLED1 = 19;   // LED1
    const int buttonLED2 = 21;   // LED2
    const int buttonLED3 = 22;   // LED3
    const int buttonLED4 = 23;   // LED4
    const int buttonLED5 = 25;   // LED5
    const int buttonLED6 = 26;   // LED6
    const int buttonLED7 = 27;   // LED7
    const int buttonLED8 = 32;   // LED8
    const int buttonLED9 = 33;   // LED9
    const int ledSystem = 14;    // LED sygnalizująca zasilanie
    const int ledSignal = 13;    // LED sygnalizujący aktywny przycisk
    .

    One such pin (as I mentioned earlier) that gets activated active at startup is GPIO5, but that's fine with me, as I'll use it as a signalling led (system start flashing LED), then it will light up when the system is activated by the user.

    However, the rest of the pins I have written here can be used?

    I have an ESP-WROOM-32D This is a module with a built-in antenna.

    By the way there are better some modules that don't break the connection and once connected the device communicates with the ESP32 without problem until the user disconnects the connection himself. Maybe there are much better boards out there. I've tested this one and it's generally OK, but I wonder if the same one but with an external antenna would be better. We want communication with the ESP32 to be seamless and, under various interference conditions, to be able to control the functions the ESP32 is supposed to perform with the remote.

    I want to go ESP32 because it is easier to expand the whole system. Also, a tablet, computer can act as a remote control I don't need to make a physical transmitter and receiver separately. On the ESP32 I can have the whole system loaded so I am leaving the second module I would need to build to have a remote that communicates with the receiver.
    Do you have a problem with Arduino? Ask question. Visit our forum Arduino.
  • ADVERTISEMENT
  • #2 21538241
    inot
    Level 37  
    ademba wrote:
    the rest of the pins that I've written out here can be used?
    Yes.
    The GPIO18 pin can also be used as an output, and the button that activates/deactivates the receiver can be implemented on either GPIO34 or GPIO35.
  • #3 21538512
    khoam
    Level 42  
    Detailed information on the use of individual GPIOs in the ESP32 is at this link:
    https://randomnerdtutorials.com/esp32-pinout-reference-gpios/

    ademba wrote:
    I've tested this one and it's generally OK, but I wonder if the same one, but with an external antenna, wouldn't be better.

    An external antenna would be better than that piece of pcb that pretends to be an antenna.
ADVERTISEMENT