How do you connect everything on your microcontroller when its ready for production?

I wanted to know how other people are connecting the wires on there microcontroller (for example an ESP32) when it is ready to place it in a casing for production.

When prototyping offcourse you use a breadboard and use dupont cables. But what when you are ready?

Till now I was always using the Wemos Mini D1 boards. These are delivered with no pin headers soldered. So I have soldered pin headers on it for prototyping.

But for the production version I soldered the cables of my sensors/leds/etc directly to the board (a version without pin headers) and place everything in a universal casing like this:

But I’m going to switch to an ESP32 board with already pin headers soldered on it.

Now I have seen that some people are using the dupont (female) cables on the pin headers of the board or use own created multi pins dupont plugs.

Is that a reliable construction for production?

Or do you have to use this kind of PCB where you solder female pin headers on it?

So in short, I’m curious how others do this for a production version since I don’t find much about this on the internet.

I always (at least try to) use the perfboard proto-typing board that you show above for all of my production projects.

Soldered wires will always be better than push in connectors.

But I also use the female headers and screw terminals on things I might need to replace at some point.

So external sensor connections get screw terminals. My NodeMCU boards get female pin headers to plug into. all of the other internal wiring connections get soldered.

I personally use soldered sockets and headers on the microcontroller and break out the connections I need on a perfboard. Connections that remain like temperature sensors in the case can use dupont connectors, for the rest I use USB for 5V parts or screw terminals.
This way I can deploy th board easily and, whats more important, I can swap out the microcontroller in case I need a reflash from USB or the board is broken thx to myself.
Also I solder on the left of the board the female part and on the right the male part. That way I cant mix up the direction in one way. Its origin is a mistake tho, but I kept using it this way.

Okay thanks for sharing your way of doing it.

You mention screw terminals for sensor connections. I’m wondering what sort of screw terminal setup you’re using?

I’m looking at building out a number of (different) ESP controllers in project boxes, which will be wired to external sensors. But trying to figure out how to connect the sensor cable runs into the ESP box. I think some sort of screw terminal (on outside of box?) would be really nice. Any ideas for what to use?

I make a PCB for my projects. They are cheap, but the shipping by standard post takes a few weeks. (Don’t blame China- it’s delayed in US Customs). I use, almost exclusively, the Wemos D1 Mini in my projects, but I will probably try using the ESP32 soon. One recommendation is that you ALWAYS socket the Wemos.

Im using these kind: https://www.amazon.de/schraubklemmen-Terminal-Schraubklemme-Arduino(100-Stück,5mm,Blau,2/dp/B07Z7NTWXT/ref=sr_1_5?keywords=screw+terminal&qid=1673049034&sprefix=screw+t%2Caps%2C144&sr=8-5
But most of the time my cases are made for mains installations including kind of seals through which i route the cables. I solder them directly to the PCB and have any wires connected inside. The only exception i have is a temp sensor that has a pin header, which goes directly through the seal and is plugged in with a dupont extension.
Depends on where yoju deploy them, it makes sense to have the screw terminals extending out of the case - but in my design, that comes to my mind with this approach youll need to print them with a 3d printer. Those nodes would come handy in like a wiring cabinet or on DIN rails.

The specs of those screw connectors scare me for mains power.
They are similar to the terminals on the Sonoff Mini and I have seen them overheat when they get loose over time.

brute force :fist_right:


Everything is related with what you define as production.

If you want something minimally professional custom PCB. They are supercheap in chinese manufacturers.

Even for prototyping I use custom PCB due to their low cost and reliability.

What kind of software do you use to create your custom pcb? Where do you order the custom pcbs?

I have never created one by myself but I want also create my own custom pcbs. I’m going to change to ethernet boards instead of wifi boards. Those ethernet boards costs more money so I want to solder pin header on those boards and female pin header on a custom pcb.

So it is much easier to change them when they are damaged. I don’t know if i have to solder the wires to the custom pcb or that I have to use some screw terminals.

I use Altium as I am professional. KiCad is for free and it is super good enough for most of the hobbist and not adavanced professional projects.

PCBway works well for me.

Okay thanks I will take a look at it.

I’m not concerned about handling mains power. In fact, that capability is overkill for my needs-- I’m looking for a way to connect low-voltage wiring into my project boxes, like door-open sensors, temp sensors, etc. Ideal would be something mounted on outside of box, not having to route wires into the box, but just screw onto a terminal strip or something on outside of box.

Am strongly considering bulkhead-mounted RJ-45 connectors, but would be a little more pain to do cable termination into RJ-45 plugs than into screw terminals.

I just dont do mains wiring. Im not qualified for that and have no rights to do so. I just use normal phone chargers or, when i need 5v and 12v an old atx psu