As part of my project, I need to create a PCB with male JST connectors, but there’s something that’s bothering me. In my schematic, the pins are numbered from top to bottom (from what I understand, the correct numbering direction is either from top to bottom or from left to right). The problem is that on my PCB, I had to rotate my connectors and change the order of the labels on the PCB (contrary to the pin numbering in the motor datasheet) after noticing that on most PCBs, the holes of the JST connectors were oriented outward. The issue is that the pins are now numbered out of order, and I’m concerned that this might cause compatibility issues or something else. Do you know how to correctly orient this component? Thank you.
For me such rule not exists. Imagine DIN rail mounted case. You have two terminal block rows. Down row have to have holes for wire directed down, and top directed top. Of course one row will have pin numbers from left and the other from right. If at schematic I want pins from top down being in real from left right than one of terminal blocks set I will have to rotate and I will have highest numbers at top (at schematic).
From your picture it looks that it is the connector that can be inserted only one way. So if you have wrong direction of numbers that it will be not possible to solve the problem by inserting socket opposite.
It is not important how pins are numbered. It is important what signals are where.
I don’t really understand what you did or what the problem is.
In schematic symbols, the order in which pins are on a symbol is visual only. It is very common to have pins ordered in any combination that makes sense to function. Just place any schematic symbol of an IC on the schematic. Especially with microcontrollers this is very clear.
Footprints on the PCB are of course limited by the physical size of the part that must fit on them.
Rotating a footprint is normal. It just stays the same footprint, just as with [F] lipping it to the other side of the PCB.
I do not know what you did there. Apparently your connector has to fit with some motor, and this defines the pin functions.
In KiCad, the link between schematic symbols and PCB footprints is very simple. Pin numbers on the schematic, are mapped directly to the pad numbers on footprints.
Oh I didn’t know we could flip the footprint, this what I was trying to do at the beginning but didn’t find how to do it so I thought I had to change the order of the labels in the schematic
That may have been the cause of the confusion, but it is not a good way to design the PCB. It’s much better to just put the connector on the back side of the PCB and then use the same pin numbering in the KiCad project as in your example picture.
In generally I put GND on pin 1 of connectors. But I have really no good reason for it other than that it is a square pad… + it does not always work.
I often use screw terminals and sometimes I too find that the footprint connections are just the opposite of what I intended. I found that it is not always so predicatable so I simply accepted this as a fact of life. Afteral a schematic has to be readable and sometimes it helps to flip a symbol.
Whenever my screwterminals are airwire’d wrong, I go to the schematics, flip the symbol and be done with that. Despite the schematic is leading in all things, I do change it from time to time so that the board comes out better. Swapping IO pins and flipping some connector is completely normal to me.
In the end your board has to work. And you should always visually check in your board design if the external connectors are wired correctly.
The numbering i do is the one that is logical, means that the pins of signals that should go on top are on top and so on. That can mean that the numbers are not in order. That doesn’t matter, the schematic is not a layout. If +12V is on pin 1, GND is on pin 3 and 6 and +5V is on Pin 8 (when someone was stupid enough to use that ordering for whatever reason), the order in the schematic is:
Pin 1: +12V
Pin 8: +5V
All the other pins
Pin 3: GND
Pin 6: GND
Please don’t mix up the schematic and the layout. The schematic is to see the function and logic of the circuit.
Of course, you can do any pin numbering you like, nobody stops you, but there isn’t a correct one.
It isn’t that uncommon that connectors are numbered differently by different datasheets. Sadly, Molex even manages it to use different numbering on their crimping cases than on their PCB connectors (KK). Annoying, but that is how it is.
Yes a straight cable would mirror the pins. But then it isn’t a 1:1 cable. A 1:1 cable connects Pin 1 to Pin 1, Pin 2 to Pin 2, …
Texts like these are confusing, but connectors can be confusing too. When male and female connectors are mated then they have a 1 to 1 pin connection, and this often leads to (close to) mirrored footprints for those connectors.
In the schematic, thes DB25 connectors have their pins in the same orientation:
If you used a footprint for a female connector, you can probably fit the male variant on the footprint, but the pinout would be all wrong, unless you insert the footprint also from the other side of the PCB. Connectors are quite troublesome parts, also because there can be many different footprints for the same connector. The interface how connectors mate with each other is standardized, but the footprints on the PCB are not. I’ve seen collections of 100+ micro-USB connectors.
And if you want to look at them closer, here is the “project”. 2023-10-10_DB25_M_F.zip (18.4 KB)
Didn’t we talk about the same connector on both sides?
I don’t think it is confusing. If you have the same connector on both sides, a 1:1 connection mean pin 1 to pin 1, pin 2 to pin 2, pin 3 to pin 3, … That can mean the wires in the cable have to be “twisted” or “mirrored” (not sure what the correct term is). In the case of a connector with only a single row, no twisting/mirroring of the wires is needed, just of the connector (on one end, the connectors is “upside” and on the other it is “downside”).
Ok. I understood.
In such case I would use one 8-pin symbol with natural pin number order and just a serie of short wires going to bus with labels at each wire. On the other side of bus if needed I could go out with them in logical order.
IDC connectors are made in such a way that you can press either male or female connectors on the flatcable, and as long as you regard the pin one mark, the connection will be 1:1. Most other cables I know are round, and wires either crimped (RJ45) or soldered (DB25) individually.
And for schematic symbols, I find it a sort of intriguing Idea to use a 9-part symbol for an 8-pin connector. This lets you reorient the pins inside the “box” (the 9-th part). But it’s so easy to load a connector into the symbol editor and modify it that it does not matter much. I also think that features are planned to be able to modify schematic symbols directly in the schematic without loading them first in the symbol editor.