For open source projects, I usually create a table containing the parts details or bill of materials (BoM), but it is tiresome to then re-enter all that information into the Farnell or Newark website, to order the bits.
The March 2019 update to the element14 website contains the ability to paste BoM content and it will auto-convert into a nice table with hyperlinked buttons to go directly to the Farnell/Newark product page for each component, or a single-button to purchase all.
I still use EAGLE, so I wanted a way of getting the component values from the schematic into blogs. I messed around with an EAGLE user program (known as an EAGLE User Language Program or ULP) and the results are usable! I edited the EAGLE-supplied bom.ulp file and called it bom-new.ulp, attached to this blog post.
Using It; Build your Schematic
To use it, when you create your schematic in EAGLE, as you add each part, make sure you add a couple of attributes (there's an icon on the toolbar for that, or just right-click and select the option called Attribute).
Here I right-clicked on the resistor, selected Attribute and then clicked on New to add FARNELL and NEWARK attributes, with the part codes, and a MANUFACTURER attribute with the manufacturer name (e.g. Vishay).
You could also name the attributes to something similar, like FARNELL_PARTCODE for instance, as long as the text FARNELL or NEWARK is part of the attribute name. If MANUFACTURER is too long to type for attributes, use MNFR.
Running the bom-new User Language Program
Once you've completed the schematic, click on File -> Run ULP and select the new bom-new.ulp program!
Select Values, and ensure List attributes is selected. You'll see the attributes on the right. Select the output format to be element14 and click on Save!
There should now be a comma separated value (.csv) file in element14 BoM format on your file system. Double-click on it to open with Excel or similar.
The bom-new.ulp program combines some of the columns of data, into a single column, so you may wish to edit the first column to something nicer (or it could be done later when it is in the blog post).
Copy all of it to the clipboard (Ctrl-A followed by Ctrl-C) and now your're ready for pasting into the blog post, as described below.
Working with the Blog Post
Create your blog post and describe the project as normal. and then when you're ready to insert in the BoM contents at the current cursor position, on the toolbar, select the >> icon, and go to Product Link :
Three tabs appear. Click on Paste BOM:
Provided you've got the BoM content in your clipboard, you can now click in the blue circled area, and then paste (Ctrl-V) the clipboard. Then click on Insert.
The BoM will now be inside the blog post. It may take a minute or so to entirely process.
If you wish, edit the Product Name column content to something easier to read. That's it. When you publish the blog post, the table will look like this:
Bill of Materials
|- LED5MM [LED5MM] // LED||1|
|- OS102011MA1Q [OS102011MA1Q] // OS Series C&K Components, example is Farnell 1201431||1|
|- SIL2 [SIL2] //||1|
|- SW-BOURNS-1543-OR-TACT-NEW [SW-1543-TACT] // Switch Bourns 1543 or generic TACT switch, e.g. from ALPS, slightly better schematic symbol||1|
|1.27mm pitch - [DIL2X5-1.27MM] // SMD 10WAY DIL header (2x5) 1.27mm spacing Harwin Farnell 1022305||1|
|100n - C-EU050-025X075 [C050-025X075] // CAPACITOR, European symbol||2|
|10u - CPOL-EUE2.5-6 [E2,5-6] // POLARIZED CAPACITOR, European symbol||2|
|180R - R-EU_0207/10 [0207/10] // RESISTOR, European symbol||1|
|1k - R-EU_0207/10 [0207/10] // RESISTOR, European symbol||1|
|1n - C-EU025-025X050 [C025-025X050] // CAPACITOR, European symbol||1|
|1u - C-EU050-025X075 [C050-025X075] // CAPACITOR, European symbol||2|
|2.2k - R-EU_0207/10 [0207/10] // RESISTOR, European symbol||2|
|22k - R-EU_0207/10 [0207/10] // RESISTOR, European symbol||1|
|32.768kHz - XTAL-32768-WIRE-ENDED [XTAL-32KHZ-WIRE-ENDED] // 32.768kHz crystal, wire ended. Example is AEL Crystals 8mm x 3mm Dia, 12.5 pF, 20 ppm Farnell 9509682||1|
|330R - R-EU_0207/10 [0207/10] // RESISTOR, European symbol||1|
|47R - R-EU_0207/10 [0207/10] // RESISTOR, European symbol||1|
|47k - R-EU_0207/10 [0207/10] // RESISTOR, European symbol||1|
|BC547 - BC547-2 [SOT54A] // BC547||1|
|- [LCD-ALPHA-MCOG-2X16] //||1|
|MCP1702-3302E - MCP1702 [TO92] // MCP1702 LDO Voltage Regulator example is MCP1702-3302E Farnell 1331485||1|
|MSP430G2553 - MSP430G2553 [DIL20] // PDIP20 Farnell 2113748||TI||1|
|- R-78E [R-78E] // Recom R-78E series DC-DC converter, example is R-78E-05-0.5 (5V 500mA) Farnell 2078564 or R-78E-3.3-0.5 (3.3V 500mA) Farnell 2218602||1|
|- SD56X0 [TO18-] // Honeywell SD5620 or SD5630 Optoschmitt Detector, e.g. Farnell 327610||Honeywell||1|
The bom-new.ulp program could be improved or customized further. It may be buggy (although it works for me, I've only tested it with one schematic) but the code is easy to edit even with little .ulp code familiarity.
If you have any comments or improve the bom-new.ulp file, or come up with other techniques to work with BoMs, please do share!
bom-new-rev1.zip 6.5 KB