Question: Electronics newb, writing code on a Mac for ESP32 using Platformio. The ESP32 is connected to my Mac Studio via USB and a USB hub. All works well as long as I use one specific Micro USB cable which I have found via trial and error. The device is properly detected and upload works fine.

However, now I’d like to move the prototype further away from my workstation. For this I require a longer USB cable. After some searching I realized that not all Micro USB cables support a data connection.
Considerin this, after just buying [my second, supposedly fully connected Micro USB cable](https://www.amazon.de/gp/product/B0722PX1PM/) — still not luck.

Could the length be an issue?
Do you have some advice which cable to buy for this use case?

Any advice (and maybe explaination) on this issue would be greatly appreciated.

Answer: 
Here's the appropriate schematic.

[![enter image description here](https://i.stack.imgur.com/9ITML.png)](https://i.stack.imgur.com/9ITML.png)
Your circuit will work fine, and as it stands the two DC supplies will not interfere with each other. Of course, you must ensure that any power you derive from your additional supply does not overload the transformer. Any current you draw from your second supply is increasing the current through the transformer, over and above the amount that the first supply drew on its own.

The biggest issue you face may have to do with how the systems you connect to those two sources interact. You now have two ground points, the original labelled '0V', and your new one with a ground symbol, bottom right.

These are not the same, and by measuring the AC voltage between them, you will find a significant potential difference.

Consequently, any signal derived from a circuit connected to your new second supply will be relative its own particular ground, and in relation to the other supply's ground, it will look like a mess of noise and AC. You cannot solve this problem by connecting the two grounds to each other, because that will cause diodes to be short-circuited, and smoke to happen.

In other words, this arrangement will only be of any use to you if there will be absolutely no communication (or any kind of connection) between the circuitry on each DC supply. If all you want is to power a *completely independent* system from the second DC source, you are good to go. Otherwise you can expect serious complications.