logo elektroda
logo elektroda
X
logo elektroda

[Solved] Preventing Crosstalk on ESP32 DevKit V1 Analog Pins (GPIO 34, 35, 36, 39)

Askabius 777 8
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18533762
    Askabius
    Level 5  
    Good morning,

    I'm using the ESP32 DevKit V1 board, when reading the input voltage from the analogue pins (GPI: 34,35,36,39), there is some crosstalk and even though the wire is "hanging in the air" or plugged into the prototyping board, out of nowhere, the voltage appears long enough that 'digitalRead()' perceives it as high, and holds above 100ms, I know this because I added an additional instruction to check the status after 100ms. The problem occurs despite a 1 kOhm resistor being soldered in. I don't know how to solve this. Anyone know perhaps how to fix it?

    I would also add that pinMode set to INPUT because INPUT_PULLUP gave even worse results and the voltage appeared more often. Previously (without the resistor) all I had to do was hold a wire connected to the input in one hand and a 3.3V wire in the other hand and the voltage was already high enough. for the program to read it as a high state.

    I would be forgetting... my observations showed that when, for example, I have a meter plugged into the circuit for 5 minutes (minus of the meter to any GND, and plus anywhere in the circuit - e.g. at the resistor leg), crosstalk does not appear at all. On the other hand, if I briefly unplug the meter, they already occur. Could this suggest that the resistance of the meter "kills" the crosstalk and it is enough to plug in a larger resistor?


    Thank you very much for taking the time to read and I hope for a quick reply :) .
  • ADVERTISEMENT
  • #2 18533876
    TvWidget
    Level 38  
    Askabius wrote:
    The problem occurs despite the soldering of a 1 kOhm resistor.

    Where did you connect this resistor ?
  • ADVERTISEMENT
  • #3 18533891
    Askabius
    Level 5  
    Preventing Crosstalk on ESP32 DevKit V1 Analog Pins (GPIO 34, 35, 36, 39)
    TvWidget wrote:
    Askabius wrote:
    The problem occurs even though you soldered a 1 kOhm resistor.

    Where did you connect this resistor ?
    .

    Added after 3 [minutes]:

    I also came across information that there should be something like this:
    Preventing Crosstalk on ESP32 DevKit V1 Analog Pins (GPIO 34, 35, 36, 39) .

    However, I'm not sure I got it right :/.
  • ADVERTISEMENT
  • Helpful post
    #4 18533995
    TvWidget
    Level 38  
    The latter is the correct way.
    If the wires are not very long then you can dispense with the resistor. In this case, you should configure the input as PULL_DOWN.
  • ADVERTISEMENT
  • Helpful post
    #5 18533997
    khoam
    Level 42  
    Askabius wrote:
    when reading the input voltage from the analogue pins (GPI: 34,35,36,39)
    .
    These GPIOs do not have internal pull-up or pull-down resistors built in, so they can only operate only in INPUT mode. If you want to connect buttons to these inputs, then they must be pre-polarised by using external pull-up resistors to 3V3 or pull-down resistors to ground.
    https://randomnerdtutorials.com/esp32-pinout-reference-gpios/

    Askabius wrote:
    Anybody knows maybe how to fix it?
    .
    Use one of the circuits below (R = 10k)

    Preventing Crosstalk on ESP32 DevKit V1 Analog Pins (GPIO 34, 35, 36, 39)

    Elimination of switch contact vibration remains an open question:
    http://mikrokontrolery.blogspot.com/2011/04/przycisk-drgania-stykow-debouncing.html
  • #6 18534984
    Askabius
    Level 5  
    Thank you very much for your help, I will do everything according to the diagram. I understand that MCU stands for ground, yes?

    EDIT: I checked that MCU stands for microcontroller. In that case, the ground is "at the bottom of the schematic", in the sense in which VCC is at the top of the schematic?
  • Helpful post
    #7 18534988
    khoam
    Level 42  
    Askabius wrote:
    I understand that MCU means ground, yes?
    .
    MCU stands for the input to the processor. Ground is indicated as an inverted triangle.
  • #8 18534991
    Askabius
    Level 5  
    khoam wrote:
    Askabius wrote:
    I understand that MCU means ground, yes?
    .
    MCU stands for the input to the processor. Ground is indicated as an inverted triangle.


    Ok, thank you. I consider the topic closed
  • #9 18534997
    Askabius
    Level 5  
    khoam wrote:
    Askabius wrote:
    I understand that MCU means ground, yes?
    .
    MCU stands for the input to the processor. Ground is indicated as an inverted triangle.


    Ok, thank you. I consider the topic closed

    Added after 1 [minute]:

    The answer is a diagram sent by the user.

Topic summary

The discussion revolves around issues of crosstalk on the ESP32 DevKit V1's analog pins (GPIO 34, 35, 36, 39). The user experiences unexpected voltage readings on these pins, even with a 1 kOhm resistor in place. Responses suggest that the resistor's placement is crucial and that the pins should be configured as INPUT with external pull-up or pull-down resistors, as these GPIOs lack internal resistors. Diagrams were shared to illustrate proper connections, and clarification was provided regarding the schematic symbols for ground and microcontroller connections. The user confirmed understanding and considered the topic resolved.
Summary generated by the language model.
ADVERTISEMENT