SOT-23 Pin-Out: base and emitter are inverted

Pin-out SOT-23: troubles

In a project I used the 2N3904.
It was delivered with B and E inverted.

I checked out and I found numbering where correct (on the schematics and Datasheet

But unfortunately the SOT-23 available on KiCAD has the B and E inverted … the 1 pin should be at the place of the 2 and vice versa … It should always be named 1 and E and the … just in the geometry must be inverted.

Application: KiCad Schematic Editor x64 on x64

Version: 7.0.2, release build

Libraries:
wxWidgets 3.2.2
FreeType 2.12.1
HarfBuzz 6.0.0
FontConfig 2.14.1
libcurl/7.88.1-DEV Schannel zlib/1.2.13

Platform: Windows 11 (build 22000), 64-bit edition, 64 bit, Little endian, wxMSW

Build Info:
Date: Apr 15 2023 19:18:27
wxWidgets: 3.2.2 (wchar_t,wx containers)
Boost: 1.81.0
OCC: 7.6.3
Curl: 7.88.1-DEV
ngspice: 40
Compiler: Visual C++ 1934 without C++ ABI

Build settings:
KICAD_SPICE=ON

Here it is: MMBT3904 :slight_smile:

2N3904 symbol uses the default TO-92 package, suggested symbol is derived from another transistor so SOT-23 comes as a default to match the pinout.

2N3904 check the first screenshot is Fairchild … and JLCPCB mounted them … (second screenshot … KEC … 2N3904 … not MMBT
I solved flipping them upside down and resoldering … now I just readapted the PCB and I created a custom Footprint.

HOwever I will be not the only one with this issue if not better specified or corrected.

I missed that little suffix at the end. Then i guess we also need a 2N3904S symbol…

Suggestions are welcomed, but i think we have most cases covered though…

I seem to recall there are also 2 pinouts for the TO-92. It’s a notorious transistor.

1 Like

I don’t understand the problem source. 2N3904 in SOT23 has connections as most of transistors at market. They only untypically numbered pins in their datasheet but it is only paper.
For me most typical transistor I use is:


and it has the same pinout.

For you is only paper. For the reality on field, there are 2 pinouts … Not only I showed it, but as I said: 5 PCBs were given with the pinout of FAIRCHILD and not the one of KiCAD. What should I say more? just what it’s into the library, is NOT sufficient to cover all the cases.

Indeed, but MOST cases are covered. I failed to see a suggestion that could help us though. I can suggest further to contribute missing symbols yourself. (same way all others got there)

( I really doubt that all cases can be covered by a relatively small team of volunteers. Manufacturers helped enough already. )

I already made the correct footprint. how can I send it and to be implemented ASAP?

P.S. you filed to see suggestions?
Well just

SOT-23_Nexperia_Onsemi
SOT-23_Most_Diffused

Because it’s so.

Been there once and no more!

SOT-23 comes with all possible permutations. Not only for transistors but also for diodes. Since then I always check the data sheet. Sometimes a board has 2 different sot-23 footprints, each with a different pin numbering.

1 Like

It is not the footprint that has the problem, it is the symbol and the pads that its pins are referencing.

I think the best way to solve this, would be to add one more symbol with the correct MPN and pin definitions.

The way to add stuff to the libraries is through the MergeRequest process on the gitlab repositories.

If you need help feel free to ask here or DM me for instructions.

i ALWAYS check the datasheet. And I used the one of the KEC. Unfortunately the KiCAD’s foot print is wrong :-/

If symbol was not compatible with footprint than I would expect information how both were chosen and why that they were not compatible.
I have KiCad V5 with KiCad libraries (V7 I have with my libraries and second PC is Win7 so KiCad V5). I have looked into V5 libraries and now I suppose I understand. There are many NPN symbols to chose from.
Fortunately transistor has only 3 pins. What would be if someone would like to have penthode symbol with all pin numbering combinatons :slight_smile:
But it is good that there are so many symbols. You see that there is a problem to be checked.

Each manufacturer can have its own pin numbering standard. The problem is to select compatible symbol and footprint.

I understand that you want transistor symbol with all pin combinations and SOT23 with all pin combinations. It makes 6 NPN transistor symbols and 6 SOT23 symbols. Then PNP, MOS, JFET, double diodes and even LDOs. Each with all possible combinations.
It will not solve the problem but only generate bigger mess.
Your transitor has pins:
C
B E
In KiCad V5 footprint libararies SOT23 has pins:
3
1 2
And from KiCad V5 symbol library transistor symbol Q_NPN_BEC can be used so KiCad covers 2N3904 case.
I don’t suppose this symbol disappeared from V7 library.

A picture you showed with both pin number and pin name in pads (I suppose it is while you select footprints for symbols what I have never done so I have never seen it) is to help you to check if everything is correct. In datasheet you have a photo with BEC identified so it is very easy to check with what KiCad shows (I remember people postulating it so it is probably since V6 or V7).
Now it looks that it is also not enough. What else KiCad can do?

Since I created the new part, yes … the issue is: from the moment parts are made till the moment they will be available, months can go by …

If you send me instructions I would provide the update foot-print

1 Like

Let’s rephrase

  • I needed 2N3904 and 06.

  • I went on JLCPCB and I found them.

  • I opened the Datasheet they have for each component (the KEC one in my screenshot) and I noticed the PIN displacement.

  • I chosen for the displacement into the schematics in KiCAD accordingly

  • In KiCAD there is only ONE type of SOT23 with the pins as they should be.

  • I chosen for it (also because - and moreover - it was exactly respecting the Datasheet)

  • I got the PCB manufactured

  • All the 2N3904/06 have Base and Emitter in the opposite direction.

  • Investigating, I got that KiCAD ahs the wrong foot print (compared with the datasheets)

  • Hence I’m here.

And of course I have made my SOT-23 with the correct pin-out.
But it doesn’t mean other ones have issues like mine and they fall down into the pit.

The best solution to this issue IMHO is, get people involved (somehow…). Everyone is free to do a review against KLC for any contribution.

What is 06?
Does it mean that it is transistor with B and E swapped?
I must be blind. I have read the thread once more and I can’t find that 06 nowhere.

I don’t understand.
I supposed that in your first post at right there are two pages from the same datasheet. Now I see they come from different datasheets. But in both datasheets transistor has the same pinout:
----C----
B-------E
(I see that in my previous semi pictures all spaces were reduced).

What is 06?

2N3904 and 2N3906 … for which KiCAD has the Schematics Symbol, but not th eSOT23 foot-print and the one assigned is not even existing:

yes it’s my description fault here … i’m sorry for that. i go to review to prevent more confusion is created.

The datasheet are correct the foot-print not

OK.
I have some transistors with the same name as the basic one (don’t remember it was 20+ years ago) but with addition of letter ‘R’ (for reverse). The transistor with ‘R’ is the same (electrically), but has B,E swapped.
I all the time supposed that you have got 2N3904 with B,E swapped.
And now supposed that may be it was marked by adding 06 at the end (I read ‘and’ as ‘end’).

I don’t know KiCad libraries. I supposed that you selected from ‘Devices’ library wrong NPN symbol or they assembled transistors with reversed B,E.
But all information till now showed me typical NPN pinout.
Now I suppose that there are in KiCad library 2N3904 symbol with wrongly numbered pins and it is the problem.
If so then 2N3904 symbol simply is to be corrected.

I suppose the symbol is wrong.
As manufacturer can select his way of pad numbering KiCad also can.
As Kicad decided to number pads one way it should use the same numbers in 2N3904 symbol even manufacturer used different numbering.