Lazy Bartender v0.1

August 31st, 2008

Coop is over I finally have a chance to get back to the bartender project. Now that some progress has been made on the programming end, I feel its fit to start discussing the project on this blog.

The bartender project is the biggest hardware project I’ve undertaken to date. It was inspired by the Virtual Bartender by Digital Beverages. I read an article on the product a few months back on Wired (or maybe it was Popular Science…) and was enthralled by the idea. As a person who loves his alcohol (as evident in my participation as a developer on Urbandrinks.com), I too wanted one of these machines, but was immediately turned off by the price – $2,575!!!

And thus the lazy bartender was born. The goal was to make a simple version of the virtual bartender for under $300. The idea was to take out all the heavy hardware responsible for controlling the robot, and use a multimedia computer to control it instead. Now days everybody seems to have a computer in their living rooms or kitchens. Either as HTPCs (Windows Media Centre, MythTV) or a kitchen PC, these computers are becoming increasingly popular for extensive feature list and cheap price. We decided that we would build software that would run on top of these computers that would be responsible for controlling our lazy bartender.

So here is where we are at currently, out V0.1:

Hardware:
The hardware is currently very simple. A relay board is connected to the parallel port. Having worked with the parallel port before, I decided to use it again for its ease of use and reliability. The relay board has 4 relays on it, that can be turned on or off by the parallel port. Each relay is attached to a gravity based solenoid valve. In an order to save money and decrease the complexity of the project, we used gravity to push the drinks instead of a pump. Both the solenoids and the relay board use 12V.

Software:
Deciding the programming language was a much debated topic. I wanted to choose a language that would allow me to prototype quickly and worked cross platform. Initially I was thinking of using Python with PythonCard as a graphics library. However, I finally decided on Visual Basic 6 (didn’t have .NET on me). I absolutely hate Basic as a programming language, but you can’t argue with its ease of use.

The fact that Visual Basic 6 runs on Windows only pretty much crossed the language off the list during an earlier decision process. However, faced with the fact that I would have to create separate programs for Windows and Linux (Macs don’t even have a parallel port) since the parallel port operates differently in each system anyway, Visual Basic came back in to the foray due to the ease with which one can prototype a functional graphical program.

Hell, if this project really takes off, we’ll look into switching to a more “sophisticated” programming language.

So what can the bartender do now??
I can use my program to turn the solenoids on and off and pour my self a drink!! Pretty cool huh!!

Things to do for v1.0:

Hardware:
I need to design containers to hold the various alcohols and mixers. A lot of questions here since gravity is used. How do I design a container that won’t spill any liquid on to the electronics when opened?? I also need to procure or design a cabinet to house all my hardware.

Right now the user has to use the software provided to calibrate a shot. Essentially when the user clicks a button once the machines starts pouring. When the button is clicked a second time, the machines stops. The user can use this method and a shot glass to calibrate a shot. This technique (Bucket and Stopwatch technique), works but isn’t the most efficient. The user will have to do this for every type of alcohol and mixer because of their different viscosities. A flow meter of sorts would be a better solution. Due to the low cost of the project it might be better to pursue a hardware based design, like an indexer, or a modified toilet bowl float valve.

Software:
Right now the software can turn on and off the solenoid valves. It can also allow the user to calibrate the solenoid valves to pour a shot. For v1.0 a data storage has to be chosen – text files (currently used) or database (probably MySQL)?? There has to be a database of recipes. Once the user has been calibrated the solenoid valves to pour a shot, the software should be able to use this information to pout a drink as outlined by a recipe.

The software shouldn’t take too long. A good weekend should suffice. Its the hardware I am worried about. For some reason I can’t wrap my head around the design of a container. How do I design a container that will be easy to load and unload without any spillage? Right now I am envisioning something with Tupperware…

Anyway, all these developments are quite exciting, and working on this project has been a lot of fun!!

Darius Gai Lazy Bartender

Update to Livesoccertv.com Greasemonkey script

August 19th, 2008

I noticed a couple days ago that livesoccertv.com changed its url convention for the fixtures page. The script now accomodates for the url change.

More info available here:  http://userscripts.org/scripts/show/31551

Darius Gai Programming

livesoccertv.com fixture modification

August 11th, 2008

With the Olympics, MLS and the start of European soccer, it seems like the world’s most watched game is taking over. Now more than ever it seems harder to find a channel showing the game you are interested in. This happened to me yesterday when I was trying to find a channel that was showing the Manchester United game.

Normally I head over to livesoccertv.com, a site that has the most accurate soccer listings for American and Canadian viewers. However, now with the plethora of games going on, and channels now specializing in soccer, it took me a long time to find the Manchester United game among all the other.

Upset with this development, I set about creating a script so that I will never have to deal with this issue again.So today with the help of greasemonkey, atleast users that own firefox will be able to add some customization to whats displayed on the fixtures page.

Without further avail, I introduce – the livesoccertv channel sorter

Options include:
- The ability to only display games that exist on channels you have access to
- The ability to only display games that are listed as Live
- The ability to highlight games that are going on right now

Variables:
- channels: an array that should be filled by a list of the channels you own. To list all the channels add a blank space entry to the array.
- showOnlyLiveGames: by setting a 1 to this variable, only the games that are scheduled to be on live are listed.
- highlightCurrentGames: highlights the games that are currently going on.
(You can track the script through its development process and read about the known issues here)

The script has turned out to be might handy. By setting it to my channels and to only show live games, I managed to reduce the fixture list for the day from an unmanageable 50 to a nice and tidy 4.

Give it a whirl!!

Darius Gai Programming

Hello, anybody there??

August 11th, 2008

I have started a blog, and doing so I fell I’m conforming more to society, then I did when I didn’t have a blog. Everybody seems to have  a blog now days; even grandmas! There are nearly 200 million blogs (bare in mind, this is a very unofficial estimate).

So why create a new blog? Mostly its going to be a voice for all my projects. Be sort of a source control for all my thoughts as they develop into the final thing. Then after the project is done I can go back in time and remember what I was thinking about!

So anyway, welcome to the blog! I’ll start updating it with all the project info soon!

Darius Gai personal