Interactive Html Bom Plugin for KiCad

Plugin now can show some stats about the board and progress of ticking off checkboxes

img

5 Likes

Nice statistics add-on. But what are Groups? Are those collections of same value component (like all 100k resistors on a side is one group, all 0.1uF caps on one side another group, etc)?

Yes, component groups, i.e. rows in bom table.


V2.2 is released
New in this release:

  • Board stats, checkbox progress bars
  • Option to show DNP components in outline mode
  • Datasheet field can be used as extra field
  • EasyEDA support
  • Option to normalize extra field name case
  • Options to hide references and values

And some bug fixes.

2 Likes

Nice tool I started using it recently and Iā€™m suprised of the quality of this work. While with most of the boards I designed it works correctly with some of them I got an error on startup and no results:

Iā€™m running the last version of the plugin on KiCAD 5.1.4 on Windows 10 Pro 64bit.

Thisā€™s the error message copied from the dialog box:

---------------------------
Exception on python action plugin code
---------------------------
Traceback (most recent call last):

  File "C:\Program Files\KiCad\share\kicad\scripting\plugins/InteractiveHtmlBom/ecad/kicad.py", line 438, in Run
    ibom.run_with_dialog(parser, config, logger)

  File "C:\Program Files\KiCad\share\kicad\scripting\plugins/InteractiveHtmlBom/core/ibom.py", line 315, in run_with_dialog
    dlg.set_extra_data_path(extra_data_file)

  File "C:\Program Files\KiCad\share\kicad\scripting\plugins/InteractiveHtmlBom/dialog/settings_dialog.py", line 37, in set_extra_data_path
    self.panel.extra.OnNetlistFileChanged(None)

  File "C:\Program Files\KiCad\share\kicad\scripting\plugins/InteractiveHtmlBom/dialog/settings_dialog.py", line 201, in OnNetlistFileChanged
    netlist_file, self.normalizeCaseCheckbox.Value)

  File "C:\Program Files\KiCad\share\kicad\scripting\plugins/InteractiveHtmlBom/ecad/kicad_extra/__init__.py", line 20, in parse_schematic_data
    return parser.parse(normalize_case)

  File "C:\Program Files\KiCad\share\kicad\scripting\plugins/InteractiveHtmlBom/ecad/kicad_extra/parser_base.py", line 22, in parse
    data = self.get_extra_field_data()

  File "C:\Program Files\KiCad\share\kicad\scripting\plugins/InteractiveHtmlBom/ecad/kicad_extra/xmlparser.py", line 16, in get_extra_field_data
    xml = minidom.parse(self.file_name)

  File "C:\Program Files\KiCad\lib\python2.7/xml/dom/minidom.py", line 1918, in parse
    return expatbuilder.parse(file)

  File "C:\Program Files\KiCad\lib\python2.7/xml/dom/expatbuilder.py", line 924, in parse
    result = builder.parseFile(fp)

  File "C:\Program Files\KiCad\lib\python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
    parser.Parse(buffer, 0)

ExpatError: not well-formed (invalid token): line 1, column 207


---------------------------
OK   
---------------------------

In attach the board file:
V1-10A124.zip (80.3 KB)

Issue is not with the board file, looks like there is an xml file in project directory that the plugin assumes to be extra field data file but it doesnā€™t have expected format. Try renaming or moving that file or just generate new netlist file, that should solve the issue.

thnx is probably the file produced by KiCAD to be passed to another BOM tool.

Xml file produced by kicad (eeschema to be exact) is exactly the one that is expected so if that is indeed the case then itā€™s likely a KiCad bug. Please check that there are no other xml files.
If you can post xml file here it will also help.

Maybe they were produced with a former kiCAD release and this caused the problem. After removing them everything worked fine. I launched again EEschema BOM extraction (creating another XML file) but this havenā€™t triggered any error within your script.

If you can post xml file here it will also help.

Unluckly I deleted nasty XML files ā€¦

I see, thanks for the update. Iā€™m going to fix the error anyway, the plugin shouldnā€™t just die with a stacktrace for invalid xml. But at least this is not a blocking issue.

1 Like

@qu1ck First, thanks a lot for this very useful tool. Installs and works perfectly in Win10, with KiCAD nigthly from Sept 2019. Iā€™ve just soldered manually a lot of boards (600+ pcs of 100nF/1206, you can imagine) with its help.

I just add a feature request to the wishlist:
if F.Cu (or B.Cu respectively) layers would be seen dimly, it helped locating target footprint, which is not easy at a bit chaotic board.

Glad you find it useful.
By dimly do you mean different (less contrasting) color or decreased opacity?
Also have you tried tweaking which layers are enabled in the bom? With disabled pads and silk and enabled fab layer it usually becomes less cluttered.

I think it would be very light grey, regarding to the light/dark theme. I photoshopped a view I think of.

First congratulations to the great plugin and here are the ideas for Version 3 roadmap:

A project with similar attempt is known from https://sourceforge.net/projects/pcbcolorizer/

The idea is same than yours exept screen is swapped with paper prints. It goes back on what or fathers did with THC prototype assembly almost 50 years ago using photocopies colored by Edding. This leaded to more or less sophisticated semi manual THC pick and place machines driven by human bio robots. Best known are the THC placement workbenches produced by former German manufacturer Royonic. If you dont know that kind of workbenches, Google for Royonic reports many photos of used equipment. They consist of a 2 axis servo drive laser pointer with and without mechanical paternoster shelf to feed the components. A foot pedal switches to next BOM line, the component box is positioned below the center door and laser points to pcb location on where to populate this component. Pin 1 or Diode/Kathode polarization is indicated by blinking the symbol. Therefore operators have to know really nothing about the board to assemble and show amazing speed. We have 2 of the Royonic machines and I worked myself with them long ago for THC. For quantities up to about 100 pcs its a fun to beat the own assembly time or the time of a fellow. For numbers above that, it gets boring and as a designer of the board you soon know anything by heart. Unfortunately, the Royonic machines are too big for SMD and disappeard in recent years more and more same the manufacturers Royonic. There was also a competitor Heeb, who changed his production to SMD pick and place machines what we also run several up on today. Nevertheless for prototype numbers below 10 and depending from complexity, hand assembly is always the choice. Further we can assume, many of the Kicad users cannot invest into own pick and place machines and never have medium or high production volumes. There are only few minor feature requests to your addon with use of todays PC peripherals what allows to build own semi automatic SMD pick and place machine what is equal to the former Royonic THC attempt.

A split screen for multi monitor support allows connection of LED projector instead of screen. LED projector is mounted to a frame on the table (or to the room ceiling) while its image can be seen on the workbench. Zoom image of same size than pcb allows direct projection of the image to the pcb and I guess, this simple feature will double the assembly speed.

From gaming equipment, there are cheap and generic peripherals like USB foot switches known. Support of such HID input, allows to have both hands free for component assembly by tweezers what will double the assembly again.

We could go on further with a second projector what covers the SMD chip magazin boxes. In comparison to THC, the SMD containers are really tini and each number can be reached by hand without using mechanical positioning devices. I guess, this not only allows bug free board assembly by people who dont know anything from the design and will will double assembly speed again.

Since we have a real SMD pick and place machine, we never tried this approach. I cant promise how sufficient behaviour of resolution, distortion and thermal drift of todays cheap LED projectors are. Probably its some experiments worth what can be done without any change to the HTML bom plugin. Good luck ā€¦

I try to explain the problem for you to see clearly. Fast and cheap board is manufactured without silkscreen. When I want to solder a particular component, I must find its place, and it is easy to misplace.

and find the pads for R47 on real board:

the copper pattern could be used as navigation points

@novaktamas I see, you are talking about tracks as visual anchors, yeah that is doable. But it will be optional because some people will want to avoid effectively publishing the whole netlist with the bom file because it will make it easy to reverse engineer 2 layer boards.

@janvi In general I have no interest in supporting any specific professional manufacturing setups because a) I have no way to test that and b) pro shops can buy actual PnP machines.
That said, I do like the idea of projecting pcb image onto actual board. With availability of cheap small projectors it should be useful technique even for hobbyists and low volume manual manufacturers.
If I understand your idea correctly by split screen you mean that on a standard monitor there will be bom listing with highlighted row and on the separate monitor/projector there will be just a pcb image.
I will definitely look into this.
About usb switches, if you can make them emit standard keystrokes you they should work already since the bom supports keyboard shortcuts.

1 Like

Only mentioned the Royonic and other equipment to show how they work and how we can use same principles for use with your BOM plugin. Its not to support the machine rather than replace it for SMD purpose.
Yes, the idea is using LED projector directly to pcb instead of screen. This could also solve the issue from @novaktamas with easy navigation on board. Its not required to see the complete board with all components. Only board outline for initial assignment. For assembly work only a single spot to the component location is sufficient. Before doing efforts for split screen, somebody should test the projectors performance first if it is usefull. If illumination is sufficient, all components with one colored or highlighted may also work.

One thing of your script is to avoid searching for the destination of components. This search can be shortened by direct indication to pcb instead screen and then searching postion on pcb what may consume time and errors.

Other thing is searching for the source of components (what are normally tini SMD containers for hobbists). This can be indicated same way by projector. If having both, BOM display itself becomes optional becouse values of components are no more interesting. Only from where to take the next correct component. User can always take same setup arrangement for his available containers. Therefore setup of this part is independend from pcb design. Design dependend setup is already fine with your script. This way, there is almost no setup time with your script to assemble any board

I have no experience with gaming pedals only wrote a usb device stack from where I know how HID works. Possibly the gaming gimmicks come with appropriate driver and there is nothing to do for the BOM script.

I donā€™t see how the script would know about source of components. Everyone stores their components differently.
Thatā€™s why I was thinking to have bom table on first monitor, it can have storage id in it, something like box3, a2 for row a, column 2, just an example. That should help quickly identify the storage cell or reel number or what have you.

1 Like

Correct. For PnP machines this table is known as the feeder table. Foto shows my SMD sample containers. One for resistors E12 values, one for capacitors and one for semiconductors. For tape pieces and reels (100nf, 1kOhmā€¦) I use clothspins at workbench edge to attach the ends to a edge from where to take the components. Everything not more than 100cm dimension what can be reached by human arm and projector. But component source is second step and completely independend of components destination why I called Version 3 roadmap and assumes that previous projector idea is proven

DSCF4572

imagine a pcb design with same shape of board outline and every component value one time at stored location. No traces schematic and connections required. Source is very same than destination and needs only association. See my project for PnP machines doing this here https://sourceforge.net/projects/cad2board/ (but cannot read Kicad nor display pcb at projector)

Sure, but even in theory how do you imagine to transfer the information about your particular component storage to the script?
Again, you will have to somehow standardize your storage and compile an equivalent of a feeder table so that the script can cross reference it with the bom.

Sorry, I donā€™t follow.

1 Like

Hobbists typically have limited amount of components in use. Even companies have prefered models for reuse what makes the total amount of smd containers limited. They can be arranged always in same position e.g. using a carton to put the conatiners to the workbench. Shure, this arrangement needs user specific setup table similar to a pcb with that locations. Setup of this feeder table is typically required only once by each user. If next BOM row is a specific value, this value is searched in the feeder table and appropriate container is indicated by projector. Most work are the ā€œchickenfeedā€ components . For one big CPU this is no problem or improvement why the practial sequence also can work without source indicator for specific bom entries. With other words: Projector not only indicates destination at board but also source in containers.

Practical input to your script can be manual editing input to table or more comfortable any additional ā€œcontainer storageā€ pcb layout map what contains each value once