Close

Combine KiCad PCB Designs with 3D-Printed Parts in Blender

A project log for Nuclear radiation sensor with photodiode detector

Measuring radioactivity without need of Geiger tube.

robert-gawronRobert Gawron 10/05/2025 at 13:080 Comments

I tried to add a secondary PCB with a power supply and logic level converter into the device, but it is hard because there is not a lot of space inside, and I don't want to disassemble the device to drill any holes. My plan was to design a 3D-printed holder (yellow on the right on the image) for this new PCB, but how to make sure that everything will fit? I modeled all the components in Blender, and this post is about how I did it.

The tools I used are all open source:

All this could be done in FreeCAD directly and I tried this once for a different project in the past... never again: FreeCAD's user interface is just horrible. On the other hand, I'm quite pleased with how simple Blender is to use (at least for basic things). It looks like a pretty good software!

But back to the topic: the first thing is how to export the PCB from KiCad to Blender. Fortunately, there is a KiCad/Blender extension called pcb2blender that needs to be installed in both tools. The exported file needs to have the .pcb3d extension; otherwise, Blender fails to import it and the error message says nothing useful.

Now, for the 3D-printed part: I made it in OpenSCAD and then added fillets in FreeCAD. FreeCAD can export files to .STL, which Blender can then import. Although there is one caveat: scale. During the import in Blender, the scale of the .STL object needs to be set to 0.001. I don't know why.

The model of the metal enclosure for the device I found on the producer’s site, although it was in .STEP format, which Blender doesn't recognize. Fortunately, FreeCAD can import .STEP files and then export them to .STL, which works for Blender.

Now, when all the models are imported into Blender, it's time to arrange them in x, y, z and rotate them so they compose a real device. This could be done manually but would be very tedious; fortunately, Blender can be scripted in Python, and this way all objects can be correctly positioned. Just click the "Run" icon in Blender's scripting section, and it's all good. The script is in the project's repo too, it's just that it's not directly visible, but can be accessed via the "Scripting" tab in Blender once the Blender project is opened.

I think this approach of trying to model everything together, while it can be seen as overkill, really helped me to design the holder and the new PCB.

And that's it. Everything else was a repetitive cycle of checking clearances, adjusting the holder model, and trying different auxiliary PCB designs.

Discussions