-Updated 5/15/2016 – Initial Page Creation


UPDATE 1/2/2017 – I have rewritten the entire program in Python, check out my new page here


I do quite a bit with electronics, and one of my favorite things to do is take old printers apart and salvage the various components. I once got a hold of an old Ricoh printer which included the additional side-loader and all of the bells and whistles. I got so many components from that – stepper motors, photo interrupters, brushless motors, electromagnetic clutches, solenoids, you name it. Anyhow, I also recently purchased a  hot air rework station so I now have the ability to remove integrated circuits (IC (s)) from the circuit boards. With this new found ability, I found that I quickly had a huge collection of components gathering up – as of now I could probably fill a gallon bucket with all of the components I have.


I decided pretty quickly that I need some way of making an inventory of the components. I made an Excel sheet, and started typing in part numbers. Then I would google the part numbers, get the quick specifications at the top of the first datasheet that came up, and type all of those in as well. This took FOREVER. Not to mention it was extremely repetitive. It took about 10 minutes – which was about 10 components worth of time (and I have hundreds…) – to realize that I had to automate this.


So I set about trying to find a way to search the internet programmatically for IC part numbers. I came across the website octopart.com – this site is basically a cumulative search engine for electronic components, it searches large distributor sites such as Digikey, Mouser etc. They even have an API for accessing the search engine with a programming language!  I decided to use my most comfortable programming language – C# (that is a lie, it is MATLAB but that doesn’t really do much for me in this situation). Using Visual Studio 2015, I made a simple Windows Forms Application that allowed me to search Octopart for components.


I will eventually discuss each component of the program, but for now I am just glossing over what it does. The code is pretty horrible right now, but if you want to check it out it is at https://github.com/tjschweizer/ICInventory . Anyone contributions welcome.


My program is pretty simple so far, but I’ll walk through some of the features it has and some that I want to implement. Here is a screenshot of the program:

IC Inventory Screenshot

The program loads an Excel Workbook in the path at the top left corner of the screen – this workbook is formatted with a specific set of columns to add part information. Once the workbook is loaded the text just to the right of that changes from “Workbook Loaded = FALSE” to “Workbook Loaded = TRUE”.

Below the workbook path, stretched across the entire width of the screen is the search bar. The text entered in the search bar is passed to Octopart, and the results are displayed in the list shown – this is all pretty self explanatory. If you select one of the lines and click “Show Details”, the image is loaded, the technical specifications are listed, and the long descriptions are listed. Another thing that can be done once a part is selected in the list is have the part added to the “inventory” – this is just the excel sheet. If there are no parts with a matching ID, it creates a new row in the excel file. Otherwise it adds the “quantity” to the quantity already in the excel sheet. I also have an option to automatically download datasheets – it is functional but it is far from perfect.


This project actually surprised me in how fast I was able to get it to work. I only have probably 20 hours invested in it. That may seem like a lot, but it took a long time for me to get a working interface with the Octopart API – Octopart works with JSON data, and I’m making the program in C#. The two programming languages don’t work too well with each other – at least not for a pretty novice programmer. Moving forward, I need to clean up my code and break the part search into multiple functions – right now, the code actually executes a search request when the search button is pressed, a separate search request when the “Show Details” button is clicked, and another search request for “Add to Inventory”. I want to limit that as much as possible for obvious reasons. There is just so much that is ugly with my code – it needs to be cleaned up. Anyways, I also want to make the “Load Workbook” button launch an Explorer instance so people can actually navigate to the Excel sheet – and save the path when the program is closed. Also I want to add the option to create a new workbook and format it correctly. There are quite a few more “quality of life” features I want to add, check out the github repository link a few paragraphs up for some more “future features”.


Once I get this portion of the program polished, I want to make another program that searches my Excel file with a similar interface. This way if I am working on a random project and I need an op-amp, I can open up the program and type “op amp” and it will return all of the op-amps I have on hand. Then I can click “remove” or something and subtract the part from my personal inventory. Finally, I want a program that “links’ these two programs – or more appropriately I want a “home screen” that I can go into “search for parts online” or “search for parts I own” – this could all probably be wrapped up into a single program but I haven’t looked into that part of Windows Forms yet.


I’ll try my best to update this page with more detailed information about the code once I clean it up into something that makes sense.