Category Archives: electronics

How to rotate KiCad footprints

I did some reading recently on design for manufacture (in particular, https://rheingoldheavy.com/design-assembly-kicad/), and one of the things that came up was that you should have your component footprints oriented the same way as they’re loaded into the tape that gets loaded into the pick-and-place machine. Many KiCad footprints (including those that ship with KiCad) aren’t oriented this way, and even in the new KiCad 5, I don’t see an easy way to rotate an entire footprint. You can rotate a footprint inside a PCB design, but unless I’m missing something, there’s no option within the footprint editor to take all the elements within and rotate them (let alone an option to rotate an individual element, as far as I can see).

I’ve come up with this:

https://gitlab.com/salfter/kicad-footprint-rotator/

This sed script takes a KiCad footprint and rotates it 90° counterclockwise by transforming coordinates, dimensions, and rotation angles within. If you need to rotate 180°, run your footprint through the script twice. To rotate 90° clockwise, run it through three times.

Here’s what KiCad’s SOD-323 footprint looks like as it’s rotated through 360°:

the original footprint

rotated 90°

rotated 180°

rotated 270°…this is probably how it’s loaded into the tape

rotated 360°…back where we started

I’ve tested it on a few footprints that use different types of elements, and I think it’s working properly. That said, it’d be prudent to verify that the rotated footprint is correct before you whack it into your next project. If you run across a footprint that it screws up, I would be interested in seeing it.

Parts for the reflow controller are on the way

Here’s my next project:

It’s basically a mashup of the Rocket Scream reflow oven controller shield with an Arduino Leonardo, crammed into as small a board as possible (only 2″x2.5″) so it can be installed inside nearly any toaster oven. I fired off a parts order just a few minutes ago. While the board design is ready, I like to have the parts in hand so I can verify against a printout of the board design that they’ll fit. I’ve ordered boards made before, only to find out that the parts intended to go on them wouldn’t fit.

Beyond the board and parts, the only other components I’ll still need to get are a solid-state relay (and heatsink) and a thermocouple. I think I’ll stash an iPhone charger inside to power the controller board, as I have several of them kicking around here. I already have the toaster oven…picked up one of these, as others have had success with it in their builds. It’s cheap and heats up quickly.