keg.io V2 Development Begins…

Posted in Arduino, Hacking, Hardware, Kegerator by C4 on February 10, 2012 No Comments yet

Well, It’s been a little while since I’ve worked on any projects that I could put up on unstdio.org. But the wait is over! I am officially starting a new project and it’s keg.io v2. When we built the hardware for keg.io last year it was a great achievement because I’d never done anything that would be used by so many people. (Everyone at the Vivaki Nerve Center Seattle Office) But we haven’t really been able to put the time in the project that it deserves. So now we are going to do two projects at once. We got a sweet older pop machine that we also want to “technoligify”, so this will kill two birds with one stone.

The first couple posts of this project will be all hardware based. There is a bunch of new things to figure out since we have new ideas in mind for this. First we want to ditch the lame computer that the Arduino is connected to and move it “To the Cloud”! So we’re going wireless with the connection using sparkfun’s wifly shield. I haven’t played with this yet but CRC (aka “checksum”) bought a bunch of new stuff and the wifly shield was in there. The other thing we are going to do with this project is actually get real (badass) PCB’s made. We definitely need some cool branding of our own.

So the first thing I’m going to do is get this shield soldered up and start writing some code. So stay tuned and there will be some updates in the next couple days.

-C4

keg.io

Posted in Hacking, Hardware by C4 on September 13, 2011

A few months ago (in March) a few guys from work and I thought it would be a great idea to get a kegerator for our office. It started out with brainstorming some pretty cool ideas. Being technology geeks we immediately decided that the kegerator needed and RFID reader to track who is drinking the keg. We did get some inspiration from the guys at yelp. (http://www.youtube.com/watch?v=BwVoir5HSo4)

After we decided on the auth method we then moved to the question “Should people be allowed to pour beer if they don’t have a card?” of course we came to an unanimous “No!” decision. So the next thing that was decided on was putting in a (closed by default) solenoid. Third, we had the issue of trying to figure out how much beer was poured and how much was left. The way we saw it there were two main ways to accomplish this. One being we could measure the weight of the keg / kegerator and calculate the difference after each pour. The other was to measure the flow going through the line during a pour. We decided on the latter. We then got a hall-effect flow sensor to measure flow. Lastly, We also wanted to know the temp of the beer / kegerator so we decided to get a temp sensor and put it in there as well.

Here is some coding in the kitchen. (Yeah, that’s a shot.)

After everyone decided all of the things that we wanted to see on this thing, we needed to put it all together. I decided the easiest and fastest way was creating an Arduino shield and using an Arduino Duemilanove. I worked on most of the hardware stuff and getting it all working. Two of the other guys(Dylan and Chris) decided to use Node.js to write the application, which turned out to be pretty nice besides a few serial library issues.

Here is a little description of the hardware:

“Starting from the top, the Arduino is powered by a usb cable plugged into the source computer it is running with. The Arduino has a custom made “shield” that allows the Arduino talk to the other components in the system. The shield was made out of a RadioShack pcb that was cut to fit into an arduino  shield. The shield has 3 io “ports” on it. The first is the 12v power source input. This is needed to run the 12v solenoid that allows flow access through the line. The second ports communicates with the UART based Parallax RFID Reader. This is a basic 125Khz RFID reader talking at 2400 baud. The third port allows communication with the temp sensor, solenoid, and flow rate sensor. I used Cat5 cable for the connection between these components and the Arduino shield.”

Here is a list of the hardware components:

Some Hardware pictures…
 

Software:

In the software side, as I mentioned earlier, we are using Node.js. Everything is open source and you can find it on github https://github.com/vnc/keg.io. Some cool features that we added to keg.io are twitter integration, and some gamification type badges we call “coasters”. A member of keg.io can earn these coasters by different drinking habits. One of the first badges a person will receive is the “Welcome Coaster” after drinking their first beer poured from the kegerator.

So…I’ll explain how everything works. We have come up with a very simple communication protocol for communication between the Arduino and the host computer over serial. When the Arduino is started it initially grabs the temperature of the temp sensor and sends this data to the host computer. It will continue to do this every 10 seconds (adjustable) to allow close to real time temperature of the kegerator. Now we have an RFID card reader that is waiting for input from the user. When a card is scanned it grabs the card ID and sends that to the host computer for validation. If the card is not registered in the database, the application will display a denied message. (Don’t you even think about drinking from our Keg!)  If the card is registered and the user is valid the host computer sends back a request to the Arduino to open the solenoid and allow the user to pour beer. At this time the web ui displays a welcome message and shows a picture and information about the user pouring beer. Once the user starts to pour the beer, the flow is measured by the flow sensor and the flow rate is sent every second to the host computer which tracks the rates and calculates the amount of beer poured for that session. After 3 seconds of no flow rate the solenoid is closed and the next user can proceed to scan and repeat the process. What would a cool application like this be without twitter integration? After a user finishes his/her pour keg.io tweets about it. Check it out here: http://twitter.com/#!/keg_io

Here’s what keg.io looks like (at time of writing):

 

Thanks to the people that have contributed to the project:

  • Dylan
  • Carl
  • Chris
  • Garrett
-C4

 

Arduino LCD over Ethernet (Cat5/6)

Posted in Arduino, Hardware by C4 on November 9, 2010

I was looking at some pictures of the Makerbot the other day and thought it was cool how they used Ethernet cable for connecting some of the boards together. I was also trying to find something useful to do with these LCD’s I had lying around. Then I came up with the idea of driving the LCD over Ethernet cable.

First, I knew that the ST7565 LCD that I was using is a serial LCD, which means I only need 4 or 5 digital pins to drive the LCD. There are 9 total pins total on the LCD including the backlight. Since there is a backlight GND (LED cathode) and a GND to run the display, I really only 8 connections. This is the number of connections in an Ethernet cable.

The pinout for the LCD is:

1. /CS – Chip Select
2. /RST – Reset
3. A0 – sometimes called RS
4. SCLK – Serial clock
5. SID – Serial Input Data
6. VDD – 3.3V power
7. GND – ground
8. K – LED cathode
9. A – LED anode

Making the shield.

I wanted everything to fit on an arduino shield and not sit on a breadboard. Looking back I should have just bought a prototype shield because it would have been way easier. Since I had a basic RadioShack PCB which is a bit smaller than the arduino but roughly the same size, I decided to use it for the shield. I would not suggest using this for arduino shields. The board is not wide enough. In order to make it fit I needed to bend the male pin headers 90 degrees and then 90 degrees the other way. There are some pictures below that show what I did.



After I had the pins in place, I needed to figure out what I was going to put on the shield. I wanted to be able to use this with arduino clones that may not have the 3.3v output available. I used a LM1117 voltage regulator to drop the voltage to 3.3v. I also needed a 4050 chip that would drop the voltage down from 5v to 3v on the digital pins. The LCD runs on 3.3v so the voltage needs to be dropped down from the arduino. There is also a 100ohm resistor for the backlight. Also wanted to be able to bypass and not use the Ethernet cable if I wanted to so I added some female headers to connect the LCD directly.





Arduino – 4050

D8 – Pin5
D9 – Pin7
D10 – Pin9
D11 – Pin11
D12 – Pin14

I then took the output pins from the 4050 and connected them to the female header. After hooking up the LCD everything was working.

Adding the Ethernet jacks.

Now that the shield was working I needed to add the Ethernet jacks to the board and the LCD. I picked some of these up from mouser. These have the pins tailed out of the back, which is what I needed to be able to solder to them. I ended up hot gluing the jack to the shield. There was really no other way to keep it on the board. After the jack was on, I solder all the connections to the Ethernet leads. This is not for the faint of heart. There were a few times I bridged the pins and it took forever to get them desoldered. I would not attempt this unless you have a nice small soldering tip.



I tested all the connections to make sure they were all good. After that I put a layer of hot glue down to keep them from moving and possibly bridging.

Here is the pins I used for connecting them to Ethernet. (568-B Cable)

Ethernet – LCD

Orange/White – SID
Orange – SCLK
Green/White – A0
Blue – /RST
Blue/White – /CS
Green – 3.3v
Brown/White – GND
Brown – Backlight

I picked these pins because of how I was able to place the Ethernet jack on the LCD. The /CS pin which was the 4 in from the right, when bent down, fit directly in the hole for the LCD. The rest followed suite when picking placement. This was also a PITA to solder and took some time. After getting those all soldered in and testing the connections, I hot glued the connections like I did on the shield. After plugging it in, everything worked.

Thanks to ladyada for providing awesome documentation on her projects.

Back from Toorcon12

Posted in Badge, CONs, Hardware by C4 on October 26, 2010

I’m finally back from Toorcon after some flight delays. I had a good time. Met some cool people and saw some good talks. One worth mentioning was Dan Kaminsky’s talk on DNSSEC. He brought up some good points on how DNSSEC could be the “answer” we have been searching for, for secure email. (and other things) Another awesome talk was about Session Hijacking. Although this isn’t a new topic, Eric Butler and Ian Gallagher did release a pretty badass tool called firesheep, which I will be talking about in my next post.

The Badge

Before Toorcon I was under the impression that the badge would be an electronic badge by the guys who made the Defcon Ninja Badge this year. (cstone and woz) After emailing them a couple days before, I was informed that due to some time constraints it wasn’t going to happen. They might possibly use it for another con in the future.

The actual badge was some laser cut acrylic (possibly from metrix?) in different colors for various types of attendees. They were shaped in the Toorcon gear logo.

They announced they would have a badge hacking contest and provided some parts to solder up cool stuff to the badge. I apparently didn’t get the memo they would be providing free (as in beer) stuff to do some hardware hacking on the badge. So I took a trip on the bus to the closest radio shack and bought some LEDs and stuff.

I really wanted to find/buy an ATmega (168 or 328) to put on the badge but I couldn’t get a hold of one. By that time I had already put in the LEDs, 9v bat, and LM7805 voltage reg. So I looked around the table and found an NE555 timer chip. My theory was to blink the LEDs on off in a sequence. After spending a ton of time trying to wire the thing up with the proper resistors and capacitor I ended up giving up and just wiring them up. Either the chip was bad or I messed up on the resistors/capacitor and the timing was just really fast so it looked like it was constantly on. Here are a few pics:

I had to leave a bit early to catch a flight home, so I didn’t get to a few talks I would have liked to see. (woz’s “Hardware will cut you.” And Joel’s “LANrev’s Multiple Vulnerabilities Come to Light”)

Oh, I did meet someone from “Square” which makes software (and a small device) for doing credit card transaction on your iPhone or iPad. He ended up giving me one.

I might trying playing with this a little bit when I have some spare time.

Apple TV and openelec.tv

Posted in Hardware by C4 on October 22, 2010

I mentioned in my last post about trying to find and ultra cheap streaming media box. I did some research and found that most of the devices that I looked at (that would be good for this type of application) were a bit too expensive for my taste. I like cheap solid solutions.

I have been running XBMC on Apple TV for a couple of years now and really like it. However, recently it’s become a bit slow and sluggish when keeping up to date with the newest versions and releases. I planned on putting together a custom distro so that it didn’t have the bloatware of the ATV OS running underneath the XBMC since I never use it. I came up with an analogy to explain the dilemma to my GF.

Imagine you have a t-shirt (XBMC) and you like to wear that t-shirt all the time. But in order to wear you t-shirt you have to first put on a sweat shirt (ATV OS). So every time you just want to wear the t-shirt you need a sweat shirt on under it, vs just being able to put the t-shirt on directly.

After doing some searching on a lightweight distro, I found that there was already a project with the same goals, Openelec.tv. Open Embedded Linux Entertainment Center is a distro that is aimed at using a minimal linux install to boot directly into XBMC. They have options for installing it to a flash USB drive, compact flash, or directly to your HDD. It also has an ssh server (from what I read) to enable remote access and configuration.

Apparently the current generic imaged worked right out of the box with the ATV (minus some IR and wlan/lan drivers) using the atv-bootloader. They are now going to release an image for the ATV with all the drivers included. The release was scheduled for (10/15) but was pushed back to possibly today (10/22). It has not been released yet on their site but I suspect it will be up there soon. (within the next few days) According to some of the people beta testing it, it boots really fast. They also mentioned that it works really well and is also expected to include for support for CrystalHD. For anyone who doesn’t know, CrystalHD is a card that is installed in the ATV (replaces the WLAN card) to provide HD support for the Apple TV. You can find more info here. I like and use the wireless N all the time, and most of my content isn’t HD so I won’t be using that option on my setup.

I will be doing a writeup of installing and configuring this new distro when it’s released for the ATV. I may also buy a few more ATVs to install and sell them for people who want the application but don’t want to go through the work of setting it up.

Now, on my way to toorcon…

Toorcon 12, PHP, and blah

Posted in CONs, Hardware by C4 on October 21, 2010

I will be going to Toorcon 12 tomorrow. I have never been to a San Diego or Toorcon, so this will be a first. It looks to be a pretty good line up of talks this year. In order to get back on Sunday I have to leave a bit early so I won’t be able to catch all the talks on Sunday.

I was also asked this week to write a few PHP functions. And while I didn’t do so hot on the spot, I did find a good way to accomplish the task. The question was: write a function to return true or false (or print) if two elements in a given array SUM to be 100. The first function is really slow, but more of an answer if all else fails type of approach.

$RandomArray = Array(74,122,103,125,80,29,127,123,35,33,142,91,
95,36,12,57,115,103,15,58,150,133,73,143,96,48,81,18,63,10,134,
30,30,28,88,25,30,84,40,27,102,136,32,93,115,132,55,142,68,60,
128,30,128,31,115,28,93,24,2,53,98,23,129,145,3,114,36,108,63,
60,70,97,66,26,28,64,62,96,104,114,5,7,121,4,145,62,38,115,112,
128,92,142,45,136,2,6,47,9,25);
$RequestedNum = 100;

function Search1($RandomArray, $RNum){
 while($count < count($RandomArray)){
  $count = 0;
  foreach($RandomArray as $Num){
   if($RandomArray[$count]+$Num == $RNum){
    echo $RandomArray[$count] . " + " . $Num . " = " . $RNum . " : True";
    break 2;
   }
  }
 $count++;
 }
 if(count > count($RandomArray)){
  echo "No match found :  False";
 }
}

The second one is a bit quicker and uses the built in function in_array();

function Search2($RandomArray, $RNum){
 asort($RandomArray);
 $SortedArray = $RandomArray;
 foreach($SortedArray as $SA){
  $findNum = $RNum - $SA;
  $Success = in_array($findNum, $SortedArray);
  if($Success == True){
   echo $SA .  " + " . $findNum . " = " . $RNum . " : True";
   break;
  }
 }
 if($Success == False){
  echo "No match found :  False";
 }
}

I’ve been playing around with the idea of an ultra cheap (sub $100) HTPC with XBMC running on it. Most boxes that would be suited for this are > $100. I’m looking around at some devices that might be able to run as a cheap media streaming box for those extra TVs you might have sitting around in your room/basement. Most of my focus has been towards Nettops and Thin Clients. I also found a cool project of someone in England porting it to a beagleboard.

This makes me want to get one and continue or contribute to his work.

Ice Tube Clock and Metaboard Kits

Posted in Arduino, Hardware, Metaboard by C4 on October 8, 2010

Last week I got the Ice Tube Clock kit for my birthday. (from my gf of course) I am pretty excited to assemble this over the weekend. The kit is from adafruit. You can find it here. It uses a Russian display tube, which is pretty awesome. Here is the kit after I took it out of the box.

Metaboard Kits:

Here is a few pictures of one of the metaboard kits I assembled. They were pretty easy to assemble and it took me maybe 45 minutes with distractions.

I haven’t got the chance to burn a chip with the USBaspLoader bootloader yet. I would like to do some testing on these. I know that the sketches arn’t loaded using the Tx and Rx pins on the board. This also limits you to no serial monitor output. I’m not sure if you can use soft serial to accomplish the same thing. This would be a big bummer for doing actual development, since that’s a major debugging feature.

SF trip, Ninja games, and Metaboards

Posted in Badge, Badge, Hardware by C4 on October 7, 2010

I got a chance (for the first time) to go to San Francisco this past weekend. I met up with some friends from college and did some touristy stuff. One of the cool things I got to do was visit Noisebridge (SF hacker space) which was throwing a party. I was cool seeing another hacker space and seeing what other projects people were working on.

While in the city we rode a lot of metro transit. By the end of the weekend I had a pocket full of tickets but I found one to be interesting. The “muni” ticket felt a little bit different. After taking a closer look it was an RFID ticket. I haven’t gotten a chance to play with it yet or read any data, but I will this weekend.

Badge Progress

I started writing the code for the badge. Without spoiling it too much I will have a few integrated games. The coolest one being a ninja game. That’s all I’m going to say.

The Metaboards also apparently came did come in today. I got a package notice when I got home from work. I will do a post after I pick them up.

- C4

LCDs in, PCB Progress, and Testing

Posted in Arduino, Badge, Badge, Hardware by C4 on September 30, 2010 2 Comments

I have made some progress on the PCB layout. I have decided to take out the reset push button. It will have 2 headers that can be bridged to reset the badge if you need to, along with removing the battery. This will cut down a little bit on the costs. I am also going to remove the GND, TX, and RX pads I had placed on the bottom of the board. If you would like to send serial data to the badge you can do so through the FTDI header.

The LCDs came in yesterday. They are basically what I expected them to be minus with one thing with the pin assignment. I planned for this badge to be designed to have the ability to swap out the LCD for 16×2 char one with a backlight. The general layout for the 16×2 is 16 pins for connecting the LCD. The ones I got for the badge are 14 pins. I assumed that the 14 pin on would start in the same place physically on the lcd. (ie. pin 1 – 1) Well, the new lcds start the location of the first input pin at the 16×2 lcd pin 2. This shifts all the pins down by one and looks to make swapping the two types of LCDs very hard or impossible.

The package they came in looks like a brick of drugs, haha.

Comparison picture. You can see that the header pads don’t match up like I described.

I also started writing some menus and games last night. I am a little disappointed that there is no backlight, but they were pretty cheap and the ones with the backlight were 2 to 3 times more expensive. I will make sure the next version after these will have a backlight LCD.

Zigdunio and Arduino Uno

Posted in Arduino, Hardware by C4 on September 27, 2010

I got a chance to talk to Pierce from Logos Electromechanical this weekend at Hackerbot Labs. He showed me some of the new boards (1×3 series and high current arduino shield) that just came in from being manufactured. They look very cool. He also showed me a Rev. 3 board (not assembled) of the Zigdunio. He mentioned that he was getting a lot of interest so far from people around the community that want to integrate RF into their project without having to buy an Xbee Module and shield. It also looks like it has made it onto Wikipedia under the “Shield-compatible clones” section.

The Arduino UNO came out last week. The big difference in this version is the lack of an FTDI chip. It was replaced with a Atmega8U2 programmed as a USB-to-serial converter. Check out the new design and more about the features here. Adafruit had it on their “Ask an Engineer” episode this weekend too.

I have a lot of projects going on right now and one of the biggest annoyances when working with electronics is dangling wire from a board to the breadboard. I have seen some starter kits that come with an acrylic base that has an Arduino and a breadboard mounted to it. I decided to make my own and it turn out pretty well.

I also got to see a 1 watt blue laser diode this weekend which was pretty awesome. Here’s a pic with the lights off and a smoke machine going.

On a last note, I put some more information down about an event that’s coming up in Kalamazoo, MI. I am putting together a little hardware workshop to build and give away Metaboard kits. The Kits are mostly compatible with the Arduino platform and are insanely cheap. More information on that here.

Next Page »