Tuesday, July 11, 2017

ESP8266 Programming Cable

I had been having trouble uploading sketches from the Arduino IDE to my ESP8266 based devices. Then I saw a comment about the type of USB-Serial converters I was using: if you select the 3.3V setting, it only affects the data lines - NOT the power line!  The power line remains at 5 volts. (This appears to be true of most USB-Serial convertors.) This resulted in the death of several devices until I learned about this.
The Moral: Never Assume - Always use a voltmeter to verify.
To remedy this I came up with a cable mod that adds a 3.3V regulator, as shown in the accompanying photos. Any 3.3V regulator chip will work, but I used a surface mount LDL1117 since it would produce a smaller "lump" in the resulting cable.






First, I soldered small wires to the leads.







Then, I encased the chip in epoxy to make it much more rugged.






The chip is then spliced into the original cable. The 5V line goes to the regulator chip and the 3.3V line now goes to the connector in place of the 5V line. The ground line, of course, has to connect to both the regulator and the connector.





The entire mess is then wrapped with electrical tape. Shrink tubing would work better and look cleaner.


I haven't had any troubles uploading sketches since I started using this cable.