My ESP32 is running on it's own power supply (via 3,3V power input, not micro USB) and has quite few sensors physically connected. Is it ok to connect ESP32 to PC using USB cable without switching off external power supply? I would like to adjust code without dismantling ESP32 from it's current location.
Is there any other way to replace main.py file on ESP32 (ftp, wifi?)
Connecting to PC via USB, while power supply is ON
- MostlyHarmless
- Posts: 166
- Joined: Thu Nov 21, 2019 6:25 pm
- Location: Pennsylvania, USA
Re: Connecting to PC via USB, while power supply is ON
This very much depends on how your power supply is implemented and what protective diodes are in place. I would expect that your regular power supply is based on some type of voltage regulator. Even though they can withstand some back-voltage (which is a common thing when power is cut), there are limits to that.
Check this StackExchange discussion for some insights.
The next question would be "is the USB port properly protected from back-voltage?" As per USB 2.0 spec that is not allowed.
Regards, Jan
Check this StackExchange discussion for some insights.
The next question would be "is the USB port properly protected from back-voltage?" As per USB 2.0 spec that is not allowed.
Regards, Jan
Re: Connecting to PC via USB, while power supply is ON
In addition to the power supply you're using, it also depends on your ESP32 board. (i.e. how the USB 5V->3.3V regulation works and protection diodes on the board).
In general though, it is common for boards to be able to support this, but there are many that don't.
WiFi: Use WebREPL. This comes with the firmware. See the ESP8266 instructions (same for ESP32) here: https://docs.micropython.org/en/latest/ ... -over-wifi
In general though, it is common for boards to be able to support this, but there are many that don't.
FTP: There are a few different implementations of FTP servers for MicroPython.
WiFi: Use WebREPL. This comes with the firmware. See the ESP8266 instructions (same for ESP32) here: https://docs.micropython.org/en/latest/ ... -over-wifi
Re: Connecting to PC via USB, while power supply is ON
Great, thank you both! Too many ifs and buts when it comes to power supply, I know too little about protection circuits on my board, but if webrepl solution works, then it is even better I have enabled webrepl on my board, but could not see the way to copy over file. I see it now in documentation and will test it out.