3D Formats - 3D Printing fun with KiCAD/FreeCAD + EE101 type KiCAD intro

I read an article about different 3D formats and it occurred to me, can I take a simple project I created for learning KiCAD and print the PCB on a 3D printer. This exercise was interesting enough that I thought I’d share. Hopefully this will provide a clear enough roadmap for anyone else trying to figure these things out.

Step 1: Schematic

This is a simple schematic for a 50% duty cycle astable multivibrator. I wanted the simplest circuit for exploring SPICE modeling in KiCAD. Q1 represents SPICE parametric device modeling, and U1 for more complex SPICE subcircuit modeling of the 555 timer.

Test Points of some type are typical for DFM and prototyping.

Step 2: PCB

I initially did this layout by hand which is very easy for a circuit this size. But I ripped it up to try FreeRouting, an auto-router for KiCAD. The results were marginal, but this circuit is simple enough that I was able to clean it up and complete it by hand. I guess it was impressive that the auto-router worked at all. I was looking for an auto-router with a performance level similar to Eagle’s auto-router. FreeRouting isn’t there yet, but promising enough to deserve support. I was hoping to auto-route a single sided board for a milled PCB.

Step 3: Export PCB to VRML

I wanted to use STEP for this format step. My 3D printer won’t read STEP files, it needs the much simpler STL format. FreeCAD will import both STEP and older VRML formatted files. Windows 10 “Print 3D” can read VRML, but not STEP. For now VRML is more useful, but STEP is the future. I also exported a STEP file for archival and testing import to FreeCAD. Notice the plated through holes and topside copper information contained in the VRML file.

Output VRML file: https://arno.com/KiCAD/555.wrl
Output STEP file: https://arno.com/KiCAD/555.step

Step 4: Import 3D VRML model to FreeCAD

This step looked and behaved the same using either STEP or VRML source files. Both were missing top side copper image and labeling. Like I said, what made the decision for me was Windows 10 Print 3D ability to render VRML. This step is necessary to convert either VRML or STEP intermediate files to STL for 3D printing.

Step 5: FreeCAD export 3D model to STL

Notice we’re now missing color information. STL is a “geometry only” 3D format. it isn’t capable of providing color. That’s okay because most of today’s 3D printers also don’t print in color. If you need color, use STEP or the older VRML format.

Step 6: Print STL on 3D printer
The smaller print is a 1:1 scale. The problem with this size is the printer can’t print really fine detail, like vertical 1-pin test points. Some of the parts broke off just with gentle handling (notice the TO-220 transistor is missing). This print took 33 minutes.

So I tried printing at 300% size. This might be too big and next time I’ll try 200% scale. This print took over 6 hours.

2 Likes

Thank you for sharing this! Maybe you’ll be able to export the tracks also to FreeCAD (using the StepUp plugin is possible), then you can extrude them a bit (0.1mm or maybe a bit more) and then you print will have also the tracks drawn on it (just eye candy, but cool eye candy).

2 Likes

Good idea!

I added links to Step 3 for STEP/VRML files used for this write up if anyone wants to take a crack at this idea.

I tracked down FreeCAD “StepUp” to Suggested FreeCAD environment for StepUP I’ll take a look to see how these tools might help what I’m doing. Thanks for the tip.

Lovely. Great effort.
It had not occurred to me, but I’m thinking it could be useful during the mechanical prototype stage.

1 Like

I have noticed in the 3D view of KiCad that for some reason there’s some small gap between the board and the SMD components. I don’t know why – maybe it’s empty room for the solder? I have wondered how does it behave in 3D printing. The same goes of course for THT component feet - they don’t touch the board. That may be one reason for breaking.

I wonder if it would be possible in the export phase (or in FreeCAD/StepUp) to fill those spaces automatically with “solder paste”.

If you import the board in FC with StepUp, no gap should be among components and pcb.
Both the importer and the 3D library has been designed to avoid gaps.
So exporting from FC using StepUp as importer should be just fine for your 3D printing.

4 Likes

I honestly don’t know if the routing algorithms in FreeRouting will ever get updates. The guy who originally wrote it (and knew something of the black magic that is autorouting) abandoned the project over legal issues over the IP behind the algorithms. The only updating that I’m aware of is just to keep the code up to date as the Java language (and the JVM that runs the code) evolves. I could be wrong though…

1 Like

Thanks for the tip. I looked a little more and it looks like some are using TopoR with KiCAD. Now I have something else to investigate with my simple example. Comparison of TopoR, DipTrace, Electra, and miho/FreeRouting

I tried Topo Route Lite. As near as I can tell it finished routing in under a second after I moved one component to make routing possible. I say “as near as I can tell” because TopoR never seems to finish. I interrupted the autoroute and exported this layout back into KiCAD. DRC noticed one violation from my moving the GND Test Point. Once I took care of this with a move and re-pour, the board is complete; no unconnected pins, no violations of design rules. Notice the GND wire is heavier than the rest. This is because in KiCAD I made the GND net heavier for power connection to see if KiCAD and the AutoRouter would honor this design requirement. Both did, and in a real design the same should be considered for VDD/PWR Net. Back to RTFM, but I can report TopoR did work.

Could this be that it has some settings to adjust the level of optimization and it was just still trying because ‘perfection’ hadn’t been obtained yet?

Don’t know other than a TopoR message which says, “Autorouting will continue until stopped”

EDIT: I let it run and it did “complete” in about 230 minutes. I’m not sure what it was doing as it seemed from appearances to be trying the same design over and over. The result when it did stop looked good to me from an “engineering performance” perspective. I say this because I know there are a lot of PCB “artists” out there who might take issue with the resulting design appearance. For these, there are always semi-manual or totally manual layout approaches to make it look more appealing. I’ve had too many managers who like to manage with a “schedule gun” pointed to your head which means forget pretty, just make it work right, quickly.