Compare many KiCad projects by UUIDs?

@johnbeard Maybe edit your comment? No need to give lazy students nefarious idea’s.

I don’t really agree with this. I started with KiCad over 10 years ago, and during evaluation I made my first PCB in KiCad in the first afternoon I Installed KiCad. Back then KiCad had a lot more “missing features”, faults and gaps in it’s capabilities. And the “Getting started in KiCad” was enough back then (KiCad V3 or so, even version numbers were a bit vague back then) to get an idea of the workflow in KiCad and avoid the biggest pitfalls. Also see this other thread: [feedback] My first PCB. Felt pretty easy... what am i missing? - #11 by Piotr A beginner, first project, (probably) did not read much of the manual, was apprehensive to start, but still quite liked his KiCad experience.

For your course:
I understand Git is a bit of a sidetrack. But IMHO KiCad should just be a vehicle, and not the main part of the course. Things like signal integrity and EMC considerations. How to get routing done on a 2 layer PCB while keeping it compact is a puzzle on it’s own, but these days 4 layer PCB’s are getting pretty common. Prices are reasonable, (especially in bigger production runs, the cost difference is manageable). 4-layers also make it much easier to be on the safe side of EMC regulations, and it saves a lot of design time. Two factors that can drive up costs significantly.

Rick Hartley (from altium) has made a 2hour and 10 minute video about the importance and use of GND planes. It’s a very good video with a lot of background info. I think I saw it two, maybe 3 times myself.

No question about that, KiCad v8/9 is light-years ahead of what v4 used to be. It already surpasses some commercial packages (coughOrcadcoughPADS) when it comes to user interface and general usability. But the fact is, Eagle “just works”. You can concentrate on actual design, with no worries about proper symbol/footprint matching, net name conflicts, never-ending manual syncing and other headaches. Sure, Eagle is dated and has its own quirks too, but for total beginners, there was no better option. Its name is acroym for Easily Applicable Graphical Layout Editor and it actually did live up to it. Every year, me and my colleagues used to sat down and mull about other PCB EDAs. But at the end of the day, Eagle had alway won because it’s clean, simple and easy to use. That’s why it became so popular among european hobby community back in early 2000s. But, desktop Eagle is going to die in 2026. In fact, it’s already been dead for the last 4 years. And KiCad is the best (desktop) alternative there is.

During the course, I actually force the students to do a single-layer layer board first, so they would understand the importance of proper component arrangement. Because that’s the most important part of PCB layout, especially on SMD boards. Only then I move to 2 and more layers. Unfortunately, even official KiCad tutorials are as bad as the project you’ve linked - trivial boards that unnecessarily use 2 or more copper layers and super-thin traces. Cringey stuff, even if 2-layer PCBs cost next to nothing these days. Sadly, prevalence of similar “examples” online makes it harder to explain that such ineffective board design has other disadvatages, too. Oh well.

Anyway, the course already devotes 2 hours to grounding and another 2 hours to EMI/RFI prevention. And there is a different course about EMC testing. But as you can imagine, it’s not very popular…

Students generally aren’t smart enough to hide their plagiarism very well. Those who are smart enough are also smart enough to do their own work.

A couple of years ago I did some random searches for some keywords I used in my blog. I discovered a graduate student at a large US university had lifted two long paragraphs from one of my blog entries and inserted them into his project report verbatim as if they were his own work. I wrote to his college, saying that while I was tickled that someone had found my musings helpful, I expected these paragraphs to be formatted as a citation with proper attribution. I also pointed out that this sort of thing could have been a career-ending event, had it been a significant published paper rather than a rather mundane project. I received a very apologetic reply from his supervising professor, and a later check showed that the report had indeed been corrected with a proper citation.

I only wish I’d been in the room when the professor met with his student. :open_mouth:

4 Likes

Good to read :slight_smile:
These days, there is no price difference at all for single or dual layer PCB’s in the “pooling services”. Single layer PCB’s still exist, but it’s mostly mass produced FR2 such as SMPS power supplies, and cheap consumer stuff. I understand encouraging the students to learn routing on a single layer, but in these modern times, it makes more sense to me to have one continuous GND plane on the back layer, and do all footprint placement and the routing on the front.

When I was evaluating a new PCB program, I tried eagle too, and I found it horrible. I was used to older programs having separate symbols and footprints, and I could not get the hang of how the concept of “parts” worked in eagle. My motivation for learning eagle was also quite low, because it was not an open source project. My guess of it’s popularity back then was that it was “free” and “usable”. That’s a good enough combination for a lot of hobbyists, but I was also already frowning my brows about the board size and layer limits. So I never looked back after evaluating KiCad a week later.

Eagle libraries are one of the main reasons why it’s so easy for total beginners. You don’t have to deal with (extremely error-prone) footprint assignment every single time, because someone else already did that for you. And there is another huge advantage: imagine you have a MCU with 200+ pins that comes in TQFP and BGA package. In KiCad, you have to create 2 symbols with totally different pin numbering. In Eagle, you draw the symbol only once and then create different pin-pad mapping for each package (they call it “Device”). You can also map multiple pads to one pin. AFAIK Eagle and Diptrace are the only EDAs that handle this mapping in sane and efficient manner, all others need to resort to various clunky and error-prone workarounds. Unlike KiCad, Eagle won’t even allow you to switch to a footprint that would result in wrong pin-pad mapping. That’s a big plus for beginners. Sadly, Eagle libraries are getting quite dated now, even though Autodesk made deals to include libraries from Beaglebone and other popular projects.

Granted, most EDAs tout the “footprint assignment freedom and library reusability” mantra. But in reality, if you did the assignment blindly, vast majority of them would be wrong. Even I get it wrong sometimes. As for the reusability, KiCad libraries already contain hundreds of identical footprints just with different names, so that footprint filters can work. Because as it turns out, the “total assignment freedom” is simply too cumbersome to work with. I still vividly remember the nightmare from earlier Orcad and KiCad releases, when a list with thousands of footprints popped at me and I had to manually choose the right one. Thankfully, KiCad librarians spent an eternity to make the footprint filters work, so we don’t have to deal with that.

When I was evaluating my new to be EDA suite (during switch from Windoze to Linux), one of the mayor things for me is how easy it is to create new symbols and footprints, because there are always parts that are not yet in libraries. For me, an extra layer of indirection is just needles complexity and annoying. eagle is not “better” (or worse") in this regard. It’s just different. Different people think in different ways. But to be fair to eagle, I never got far enough to figure out exactly how that indirection layer works. The way KiCad works is much closer to what I expect and appreciate. If I had spend more time with eagle, I may have gotten used to the way it works. And that is also an important issue. When you get to know software better, you learn to appreciate it’s strengths, and live with it’s (perceived) weaknesses and workarounds. After a few years you can even get to the point that you forgot what the workarounds are. You’re just grown used to how it works. That is also one of the reasons that it’s difficult for people who have used a software package for a long time to write a “getting started” manual. Such manuals are (probably) best written by people who started recently and struggled though the quirks and discovered the workarounds so it’s all fresh in their memory.

I don’t think hiding trivial, and it is trivial, information is the solution. If that’s what a system hinges on, it is misguided at best. You may detect the unlucky few that copied files wholesale, but it is blind to those who figure out or luck into the “trick” of changing UUIDs. sed is just one option: g/awk, grep, Python, Bash, Perl, PowerShell, etc., not to mention good old copy-paste, will all work.

The solution is not to misuse technical implementation details to produce a fundamentally unsound detection system because it seems like a nifty trick at first glance. That is simply not good engineering and worse pedagogy. Specifically, it’s most unfair on the good students being lumped in with plagiarists who by luck or insight go undetected.

Even without formal version control (which I maintain is a core concept that should be being taught early on by any institution that claims to educate competent engineers in 2025), the traditional solution hasn’t ever stopped being highly effective and useful for far more than plagiarism detection: notes, diagrams and screenshots on the development of the project in a log book. Faking a log book retrospectively is an incredible amount of effort, and basically impossible to do for practical benefit if you stamp the pages or otherwise checkpoint the document (i.e. it’s another kind of version control)

Unfortunately, even official KiCad tutorials are as bad as the project you’ve linked - trivial boards that unnecessarily use 2 or more copper layers and super-thin traces. Cringey stuff

KiCad documentation is open for merge requests for the track width. Remember that the example is designed to show how to flip component side, so it naturally has things on both sides. It’s a tutorial on KiCad usage basics, not a tutorial on designing a good board for an specific application with specific constraints like “single-sided placement for once-through placement and reflow”.

As for the reusability, KiCad libraries already contain hundreds of identical footprints just with different names, so that footprint filters can work.

KiCad specifically does not require duplicating footprints by decoupling symbols and footprints. the libraries sometimes get a few duplicates because a manufacturer called a TQFP a VQFP and we didn’t notice we already had a compatible part. And sometimes we have footprints that differ only in 3D model and description (something I’d like to eventually change). We also have some variants of footprints to allow users to select better alternatives for their applications (long pads, handsoldering, without thermal vias, etc). But we don’t generally keep straight duplicates for filter convenience.

That is a weak point in KiCad in my opinnion too. If I place a transistor in schematics, I don’t care if it is BCE/GDS or whatever. I’ll decide that later when assigning a specific type. KiCad forces you to make that assignment in an (too) early stage. OTOH, I had my problems with the pin assignment in EAGLE when I started with it.
The reason why I used EAGLE was initially just because there was a free version. Later on, I used EAGLE at work (paid version), but I never liked the UI. For me, it was as odd as LTSpice still is to me. For me, it is “the wrong way round”. While using EAGLE at work, I watched KiCad and then, when I saw a video how shuffling works, I tried KiCad for a simple private project and was convinced. Used KiCad at work for a small 4 layer board and after that quit using EAGLE. I think that was KiCad version 5.
You don’t spend most of the time assigning footprints. You spend most of the time drawing a schematic and for making the layout. All my fault. You just have to be aware of the possible pitfalls.
And yes, I tripple check my double checks for footprints. And it went wrong in KiCad and EAGLE.

Anyhow, what is your criteria for detecting a plagiat? In schematics? In layout?
In schematics, it might be the netlist and values (resistors, caps, type of transistors). In layout placement and how the routing maze was solved.
Netlists should be easy to compare.

Placement gets more fuzzy as components might have been moved a bit. Criteria might be the geographical relation (X/Y distance) between parts with some allowance in distance (like +/- 10%).

If I place a transistor in schematics, I don’t care if it is BCE/GDS or whatever.

FYI, you can use Device:Q_NPN (say) for this. There are many “generic” devices in the Device library that don’t have pin assignments. In fact, we have recently started moving many devices with pin assignments out of the Device library into Transistor_FET/BJT etc.

Sure, it is trivial, and it won’t help against the nefarious. But student plagiarism is usually done by the lazy students. Those probably don’t even know KiCad has UUID’s in their files without (accidentally) reading a thread like this.

Thanks for the heads up! Next time, I’ll look better.
Just checked …
The problem (by design) of KiCad is, that there are no symbolic pin names. IIRC, in EAGLE, you had the symbolic names B C E and later in the design process, when you selected a specific transistor, you made the assignment to pin numbers (automagically with the translation table).
OTOH, if you look at µCs, pins do have multiple functions like GPIO, USART, ADC for a single pin. Now what name do you choose? You’d have to make a translation table that maps ADC to pin 1, USART to pin 1, … etc. But that only works until the µC offers pin remapping. So for example TX1 could be assigned to a set of pins (pick only one) but just once.

Oh well! Maybe the way KiCad does it is better in the long run. And only annoying at a first glance.

This is supported by KiCad, although the necessary information is not present for all microcontrollers. All STM32 seem to be good in this regard (I guess the symbols are generated from a script). To change the pin name:

  1. Place an STM32 IC on a schematic.
  2. Edit it’s properties by hovering over it and press e.
  3. Go to the Pin Functions tab page.
  4. Choose one of the available names from the Alternate Assignment column. I changed PA6 to an ADC input, and PB1 apparently has 4 alternative assignments available.

I don’t know of any plans to do this, but maybe someday someone will write a script to read these alternative pins directly from external sources such as STM32Cube.


In my first trial with eagle, I wanted to draw a simple schematic, without even having the intention of making a PCB. I happened to have a 0.2 Ohm shunt resistor, and I could not put such a resistor on the schematic in eagle. You could not type in a value for a resistor!
When I’m brainstorming an Idea, I don’t want to be bothered with details that are probably not ever relevant. It distracts and destroys the flow of the creative process. And sure, having to verify pin mapping between symbols and footprints is also not ideal, but you only do it when it’s needed, and after some time any sensible person would build up a personal library of verified parts. In bigger companies it’s even common to have people dedicated to maintaining libraries and verifying their integrity. (That’s also where KiCad’s database connection is invaluable to a lot of people. I don’t know if eagle has anything comparable to that.)

Dammit. I have the feeling I need some update by reading the manuals.
Thanks for the education!

But student plagiarism is usually done by the lazy students

In my experience, the dishonest ones were quite often very motivated and organised: the promise of a lucrative job involving nice offices in skyscrapers plus not having to pay back the student loan if you get a first is a powerful motivator for some to leave nothing to chance. Assuming your cheats are also always stupid and/or lazy is naive and results in an institutional addiction to designing (and/or buying) “clever” technological solutions to social problems that net a few egregious cases with minimal effort, while the more organised cheaters skate off with first class degrees to live out their days in finance. Of course catching them all would have been brutal on the departmental budgets: actually looking at our log books more often than once in a blue moon would probably have dispelled too much plausible deniability to have been a good idea. Plus someone would need to get to know the undergrads (ew).

(Seems I might be carrying some baggage here about the ol’ degree, hey?)

1 Like

Back to the original topic. Since @johnbeard already let the cat out of the bag with the UUIDs, I might as well go all the way. I cobbled together a script that can detect similar KiCad projects based on UUIDs. It also sorts the results, with most hits at the top. I know I’ll probably get flak for this, but it’s in… Windows PowerShell. To my surprise, WPS can process regular expressions, so the script doesn’t need Grep or other external programs anymore. You can get it here:

It’s not very polished, but like I said earlier, I need it only once per year.
I also added the link to OP.

More like “let a stray cat out of section of pavement”. It was never meaningfully contained in the first place, and could have left at any time.

The tool is also misleadingly named: it is a “project similarity detector” only in very specific circumstances. It is at most “template usage or file-level copy-paste and subsequent non-modification detector”.

If it ever comes down to detect a copy in an academic context with a UUID, this is like hitting an RTOS stack overflow hook in production code: it stochastically indicates that something is horribly wrong and all other system design and checks have failed on you. The questions you should really be asking if this ever pops up and you didn’t already have student solidly in your crosshairs: “how did I miss that?!” and “if i missed that what else am I missing?” and “are my honest students being done over by the
competent cheats?”. In the case of my degree, respectively: “apathy and I suspect active disinclination to look too hard”, “multiple extensive cartels of work-sharing” and “more than a little”. The one place where the cheating was far less impactful was the labs where log books and in-person Q&A sessions were highly effective, and, in retrospect, also very useful to me as a student. Probably is was no coincidence that the lab-based lecturers took a far greater interest in their students and their work as it was done.

There are conceptually quite easy ways to make cheating almost impossible. They usually require more and ongoing effort to implement, of course. IMO a lot of modern problems can be explained by technologists succumbing to the siren song of attempting to automate management of human issues.

Huh, those are some early adulthood traumas right there…

But really, what do you expect me to say? Cheaters do prosper, be it in academia, sports (doping) or bussiness (insider trading). In fact, insider trading is just an extension of your “cartels of work-sharing”. Some people simply know how to game the system, it has always been like that. Except today, nobody cares despite mountains of publicly available evidence, because people in the so-called regulatory bodies are part of the cartel now. And the rest are trapped in their little bubbles of anti-social platforms etc.

As for the “disinclination to look too hard”, that has became the official policy here in Europe. In 2010, the Europen Council decided that 40% of EU citizens should have college or similar education. To quote them exactly:

improving education levels, in particular by aiming to reduce school drop-out rates to less than 10% and by increasing the share of 30-34 years old having completed tertiary or equivalent education to at least 40%

Obviously, 40% of the population doesn’t have mental capacity to finish college, but that doesn’t concern the Euro-soviets. The Brussels Politburo has set a quota and we have to fulfill it, consequences be damned. Needless to say, the end result has been the exact opposite and the quality of students dropped significantly. In fact, I personally knew 4 colleagues who gradually become so disillusioned they left because of it. And I’m sure there were many, many more from other faculties and departments.

Simply put, we’re no MIT or ETH Zurich here. About half the students had never heard of “TO-220 package” or “plated hole” before. In fact, most of them never held a bare PCB in their hand before, yet are suddenly expected to design one.

In any case, at least I still try to catch the most obvious cheaters. In the past, I used to give unique PCB project to each student, but their difficulty varied and that was unfair, too. I also tried little test projects in the classroom, but it was impractical due to limited time.

3 Likes

Definitely it was good training for the real world. They certainly knew how to game the system, but it didn’t twig that the system was receptive to quite a bit of plausibly-deniable gaming until quite a bit later.

In any case, at least I still try to catch the most obvious cheaters

IMO the obvious ones are not the problem, it’s the sneaky, clever ones who really cause damage, because they get good marks away from the students who are doing their best. The truly lazy aren’t fooling anyone and are competing with each other for scraping a minimal pass at most.

A contemporaneous worklog (e.g. VCS is the technical solution, paper log book with numbered pages the low-tech-but-effective way, and regularly emailing project .zips to a mailbox a middle ground*) produces such an unreasonable amount of very frustrating work for a cheat, lazy or not, to fake their work and remain undetected that they might as well just do the work. For good students, it’s easy to produce and even an active benefit to do so.

I have to say, the technique left a lasting impression on me, and I got to console myself that the KPMG hopefuls had no option but to suffer through personally using Eagle and building that radio without being able to crowdsource it like usual. Which only made them double down on the collaboration on the other courses that only required a final hand-ins where they could more easily hide the provenance, I suppose! But the lab supervisor could safely say he only helped anyone pass the year based the work they actually did do (and he was more than happy to help those that cared, a fantastic guy - if you weren’t a chancer).

(*) In fact, if you gave them a project template with an jobset for zipping up, that could be a one-click process and include a schematic and board PDFs.

This circumvention doesn’t work directly. Deleting a symbol uuid breaks the connection between the schematic symbols and PCB footprint for that symbol/footprint. This requires at least one update round where reference designator is used. But detecting the broken link needs to be checked by having “Delete footprints with no symbols” option on in the Update PCB dialog.

Hi,

Maybe that will help. Python - sexpdata

In the issues, an entry is searched for. If it does not yet exist, it is added. You can certainly search according to this principle.