OpenVND Hardware

The hardware adventure started out by contacting a local vending company to ask about getting a machine that supported a UCS/DEX connection. They recommended a Selectivend CB300, which is a six slot machine (50 cans per slot) and the refurbished price was very reasonable.

When it arrived several weeks later, I went looking for the DEX connection and I couldn’t find it. After a lot of back and forth it turns out that the CB300 doesn’t support DEX (even though I made that requirement perfectly clear) and I needed a CB500 (a ten slot machine) that supprted a GVC1 board (an option) which should do what I wanted. Of course, it was a more expensive machine, but he gave it to me at his cost and arranged for the pick up of the first machine.

Keep in mind that geeks who want to monitor a soda machine are not the type of people with whom vending machine resellers usually deal.

The CB500 arrived and I could definitely see the GVC1 board, and I could see the hole where the DEX jack should go, but it wasn’t there. The DEX interface, by the way, is the same as a 1/4 inch audio plug and jack, and I could see a four pin connector on the board itself labeled “DEX” so I knew we were a lot closer than before. Another call to the vendor (and another $25) and the proper cable was mine at last.

The next piece of equipment was a small computer to put inside the machine. Luckily, our offices are in the same building with WDL Systems and they specialize in embedded devices. I bought an eBox 3300MX with wi-fi and two 9-pin RS-232C ports and coupled it with a fast 4GB SD card. Small, low power and solid state, it seemed the perfect box for this project.

It mounted easily inside the machine with some 3M Dual-Lock that I bought at nearby hardware store.

The last thing I needed was an RS232 to DEX cable, and I found one at Sears of all places. (I think it is ironic that Sears is also an OpenNMS user, so it’s cool that I got my cable and got to support a customer at the same time).

So now I had the DEX interface connected to a Linux box. Since the machine is some distance from an ethernet port, I decided to use a wireless connection, and since I was housing the computer in a big metal box it was suggested that I use an external antenna (the eBox has a connector right on the chassis). I found a cheap one on Amazon that worked fine.

The one thing I had a bit of trouble with was power. I thought I’d be clever and find a way to wire the computer into the harness of the drink machine itself. Right near where I mounted the eBox was a florescent light, so I figured I could just disconnect the leads to the nearest lamp, wire in an outlet, and plug in the power supply for the computer.

To my surprise, that actually worked – for about a minute. What I forgot was that the connections to the lamp were on the other side of the ballast, which, I believe, means that the voltage is rather high. This generated enough current to turn the power supply to jelly, and I was lucky that no lasting damage was done to the system. Once I replaced the power supply (did I mention WDL is in the same building?) I decide to run an extension cord down the front and under the machine.

The final piece of hardware was a temperature sensor. On the main page of this site you can see that the machine knows the inside temperature, but I could find no way to access it via DEX. Since I had a spare serial port, I ordered a sensor off of eBay.

That’s all there is to it, hardware-wise. Please see the section on software for the rest of the solution.