1
\$\begingroup\$

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 — 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.

\$\endgroup\$
1
  • \$\begingroup\$ I'm not an expert by any means, but it may be the power level that's messing you up. Data can typically travel fine down a long cables but power will likely be affected as longer cables introduce resistance. For greater distance, if you can use a hub, try having a powered hub close to the device with a short cable from the hub to the device. The power should be max then. I've had times where the USB power just wasn't great and the device started resetting after adding a feature that the usb line just couldn't power. \$\endgroup\$
    – Jordan
    Commented Jan 8, 2023 at 0:34

2 Answers 2

2
\$\begingroup\$

USB cables must by specification be limted to 5 meters.

And by specification, officially certified USB devices must work with 5m cables.

The ESP32 you have likely is not officially USB certified device at all so in real life it does not have to work with any length of cable even if it has an USB connector.

On the other hand, you can't be sure if the cable fills the USB specifications either. It may also be faulty item.

The ESP32 might also have some manufacturing defect, or has suffered ESD damage.

It is always a good idea to not use maximum length cables.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks! As I’ve already tried two new 5m USB cables I reckon the length seems like the most likely issue. I will try a shorter one and also a different ESP32 dev board. \$\endgroup\$
    – polarblau
    Commented Nov 12, 2022 at 14:40
1
\$\begingroup\$

Advice? Check the eye diagram on the esp8266 with diff probe with both cables. If they have series resistors on the d plus lines you could possibly modify those to get better matching of the signal.

Odds are it's just a non-standard cable, most cables are not tested especially cheap ones from China and the construction is poor. The other problems on the device side if it's just on the edge with impedance matching and the cable is not standard then you probably just have a bad combination. I've had this before with various products.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.