Working with ESP01 and ESP12 modules a lot recently, so, I thought I’d pick up a programmer which supports both with a USB-C connector. I picked up something from eBay, but I’ve found it on Amazon and AliExpress as well (links below). Unfortunately, it didn’t work out of the box.
I was initally trying various USB-C to USB-C cables, but there was no power, and it didn’t show up on as a device. On a whim, I tried a USB-A to USB-C cable, and to my surprise, it worked. It turns out that this is a common issue with devices initially designed for Micro/Mini USB, and then later updated to USB-C. The USB-C connector has a few extra pins which are used for power negotiation, and if the device doesn’t support them, it won’t work with a USB-C to USB-C cable. I found some information describing a very similar issue for other devices, and it turns out that the fix is relatively straightforward. Both CC1 and CC2 (A5 and B5) need to be pulled to ground, each with their own 5.1kΩ resistor. Technically, you only need to pull one of the CC pins to ground, but I figured I’d do both, allowing the USB-C cable to be plugged in either way.
After I verified that this worked using a USB-C pass-through adapter, I decided to make the fix permanent. I used two 5.1kΩ 0603 resistor, and soldered one half of both of them to a scratched-off section of ground plane. Routing CC1 and CC2 to the other half of the resistors was a bit tricky, but I was able to do it with some 30AWG wire wrap wire. I then covered everything with some green UV-cure solder mask.
It should be pointed out that while this device has a USB-C connector, it is NOT USB-C compliant, and in my opinion this makes the device defective. There are a lot of devices that got a USB-C connector upgrade, but didn’t actually implement the USB-C spec. If the device doesn’t require more than 5V at 0.5A, then all these manufacturers need to do is add two 5.1kΩ resistors costing a fraction of a cent. I’m not sure why they don’t do this, but I suspect it’s because they don’t know about the issue, or they don’t care. I’m not sure which is worse.
I hope this helps someone else out there.
Item for sale
- Amazon: HiLetgo ESP01 ESP12 ESP32 Development Board Programmer ESP8266 Series Universal Downloader Burn-in Fixture Test Board Programmer Socket for ESP-01 ESP01S ESP12 ESP32 CH340 Drive
- eBay: ESP8266 ESP32 Test Board Burner Fixture Development 32 Modules Board E6A4
- AliExpress: ESP8266 ESP32-WROVER Development Board Test Programmer Socket Downloader for ESP-01 ESP01S ESP12 ESP32
- AliExpress: ESP32 /ESP-01/ESP12 Development Board With Raspberry pi 4 Universal Downloader Burning Fixture Test Board Programmer for Arduino
References
- USB-C Pinout
- How come some devices only work with USB-A to USB-C?
- USB-C device ONLY works with a USB-C to USB-A cable - violates USB-IF specs?
- How to design a proper USB-C™ power sink (hint, not the way Raspberry Pi 4 did it)
- USB Type-C Cable and Adapter Tips and Tricks
- Simple way to use USB Type-C to get 5V at up to 3A (15W)