External USB to UART programming

Hey guys,

I am currently designing my own PCB that is centered around an ESP32s3 and I'm trying to understand how to program it externally.

I am aware that you can add to your pcb a USB to UART (CP2102/09) bridge and program the controler that way. But I do not have enough space on my board to do that. (very high density PCB)
My idea was to have an external USB to UART board that acts as a programmer + debugger
But I'm not sure that it will work properly, as it would need to be connected to the board via the available micro-usb:
not only that I am not sure you can send UART data directly through a USB (without any conversion) nor if it's a good idea.
Let alone the fact that the micro-usb is also here to charge my device (I could also try to implement pogo pins instead)

What do you think? Is there any way to have an external programmer/debugger to my esp32 without the need to add any circuits to my board? Or should I just find more space available? (last resort really)

try searching for esp32 programmer, e.g. on EBAY
or you can include on your PCB a suitable circuit
1688996078481blob

I don't think so, no. Just use an UART bridge; CP210x will do, but so will the cheaper CH34x from WCH or the more expensive FT232 etc. There are quite a few options. I mostly use the CH340 because it's cheap and gets the job done.

Yeah, that works well. I keep a couple around for various kinds of platforms. They connect through a 4- or 5-pin connector to the board. Saves some space on the controller board for an UART bridge that's only used during programming and debugging anyway.

Note the little circuit that @horace posted; it's what you need to easily program your ESP32 from the Arduino IDE. This is the implementation I used on one of my ESP32's:


Same thing, really. Works fine. IDK if I actually used 4u7 for C8 or something smaller; I think I actually soldered 470nF or 100nF in there. Shouldn't matter much anyway.

Yes I already know about all of what you were both saying. My problem is not exactly how to connect a USB to UART bridge to the controler, but how can I handle the connectors correctly without having to do any conversion. Well, at least to my understanding.

At the moment, the only entry point I have available on my PCB is a micro-USB. So it cannot handle RX and TX. So plugging a programmer to the port is insufficiant.

Does that mean that I am forced to put dedicated connectors for RX and TX to program my board ? It feels overkill, especially if the board was meant to be sold in a large number of units.

Take into account that the board is very small (20x40mm) and has a very high pin density (12 layers recquired at the moment). So I am searching for an optimal way to reduce the amount of space recquired to program the board. If you have any small connectors in mind, or know how to implement a realiable and small entry point on the board (to get RX and TX), I would be thankfull.

OK, I see what you mean now; sorry for the misunderstanding.

Yes.

But it really isn't. After all, if you were to put a USB connector onto the board but in reality it carries a different kind of signal, you're creating a confusing situation that will bite you or someone else in the posterior sooner or later.
If you feel adding pins would take up too much space etc., you could do something with pogo pins. All you need is a couple of pads, in that case. You can make them pretty small. You may be able to find pogo pin headers with a narrower pitch than 2.54mm, but I haven't specifically looked.

Oh man. There are so many connectors out there. One thing that comes to mind is a narrow-pitch FPC. E.g. a 4-pin 0.5 pitch FPC connector can be something like 8.5x6mm. That's not particularly big. Of course, smaller = clumsier, but it'll work for debugging etc.

Don't worry, I was not being clear.

I'll take your answer as a solution, I think it'll be enough for the moment. I'll try your idea for a prototype and see how it goes.

Many thanks,
Have a great week

1 Like

Sounds good; monitor this thread for any bright ideas I've overlooked. There are some really creative people on here.