232 points · by sschueller · 3y ago · 65 comments
I had it set up as a CI job for a while, but I ended up disabling it for a few reasons, the main one being that I just don't think it's a good idea to constantly create build artifacts for circuit board designs. It has created problems when people have circulated intermediate schematics generated by CI that don't match the hardware we built.
You really only need to archive fab packages (by which I mean schematic, gerbers, BOM, assembly drawing, fab notes, etc) at the points in time where you fab and assemble a board.
Creating more artifacts just creates the possibility for more noise. It's not like software CI as there's not really a way to automate hardware testing in a CI server. Very little incremental value in continuous artifact generation as a result.
and only upload gerber zips as release artifacts
I do keep a bom.csv in the repo to link right in the readme. I consider the specific part selection part of the reference not entirely documented in the sch, and so it's source.
Same for .stl and other output meshes from openscad and freecad sources.
Which is kind of a pity because github has a neat stl diff viewr that's essentially useless if you don't want to check in stls.
Is it hardware testing at the simulation/emulation level as a "digital twin" or hardware as testing as in hardware-in-the-loop (HLL)?
This, very likely.
It's possible to set up simulations of certain sections of the hardware using some Spice software, but it's quite time consuming and I'm not sure if anyone's built a way to compare the output of the simulation to expected output.
Simulating any entire circuit as a whole is impossible, since lots of parts just cannot be simulated.
Still, this heavily sped up prototyping, as anybody could always fetch the data required to release or produce stuff. Shifting left works for electronics just as well as it does for software. :)
v6 has been very stable for me.
Early v7 builds were a crap shoot. I may try again later this year but I'm really happy with v6 for now.
However, it was not uncommon. I always had a debug build of KiCad on my machine in order to replicate crashes or odd behavior others saw.
It should be noted that we're generally talking about PCBs that could get pretty big and complicated. We certainly uncovered edge cases that were hard to foresee that way.
I haven't used any of them though. I don't think you need them unless you're doing really pro stuff (e.g. a PCIe card or motherboard) or RF design.
On the free side they mostly suck. KiCad is powerful but has AWFUL usability. Don't bother unless you're willing to fight the software and spend hours on tutorials for things that should be trivial. Think early Blender but worse.
The other free options are:
* Eagle: Terrible. Do not bother. No idea why anyone uses this. Doesn't even get copy and paste right.
* gEDA: Awful. Do not use.
* DesignSpark PCB. This is very Windows 95 and a bit odd in some ways, but it's probably the easiest to use software and it's not limited like some free software (frequently there are board size or component count limits). Very decent option. If you're new to PCB design and use Windows I think I would maybe recommend this. Either this or...
* Horizon EDA: A new option that uses the KiCad routing engine but is way more usable. I would say this is the best free option at the moment, and it's open source. Except maybe LibrePCB because...
* LibrePCB: I haven't actually gotten around to trying this yet so I have no idea. May be good, may be awful.
Kicad is on a good track to become as capable as Altium, if we judge over the last 3-4 years of the progress. I made it a habit to give them money annually via the Donate button on their front page: https://www.kicad.org.
IMO other tools mostly excel at special tasks. Be it having a good component library, or less rocky integration with external tools, for example for FPGA/ASIC configuration or layout, so the stuff that is heavily driven by commercial interest in increasing an engineer's speed or lowering defect rate.
(Disclaimer: Haven't been doing electronics for two years, though, as I switched to Software.)
However, this is a small subset of the actual list. Chances are, there's many companies working with proprietary PCB designers that were discontinued 20 years ago or just maintained for a few companies.
And then we ourselves got acquired by a company that could afford Altium.
Last I used KiCad for much (ca 2018), I found the workflow to be kind of clunky so I never expended much effort to get really good with it. For instance, their footprint assignment scheme caused so many errors because you couldn't, at that time, assign footprints to a given part in the component editor. Thus, you could spend a lot of time getting the footprint just so, then not notice you fat fingered the footprint assignment unless you did the old trick of printing out your solder mask and hand populating your board.
But whatever KiCad's current flaws, its not Fritzing, so that helps.
I've been looking at upstreaming what I can and what would even make sense. Ultimately I've switched to mostly using non-KiCad python (dealing with the messy nature of the bundled python wasted 3 solid days, don't use it unless you must) to generate and manage a parts DB + vector drawings that are then processed into the KiCad formats.
It works, but a lot of KiCad internals were simply never designed to handle this scenario. Even multiple PCBs are a pain. It uses multiple proprietary vector representations, some for rendering and some for analysis, etc. The file formats themselves are ok to deal with but aren't well-specified so they will change on you.
Fortunately, the end Gerbers are well defined and it's often easier to simply generate those directly vs going through KiCad if the DRC are guaranteed by construction to never be violated
Does anybody know something like a translator tool between all the different `yaml`s different CI/CD services use? Or maybe some metalanguage specifically made for that that can run instead of whatever hell dash/bash is.
I wish I could just jump ships altering a `script` tag in whatever `yaml` from whichever service.
The render on my page is however a bit more work. I graft textures over the parts and set material properties such as reflections. I will do a write up on it when I get a chance.
Snapeda and componentsearchengine are also getting better.
One thing that makes me wonder all the time are CI/CD runs that commit back to the repository. That feels weird for some reason I cannot articulate very well yet, but makes me think there should be a better way. Especially if the results are artefacts like that. Any experience by others to weigh in?
It allows for a build that is closer to the vanilla KiCad GUI experience and can be built locally with the normal install using ‘make’ - something I wanted.
Awesome job.
Can you make a base gitlab project so anyone can fork it easily when anyone wants to create a new project?
Kibot is really long on functionality - the maintainer is someone in South America who does a pretty incredible job of maintaining it and integrating commonly used plug-ins.
The one thing it really lacks is a comprehensive starting example of how to use it and structure a YAML file.
This would be a great example.
Do you have any write ups on the blender rendering and animation? If that could be automated I know a lot of people who would love to use it.