Another Symbol Generator for Kicad

Hi,

Recently I had to generate a large schematic symbol. I know there are many places from where I could download schematic symbols but unfortunately i found all those to be un-uniform. I found some inspiration from kipart python script which was of great help. But decided to develop a GUI based tool for schematic symbol generation.

After a bit of thinking I decided to create a schematic symbol symbol wizard of sorts. its still work in progress and its based on GLFW and imgui. Currently supports metric units in mils only and rectangle symbol only. I plan on adding segmented rectangle, triangle and demorgans type symbol. In future I would also like to add support for editing pin names in tabular view (low priority though) as this is currently supported in kicad.

Kindly have a look at my repo https://github.com/pixellon/imgui. any suggestions are welcome. I developed this for myself but if this could be helpful for other in the community. I would like your opinion if it is worthwhile for me and others to develop further on this ?

-Pix

1 Like

First suggestion that pops to mind after watching the gif: make sure generated symbols are KLC compliant or at least have an option to enforce it. At least one violation I see is that pins are not always aligned to grid.

2 Likes

Maybe others like this, but I do not really see the point of it.

Most of the effort is in getting the names of all the pins right and matching them with the pin numbers and pint types (input / ouput / tri-state / etc).

I also do not make (big) schematic symbols often, and KiCad’s symbol editor is quite enough for me. Especially with the large libraries of existing symbols as starters and easy rotation and mirroring of groups of pins.

I did see some python scripts which helps with creating schematic symbols from a spreadsheet.
The idea is that you copy pin numbers and pin name data from a datasheet.pdf into a spreadsheet program, add some meta data and run the script.
If I were making more schematic symbols I would firstly look into that.

Yes, this is important.

@pixellon, have you tried ”Config (uConfig)? It reads (tries to read) datasheets and extracts data from them. paulvdh is right, adding pins with only numbers is less of an issue; names and types take time. On the other hand I found ”Config’s pin layouts limiting.

Maybe a combination of ”Config and something from your approach would be ideal. ”Config is too limiting, yours is too low-level.

@qu1ck thanks for your feed-back I see is that pins are not always aligned to grid
At the moment when the pin on the left side do not match the pins on the right or vice versa the pins get aligned to the top. similarly top pin and bottom pins align to the left. if i understood correctly these pins must be justified or center aligned ? I am going through the KLC documentation to see what i need to do to be compliant. I think I would also add something like enable grid view so that it makes for easy viewing. at the moment the symbol origin is at center and the based on the distance between the pins i calculate symbol width and height, maybe i must change this approach.

@paulvdh thanks for letting me know. what i have been doing so far is to import the symbol and then edit the pin names in the pin table view which seems to work allright so far. however I am planning on introducing a table editable view so that there may not be a need to import the symbol and then edit it in kicad. all can be done with the same tool.
@eelik i have not tried uconfig. can yoy please point me to the repo so that i can have look to see if it is possible to integrate it into this app.

Even if you want to keep your current user interface and functionality it would be of great benefit for everyone if you worked to make the pdf pinout extractor part of uConfig better and more robust - I have not been very successful with it with few datasheets I have tried - and incorporated it to your application.

See also https://www.snapeda.com/instabuild/.

I will give it a try to see what can be achieved. thanks for the snapeda reference. looks really useful.

@pixellon
I was referring specifically to S4.1 rule 1:

Using a 100mil ( 2.54mm ) grid, pin origin must lie on grid node (IEC-60617)

thanks for clarifying. I am making changes to comply with this rule.

I am trying to understand what this is about but I do not understand what this has that KiCad’s schematic symbol editor does not have.

For example, placing a row of a lot of pins in a schematic symbol is very easily done with placing a single pin, and then hitting the [Insert] key a few times.
It is possible to change the “auto increment” distances, but I never bother to do that because the default of going down 100mil is pretty decent, and a row of pins can be very easily manipulated. by simply dragging a rectangle around it and pressing ‘m’ for move. Then you can rotate the block with ‘r’ and use ‘x’ or ‘y’ to mirror the row of pins in the X or Y axis.

On real IC’s things like data and address busses are seldom on consecutive pins and it’s pretty easy to first fill in the pin data, and then drag the pins to where you want them on the schematic symbol.

From your wishlist it seems you also want to duplicate functionality that is already implemented in KiCad’s symbol editor.

The Robtips/uConfig looks like it’s the program to extract pin data from datasheet.pdf files for schematic symbols, and it also looks like it’s further developed than when I saw a youtube vid of it some years ago.

I do have a bit of a programming background and have an idea of the effort involved to make a good piece of software, and I do not understand why you are doing it this way.
You wrote you mainly wrote this pogram for yourself, and you are of course free to do so, but if you look to the time and effort needed to write such a program, compared with the time and effort needed to make your symbols in the tools already available, is it worth it?

A trap is that writing software is much more fun than the mundane work of data entry for custom schematic symbols, but if it is 2 weeks of programming to “circumvent” half an hour of data entry, then it’s not very productive. (But still better if your goal is to have fun with programming).

With all this in mind, can you give a short itemised list of funktionality in which your program is “better” than the already existing tools? You should of course already have such a list ( on paper, in you PC, or just in your head).

Have you considered the opposite: to add functionality of your program to uConfig or the KiCad symbol editor?
I find the KiCad symbol editor quite decent, and uConfig also looks like it’s already fairly well developed, and they are both open source projects.

Those projects very likely use different tools, and programming language which makes it more difficult for you to familiar with their codebase. Looking at code written by others and figurering out how it works is also much less fun than writing code yourself according to your own ideas.

But also:
Looking at the code styles of others and the algorithms they have written can be very educational. Learning a new programming language, tools . libaries expands your view on the world of programming.

1 Like

I just felt that it would be nice to have some templates available so that all I as end-user had to do was to just fill in pin names and numbers using the pin table.manually doing this i found it can sometimes be really hard to verify and can be error prone.

This may be true. All i wanted was to create a decal like in altium or pads so that I can import it directly to kicad and edit the pin names and type and pin numbering in the pin table. I find data entry in table to be easier than to construct a new symbol totally in symbol editor.

I just started this as a summer project as i break from university.

This is exactly what i wanted to do. have fun while developing something.

I think I will try to contribute to the kicad but I find understanding the code base as daunting. I just to the easy route. may be I should consider your advise to contribute to kicad, which would be a good learning experience If i mange to get the change accepted

Thank you. I will seriously consider your advise.

hi
Please help how to run this progaram step by step 

thanks

Download the repo from https://github.com/pixellon/imgui
navigate to the prebuilt folder.
unzip the the linux.zip if you are using linux or alternatively choose windows folder to unzip.
you will find the .exe in unziped folder that you can run.
the rest is self explanatory.

Thanks I will try
have a good one

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.