A Tool to Help me Inventory my Components

Background

So, this summer I attended a local Retro-Computer festival, Boat-Fest,where i picked up a selection of ICs from the free table.  When I got home, I realized I had no easy way of figuring out what I had.  This is the impetus for the ChipInventory project.

The Project

I wanted to do a small project with node.js and this seemed like a good time to start it.  I looked around to see what was already out there in the way of chip identification databases and I found the ChipDB project and its related GitHub Repository and thought that this was a good start.  The YAML file allows for a description of the component, a list of aliases, pin definitions, notes and specifications.  It also has a link to the datasheet for the component.  Unfortunately the datasheet sources used for the original data seems to have moved.  I am slowly updating the links to newer locations.

I started by creating a MySQL database that could hold the definition data that was described byt the YAML files that were used in the ChipDB project.  Since I had no point of reference to start with, I wrote a quick python YAML reader/writer application to load the data/ This gave me a good start.

First Steps

Now it was time to build the node.js application.  I chose express, mysql2 pug, and nodemon to start with.  I cobbled together a list view of the definitions along with some rudimentary search functionality. Then I needed a component detail page to display the information.  I spent a lot of time getting the detail page to look like the ChipDB's data page.  I got something that looks like this:

Component Details


I think it will do nicely.  The next step was to create the New and Edit pages so I can update and maintain the data.

Components

This started out as a chip database, but I need to track more than that.  I need to be able to keep up with all types of components: diodes, resistors, capacitors, transistors.  I generalized the model to include a component type and sub-type.  This was implemented to give a reasonable level of classification for the components.


At the same time I added Package Types to handle the pin layouts: DIP, SIP, Axial, Radial, PLCC and so forth.  Here is the Component type information for capacitors as an example.


Inventory

Now that I can identify all of my chips, I need to figure out exactly what I have.  Time to add support for inventory.  How many of each chip, their actual number, manufacturer and date code is a good start.  I created a few tables to hold the normalized data.  There is room for expansion here. An inventory search page is the first thing created.  Followed quickly with new inventory data pages.  i realize after my frist couple of bad data entry errors that I need to go ahead and get the edit pages up too.  I also added the inventory list to the component detail page so you can see how many of each type your have.



Locations

Now that I have inventory tracking in place, I need to know where I have it stored.  Enter the locations.  A location can be anything from a building, a room, a box, a shelf, anything.  A location can contain other locations, like a shelf can contain a box.  This location hierarchy allows for precise locating of inventory.  Inventory can be associated with a location.

Projects

This is the part of the application that is currently being developed.  As it is now you can create a project and add component items to it that allow you it allocate inventory to the project.  This can be automated by importing a CSV Bill Of Materials file that can be exported from KiCad/  Future plans include generating pick lists for a project to help gather the necessary components.  Generating Order lists when you do not have the components in your inventory.

Docker

The next step is to create a docker container defintion to make it easier for someone to spin up their own instance of this tool


Comments

Popular posts from this blog

COBOL

Utilities

Emulators For CP/M