D1 is now a B140, which is a MacroFab house part. It's actually a bit
more expensive from distributors than the SS14FL, but the lack of a
labor charge makes it quite a bit cheaper for PCBA. It's also larger,
so in order to fit the new part, I moved it between Q2 and J1. This is
possible because…
Q2 is now a DMP3017SFG. This is a cheaper, smaller, and less
over-specified MOSFET which should be fine for the job of controlling
the PD Buddy Sink's output. It uses a proprietary Diodes Inc. package
whose footprint I contributed to KiCad's library. Because the new
MOSFET is so much smaller than the old one, I was able to fit it close
to the board edge where R9 used to be.
The whole output circuit has been rearranged, and I like its layout a
lot more now. Also, the new position of D1 allowed me to move a bunch
of reference designators closer to their footprints, which is nice.
It used to be an MMBT2222, now it's an MMBT3904. The new transistor is
slightly lower-spec'd, but is still more than plenty for this
application. Also, it's a MacroFab house part, so the boards will be
even cheaper to manufacture.
Assuming I'm going to keep ordering boards from MacroFab, it makes sense
to use their house parts as much as possible. Therefore, the next
boards will use a C&K PTS810 as the Setup switch instead of an Alps
SKQG. In addition to saving money, this change allows room for larger
"Setup" and "GND" labels.
With the VBUS symbol merged into the KiCad library, I no longer need to
use my own. This commit changes the schematic to use the standard VBUS
symbol rather than a custom one.
This is a major change! Almost all the components have changed to
smaller versions, with 0603 and 0402 passives and a QFN microcontroller.
The board now has four layers, with internal layers used for VBUS and
GND. The board now measures a mere 25×30 mm! The SWD header and Boot
switch footprints have been moved to the bottom to help with this
shrinkage. Two test points were added to the bottom as well to make it
possible to power the board without using the USB connector. The
mounting holes are now slightly smaller (better sized for M3), and only
17 mm apart instead of the old 18 mm.
To sum up, everything is smaller and that's almost entirely a good
thing, except now it's not really possible to build one by hand.
As it was, it wasted around 85 mW whenever the output was turned on at
20 V. That's a silly waste of power. A 100 kΩ pullup works just fine,
so I changed it. Now there's only 4 mW wasted, so I'm happy.
It's a USB Type-C connector just like the one used in v0.1 and v0.2, but
with only SMT pins (except the fixing pins, of course). They're
slightly cheaper and probably nicer for automated assembly, but
impossible to hand-solder. That's okay though: where we're going, we
don't need hand-solderability.
Since it really seems like a good idea to include the flyback diode by
default, I decided to change it to a surface mount device. After that,
I noticed that it would be easy to shave another 0.5 mm off the end of
the PCB, so I did.
Now there's a filled zone connecting the MOSFET output to the connector,
and the + side of the output is close to the MOSFET. Both connector
leads have no thermal relief, for minimum resistance.
0 Ω resistors are cheap, and switches are expensive. It would be nice
to be able to save the price of a switch, since it's not really
necessary anyway. I can program these by SWD, after all.
I added a 0 Ω resistor, R11, to pull the BOOT pin to ground in lieu of
having SW1 installed to do the same job.
Boy, I'm good at messing up transistors! This time it was just the pin
numbers for the collector and emitter reversed, because I didn't copy
the symbol from the datasheet but rather assumed another SMT 2222 would
have the same pinout. Interestingly, it actually was able to control
the MOSFET at VBUS = 5 V and at VBUS = 9 V, but at VBUS = 15 V the
reversed transistor couldn't pull the MOSFET gate down enough.
I had the source and drain reversed—whoops. After fixing it with an
X-Acto knife and some point-to-point wiring, I've updated the schematic
and PCB files accordingly.
THIS ALSO MARKS THE BEGINNING OF DEVELOPMENT OF THE NEXT BOARD REVISION.