Close

Working on the KiCad STM32 library

A project log for PD Buddy Dev

STM32 development board with USB Power Delivery

clara-hobbsClara Hobbs 02/07/2018 at 15:067 Comments

Or rather, libraries, when I'm through with them.

I was starting to work on the schematic for PD Buddy Dev, and found that KiCad's symbol for the microcontroller I want to use is about as wide as a sheet of letter paper.  Um.

Seriously, it's ridiculous.

As it turns out, the KiCad library team is aware of this problem and has an open bug on their tracker about it.  So I've been working on the Python script that generates KiCad's STM32 library to make it create better symbols, and to make it internally less messy.  In the process, I'm splitting the library into separate libraries for each family of STM32 microcontrollers, because the single library is way too big (KLC says no library can have more than 250 parts).  When I'm done, I'll send this to be included in the new library for KiCad 5, which I plan to start using for this project as soon as the first RC comes out.

Discussions

AVR wrote 02/07/2018 at 18:55 point

I make all my own components from scratch most of the time. 

  Are you sure? yes | no

Clara Hobbs wrote 02/07/2018 at 20:08 point

Even resistors?  That would take some dedication.

I only make my own components if they're not already in the standard library, and then I usually contribute them upstream unless they're really weird.  To each their own, I suppose!

  Are you sure? yes | no

K.C. Lee wrote 02/07/2018 at 17:01 point

Prepackaged symbols are rarely useful as they try to please everyone (or no one).  I would use just the port names for symbols.  The nets name could be used to show the actual special I/O functions you are using them for.  

I also like to split up large symbols into much smaller blocks so that they can span multiple schematic pages if needed and be with the rest of the circuits they are connected to.  I would rather do that than trying to keep track off page nets.

  Are you sure? yes | no

Clara Hobbs wrote 02/07/2018 at 20:06 point

As someone who has made quite a few contributions to the KiCad library, I take issue with the idea that "Prepackages symbols are rarely useful".  Especially lately, the standard library has been increasing in quality and growing in scope immensely.  Problems like the one I'm showing here are reported and fixed.  One major benefit of standard libraries is that they've been looked at by many eyes, and are thus less likely to have serious problems like incorrect pin mapping than symbols created for just one project.  And if such problems do manage to creep past the review process, fixing them helps more people than oneself.

But yes, the new symbols will just use the port names for the pins.  As for splitting up large microcontroller symbols into multiple units, well, that's a whole other discussion that the library team really ought to have at some point.

  Are you sure? yes | no

K.C. Lee wrote 02/08/2018 at 23:49 point

Can't speak for KiCAD as I use EagleCAD.  I have been burnt a few times using freely available "Open" symbols and footprints.  

Footprints are also my concerns as sometimes I have very different design rules for different projects. e.g. toner transfer vs ultra cheap Chinese PCB vs higher quality OSH Park etc. They are done differently as they are limited by process and I have different trade-offs mostly cost vs density.  

One size fit all do not work for me.  I would rather make and pay for my own mistakes.  Thanks, but no thanks.

  Are you sure? yes | no

Ted Yapo wrote 02/09/2018 at 00:04 point

I'll second @K.C. Lee 's opinion.  I have also been burned by the components bundled with Eagle - like mirror footprints someone must have created from a bottom view.  And yes, I even make them for resistors, but generally only once - the 0603 resistor I made last year is still good today.  Then, I'm also free to bundle a library of all the components with designs for release under any license I choose.

  Are you sure? yes | no

davedarko wrote 02/07/2018 at 16:07 point

Yeah that definitely looks unusable :D

  Are you sure? yes | no