The ESP32-WROOM-32E cannot connect to Wi-Fi after IO25 is occupied

Issue #428 resolved
YongYu created an issue

The ESP32-WROOM-32E cannot connect to Wi-Fi after IO25 is occupied.It is a pity that we have used other pins that can perform analog input and output and digital input and output in other places, and now only IO25 is left, which was originally thought to be used to connect the analog module with IO25 pins, but now it affects Wi-Fi. I wonder if you can change the firmware in such a way that the IO25 connects to the analog module without affecting the Wi-Fi.

Comments (5)

  1. John Maloney repo owner

    What is type of analog module you are using?

    In theory, it should be fine to use IO25 with WiFi -- and I have done so, although using IO25 for DAC output rather than as an analog input. However, electronics can be surprising. There can be unexpected interactions involving things like the power supply (especially when running on batteries) or capacitive cross-coupling between signal lines. WiFI uses a fair amount of power, so if the analog module also uses a lot of power then that could impact WiFi.

    Here are a couple of tests you could do: 1. Connect the power and ground lines of the analog module without connecting the signal line to IO25. Does WiFi work? Then make the connection to IO25. Does that change anything? Now disconnect the poer to the analog module? Does that change anything? 2. Write a simple script to read and graph the analog values from IO25. Without connecting the analog module, run some program that uses WiFi while also running that script. Is WiFI working? Now use a wire to momentarily connect IO25 alternately to GND and 3.3v. You should see the graph change and WiFi should continue to work.

    I hope one of those tests will provide insight in the problem.

  2. YongYu reporter

    Thank you for your reply. I did the test according to your prompt.

    When no module is connected, the Wi-Fi works normally. Video.

    When only GND and 5V are connected, analog values cannot be read after WIFI is enabled and disconnect, it seems that WI-FI has a higher priority, this is video.

    When connected to GND, 5V and IO25, the analog value cannot be read after successfully connecting to Wi-Fi.this is the video.

  3. John Maloney repo owner

    Thank you for doing those tests. I can see the problem.

    I suspect this is a hardware issue since I can't reproduce the problem on my ESP32 board. WiFi uses a lot of power, so one possible explanation is that when it is running there is not enough power left for the microphone sensor. (That could be the case even though the LED is on.)

    Do you have any other analog sensors, such as a light sensor or potentiometer? If so, do those work on pin 25 while WiFi is running? Also, does the microphone sensor work with other analog ports while WiFi is running?

    If you could send me a link (Chinese is fine) to some documentation or a "datasheet" for the AiM board, I can look to see if there is anything that could explain this problem.

  4. John Maloney repo owner

    I am not able to reproduce this problem. I believe it is probably a hardware issue, possibly a power supply issue. In any case, I don't believe it is a MicroBlocks bug so I will mark this resolved.

  5. Log in to comment