blog

USB connector replacement on STM32 blue pill development board

by snm, January 15th, 2018

As discussed in USB breakout boards for supplying power to your projects, it is a known issue the micro-USB connector on the STM32 blue pill board is not the best:

This happened to mine. The USB connection of this port is very flakey:

Bad USB

To remove it, used a hot air gun, specifically the one I just received and unboxed in Youyue 858D hot air gun first look. It came off easily:

Removed bad USB

Now to replace it. I already had ordered these micro USB breakout boards: 5Pcs CJMCU Micro USB Board Power Adapter 5V Breakout Switch Interface Module For Arduino. Desoldered a connector on the board using the same hot air technique. The connector on this breakout is slightly different (middle) versus the blue pill’s micro USB connector (right):

USB breakout board and micro USB comparison

but I’m hoping it is compatible enough with the printed circuit board connector footprint. Carefully position the new connector on the circuit board traces:

Adding new connector

There are some clear problems. The ground tabs on the side stick in between the two large pads. The ground tabs on the back stick out too far to the bottom. Bent them up and away, and also the side tabs upwards, to help allow the smaller pins to make a better connection to the board. First attempt:

Fail 1

Plug it into a computer and…nothing. The power LED doesn’t light up. Bad connection. Trial and error:

Closeup

It doesn’t look pretty (largely because of the angling needed to get a connection), but finally was able to get a working port:

Good port

While I was at it, soldered the bad port to the USB breakout board, just because:

Bad port new home

So how well does this new port work? Tested by flashing the firmware in pill_6502: 8-bit 6502 CPU and 6850 ACIA emulation on the STM32 blue pill to run Microsoft BASIC from 1977 then connecting over and powering from USB, and it worked perfectly. However, one still ought to be careful in unplugging from this fragile micro-USB port too frequently, I think I’m going to unplug from the USB-A side on the host computer instead when I can.

Also, if you want to do this replacement yourself, I wouldn’t recommend buying this particular USB connector, since it isn’t the exact same footprint. Buy the same connector as a replacement if you can find it. But as for me, this is what I had and it worked at least well enough for my purposes.


Comments?