Tuesday, April 30, 2013

Inventory Management Software

A while back I created some custom inventory management and pulling software for an old employer.  I recently went back and added some new features for them.  The project has developed into a fairly full featured cool little piece of software, much more-so than I had envisioned when I started it.  I took on the project when it became clear that the client needed a better way of organizing and pulling stock, but didn't want to transition to a new point of sale system or pay the fairly high quotes for integrating a more standardized inventory setup.  I managed to create a system which would allow them to stick with their current POS program, use their existing barcode scanners, and request products from an iPad (or other web browser).

The project pushed me to break into some languages and libraries I hadn't played with in the past.  At points during development I made use of: Java, SQL, HTML, CSS, Javascript, ODBC, Derby, Google Charts, plus a bit of work in MS Office and Adobe CS6.  It would have been nice to have stuck with Java for more of the project, but a substantial portion of its use was going to be done on iPads which lack Java support (sadly this was before the rise of Android).  Instead I went with a locally served webpage for requesting products from the iPad.

I originally had my program pulling the product info out of the client's point of sale system and storing it in a separate database in Microsoft Access.  I hadn't ever edited an office file programatically before (or even used MS Access), so that was pretty fun to learn.  I went with MS Access because it allowed me to quickly develop the project, without having to build database management features into my user interface.  Eventually  I decided that for the sake of simplicity, ease of use, and program independence I would move the database entirely over to Java using a derby database.  Providing the user the ability to change, remove and add values to the database in a graphical form was a bit of a pain; my go-to solution was to use Swing's JTables which are pretty convoluted and difficult to work with.  I've since moved away from Swing in favor of JavaFX which has been a vast improvement.

I'm a bit of a novice when it comes to web development so I tried to keep things as simple as possible.  There is no server side scripting or direct linking to the database, instead the page is updated once or twice a day and everything is handled in simple HTML and Javascript.  Form data is collected client side in local storage and emailed using a mailto link.

My most recent updates added the capabilty to track the monetary value of the inventory assets.  I decided to go ahead and toss in some Google Charts for visualizing cost breakdown by category and assets over time.  I found Google Charts to be well documented, very pleasant to use, and fairly consistent across all the major browsers.  I've written a separate post on some of the tricks I discovered to getting the expected behavior out of the charts.  The Google Charts post can be found here: http://nooleanbot.blogspot.com/2013/05/google-charts-tips.html

Thursday, April 25, 2013

G15 Keyboard to 5.5" Drive Bay

I recently replaced my long-used Logitech G15 v2 with a Ducky mechanical keyboard.  So far the only thing I've missed is being able to see CPU, GPU, and RAM status just by glancing at the keyboard.  I decided to see how feasible it would be to convert my G15 into a front panel display.  I haven't started the build yet, but this is what I've come up with so far:

There aren't any components in the areas of the  LCD PCB that need to be cut away, and the only parts nearby seem to be some LEDs for back-lighting.  So as long as I'm careful, it should be possible to cut them away without affecting function.

Five of the front panel buttons are the app control keys mapped out as shown in the photo below.  I added volume controls to fill out the rest of the front panel.
Figure 1: G15 App Keys.  These 5 keys will be included on the front panel as labeled.

If you attempt this build at the minimum you'll need:
  • Case from old optical drive
  • 2mm ABS plastic
  • 8 Cherry MX Switches
  • ~1 meter Cat 5 Ethernet cable
  • ~23 cm of 33 pin VM 2896 ribbon or 8 meters of ~30 gauge wire :P
  • Black Spray Paint
  • Glue, possibly Alumilite
  • Ability to cut, drill, and solder 

Inside the G15, underneath the rubber domes and key switches is a sheet of clear plastic for transmitting the LED light throughout the keyboard.  This plastic should be enough to build up the clear components of the mod, including the keycap faces.  I plan on using clear Alumilite, or glue to form the columns that connect the keycaps to the switches.  It is probably a good idea to add a metal cutout behind the keys so that they bottom out against something solid, rather than pushing against the already compromised LCD PCB.  The Cherry MX Blue switches only need about 2.5 mm of travel to activate, so it should be feasible to include a 1 mm bottom-out plate without pushing the LCD back too far.

I plan on using a chunk of the G15 case to mount the main PCB to the drive case.  I'll just run the USB cable out the water cooling grommets to the back of my computer case.  I left a cutout in the lower portion of the switch mounting plate to allow light from one of the G15's LED arrays to shine through if I decide I want additional back-lighting.

Wiring Pin-out:

Below is the PCB I've set up to carry the switch inputs to the LCD ribbon socket.  Sadly it isn't easy to achieve the necessary connections in a single layer; the grey lead either has cross over as shown below or go on a long meandering path around the edges.  It is probably easier just to use some Cat 5 cable soldered to the switches and plugged into the LCD ribbon socket.
Figure 2: Switch PCB.  This PCB collects switch leads to be routed to the PCB ribbon input.

The mute button does not connect to the LCD PCB like the rest of the switch leads, instead it connects to the main PCB. The picture below shows where to attach the mute button leads.
Figure 3: Main PCB.  Shows the inputs for wiring the mute button.