Archive

Archive for September, 2009

The Left Behind Series

September 27, 2009 Leave a comment

One of the best series ever written. LaHaye and Jenkins did a wonderful job putting the events leading to the end of mankind into story context. Whether you know your bible or not, this is an excellent story. These writers have taken the bible and brought it to life through their eyes. This story really begins with the book titled The Rising. Then there are two others that lead you into the 12 book series of God coming back for his people and the end times with the seven seal judgements and all the rest. If you are looking for a book with plenty of suspense and action…read these books! They are great! I do not want to go into the story in fear of giving something away, but Rayford Steel is an unbeliever on a flight one night when his whole world gets turned upside down along with ever other non believer.
Wonderful books. I will be purchasing them all and reading them again. 5 stars, a must read in my opinion!

Advertisements
Categories: Books

Tweetidor – the humidor that tweets

September 16, 2009 2 comments

I know what you’re thinking.. “not another device that tweets something!” Yup, another device that tweets something. This time it’s a humidor and it tweets that status of it’s relative humidity and temperature levels. For cigar aficionados, this means a lot. In order to keep your cigars “fresh” for any amount of time over a few days, they must be contained in an environment that is controlled with the perfect amount of relative humidity and temperature levels. The purpose of this is so that your cigars don’t dry out or get too moist which would amount to a terrible smoking experience. The Tweetidor uses a digital precision relative humidity and temperature sensor (SHT75) along with the arduino.

I am collecting the data and storing it into a mysql database, as well as “tweeting” it’s status every hour. I’m taking the data collected and creating graphs and gauges using google’s chart api. You can follow the Tweetidor at http://twitter.com/tweetidor. You can also view the graphs and historical stats of the Tweetidor at http://longashes.org/tweetidor. The following article will go into as much detail as possible about how I created the Tweetidor, the problems I faced, and where you can go to make something similar yourself. You can send any questions, comments, etc. on the project by sending an email to tweetidor@gmail.com.


Step 1: Purchasing the hardware

The first step is to understand what to buy and why we are buying it. You will need the arduino hobbyists platform, a sensirion humidity sensor (the SHT15 or SHT75 are the best choices), jumper cables, soldering iron, solder, a USB cable, and possibly a multimeter and bread board for testing purposes. You will also need a PC for the arduino to communicate to and from.

The arduino is an open source hardware platform for hobbyists. You can use it to interface with a large variety of electronics from LEDs to sensors. This is the meat of the project and is what allows the sensor to communicate with the PC. You can learn more about the arduino here: http://arduino.cc/. You can purchase the arduino for about 30 bucks but there are other versions that costs less or more depending on the options you get.

arduino

The sensor is what does all of the work, it’s a very complex electronic humidity/temperature sensor based on I2C technology and works similar to a 2 wire solution. The first sensor I bought was the SHT15 breakout board from sparkfun and was really easy to work with due to it’s size. I ended up shorting something out and I’m not sure how; after my buddy helped solder it for me, it no longer worked. I ended up having to buy another one and went with the SHT75 since I thought it would be easier to deal with. I was only able to find it at Newark’s site. It was A LOT smaller than I had first thought and slightly harder to work with than the SHT15. Both sensors are pretty much the same model but with slightly different designs.

sht75

The other items are pretty self explanatory: the usb cable is used to connect the PC to the arduino, the jumper cables are used to interface the sensor chip with the arduino, and the breadboard/multimeter are used for testing the interface between the arduino and the sensor chip.

Here are a few good places to get these items from:
Sparkfun This is where I bought my first Sensirion sensor and the rest of my stuff (arduino, breadboard, etc.)
AdaFruit Industries This site is a great resource and store to purchase the arduino and “shields” to attach to it.
Newark This was the only place I found that was selling the SHT75 version of Sensirion’s sensor.


Step 2: The software

The arduino platform has it’s own IDE that works on Windows, Mac OSX, and Linux. You can download these from the arduino.cc site. You will need the arduino software for your OS.

Once you have the ardunio software installed, hook up the arduino to your PC and make sure it connects correctly. After you have verified that the ardunio connects, try uploading one of the test projects that comes with the download to verify some basic functionality of the arduino (LEDs, etc.).

I won’t lie when I say that the majority of the code that pulls the humidity and temperature from the SHT75 for the Tweetidor is actually code written by someone else. There has already been a few people who have interfaced this sensor (mainly the SHT15 but it’s basically the same thing) with the ardunio and other microcontrollers similar to the ardunio, so there is no need to reinvent the wheel. Of course, the cigar related code, graphs, tweeting, etc. was code that I had to write/piece together else where and I’ll go over that a little bit later. You can download/look at this code at a couple of sites. Go ahead and grab the code at these places since you will need it when you start your testing.

You can find some helpful code at the following links:
http://www.glacialwanderer.com/hobbyrobotics/?p=5
http://www.practicalarduino.com/news/id/211


Step 3: Initial Testing

There really isn’t much to the overall connections between these devices. The SHT75 has 4 pins. The first is for the serial clock, the second is for power, the third is for ground, and the fourth is for data. There are already a few guides online which describe how to connect the sensor chip to the arduino. Based on how the variables are set in the code you are using, you would connect the serial clock from the SHT75 to the digital pin “11” on the arduino, power (or VCC) from the SHT75 goes to the 5v power pin on the arduino, ground from the SHT75 goes to the ground pin on the arduino, and the data pin on the SHT75 goes to the digital pin “10” on the arduino. For this step we won’t be soldering anything. Simply connect the pins/holes to the arduino using some jumper wire and a breadboard if necessary. Never turn on the power to the arduino until you use a multimeter to test resistance or continuity so you can identify any shorts or cross overs.

tweetidor6

Once things are connected and you are sure there are no shorts, etc. you can now upload the code to the arduino that you downloaded from the earlier step. If you are using the SHT75 as opposed to the SHT15 you must enable the arduino’s pull up resistors, you can find out how to do this on the main arduino site (basically set the data pin to HIGH on input). If you connected everything correctly and the code is properly updated, you should be retrieving the humidity and temperature levels now!!


Step 4: Connecting things together

Once you are done with your initial testing and you are satisfied with your end results you will want to connect the wires permanently to the sensor chip. You should use solder to do this. I will first go into what I did with the SHT75 and then briefly talk about the SHT15. I unfortunately broke the pins off accidentally because I have shaky hands and I’m very impatient so I had to solder the cables to the actual pads where the pins used to be connected. I don’t suggest breaking the pins off like me, learn from my mistakes. 🙂 There are also 4 tiny holes above the pins that will pick up electric current as well. I don’t suggest using these either, unless you have to (ie. one of the pads breaks off while soldering a cable to it).

Once you have the pins/cables soldered, you will want to test everything again before making the connections more solid. When you have tested them again, making sure you still retrieve the humidity and temperature, I suggest wrapping each individual pin with heat shrink wrap, hot gluing the connections, then wrapping the overall connections with another piece of heat shrink wrap. During each of these steps I stopped before I got too much further and tested out the program again. You don’t want to end up with solder, glue, and heat shrink wrap and then find out that it doesn’t work since you probably won’t be able to tell which step caused an issue. I also put color coded heat shrink wrap around each individual wire so I knew which cable went to the corresponding pins on the sensor.

tweetidor1 tweetidor7


The SHT15 is a lot easier to work with and you have a couple of options there as long as you buy it in the breakout board from sparkfun.com. The breakout board from sparkfun.com makes it really easy to get access to the pins by use of four holes. You could solder some pins on these holes and leave it connected to a bread board, solder some pins on and then solder some wires to it, or solder some wires directly to the holes. Anyway you do it, would be a tad easier than the SHT75. The SHT75 is a little cheaper and the relative humdity on the SHT75 is a tad bit more accurate, so these are the plus/negatives to each sensor (the SHT15 is 2% accurate whereas the SHT75 is 1.8% accurate).

Now you are on your way to placing your Tweetidor into your humidor! The next steps will focus on presentation and what I used to display the graphs, etc.


Step 5: Presentation

Now that we have everything together, we could technically just sit the arduino in the humidor and be done with it but a few problems arise from this. For one, it doesn’t look very appealing. Other problems also arise including, how are you going to get the usb cable or wires inside the humidor and be able to close it, and also you run a risk of distilled water being spilt on the arduino, someone crushing it, or the wires coming lose. I came up with a few hokey ways to prevent these from happening (I’m not a very good handyman, I’m a computer geek) but you could probably devise your own methods.

The first step is to figure out if the arduino will sit outside of the humidor or in it. I put it in there so I didn’t have it sitting out and running the risk of it getting knocked over or grabbed at (I have 4 kids, 3 of which are 3 years of age and under). I found out that the arduino fits perfectly inside a marlboro cigarette box (not the soft pack) so I decided to use this as my “case”. I may paint it later or upgrade to something more durable but this definitely gets the job done. I poked a hole where the USB port is, and a hole on the top so the sensor sticks out. This also allows me to stack cigars on top of this too. I really need to get a larger humidor for this project but I’m poor, homeless and addicted to crack so I can’t afford one (ok I lied about all of those but I do have 4 kids like I mentioned earlier so money is pretty tight).

tweetidor13

Since the USB cable is pretty thick, it won’t shut in the humidor correctly. At first I tried cutting a tiny notch on the side of the humidor but that wasn’t good enough. I ended up deciding to drill a hole in the back of the humidor, stick the USB cable through that, then I used weather caulking around the cable to seal up the hole to keep my precious humidity at an acceptable level (it seems to stay at 67% right now which is pretty good).

tweetidor10

Overall, this method worked out the best and from the outside of the humidor you just see one cable coming out from the back and going to my PC which has a wireless card in it to connect to the internet. The caulking job isn’t the best (again, I’m not a handyman) but still looks pretty decent. You can pretty much do a million different things here to set it up, the arduino also has tiny holes so it can mounted to something inside the humidor too and I might do that once I get a larger humidor. My next project may be to call upon my father in law to build my own cabinet humidor.


Step 6: Connecting the Tweetidor to the web

You can actually tackle this several different ways but the one thing you will definitely need is an interface to communicate to the serial console that the arduino is interfaced on. I used a perl library I found online which worked out nicely. My Tweetidor’s PC is an old 500 mhz with 256 megs of ram, a 10 gig hard drive, and running Ubuntu 9.04 server edition. I used code similar to this: code.

Once you have the arduino talking to the PC using some sort of serial console library like the perl one above, you can output that data to a text file and manipulate it however you’d like. You could set up a cron job or schedule to mail you, tweet you, or collect the data into a database and graph it out like I did. If you want to create graphs and gauges from a database, the easiest and most visually appealing (in my opinion) is the google chart api which is what I used. It’s pretty easy to create and manipulate to what you need it for. For the database, I used mysql for the database and the php twitter api for twitter. I set the Tweetidor to update my database and twitter every hour. If it gets below 60% humidity it alerts me with a “wife alert” saying the humidor has been opened and it also alerts me if the temp/humidity gets too high. I’m probably going to set twitter to update every two hours instead so it doesn’t bother me as much.

So there you have it. Pretty simple once you understand the basics and it’s not entirely too expensive to do. I’ve heard of someone else buying something like this premade and they payed over 700 dollars for it!! Again, you can email me at tweetidor@gmail.com with any questions or comments. If you are feeling sorry for how slow I am or you think the project is cool, you can also donate money if you’d like. 🙂 You can donate by clicking here: Donate!

You can transform your old school hygrometer into a new advanced digital precision hygrometer in no time! Thanks for your time.

tweetidor11 tweetidor12

Categories: Projects Tags: , , ,

Camping… FAIL

September 6, 2009 4 comments

I planned a trip to the red river gorge with some friends. Things didn’t go exactly as planned, in fact, almost everything that could go wrong did go wrong. Even more so, even things that you would think couldn’t go wrong did. We did have some fun, but overall the trip was a dud and it needs to be redone right, so I’ll probably plan another trip very soon that I hope should go right this time. Either way, the following is a list of the highlights including all of the FAIL moments.

Step 1: Get a large group of people together to go camping… FAIL

I invited about ten or more people and we ended up with five people, one of which couldn’t even stay longer than one day. Most people had to work, watch kids, or just plain bailed out at the last minute.

Jackass #1: This guy just plain bailed on us

Jackass # 2: This guy had to work, nice bloody excuse…

Jackass # 3: This guy also had to work, pfffft, yeah right!!

Other Jackasses not listed in picutre: Joey and Brian

Step 2: Leave on time!! FAIL

The most important part of camping is leaving on time to set up your campsite, finding the right campsite, and actually DOING something the first night you are there. This all failed miserably. We didn’t actually leave Ohio until 5:00 P.M. because we were lazy, unorganized, and had to run extra errands that were not originally planned (AHEM.. Erick). We didn’t even get to the campsite until 10:00 P.M. This was AFTER parking in a campsite we thought wasn’t taken but was, being stopped by a ranger, and getting stuck in dirt and having to use four wheel drive to get out. Putting up tents in the dark sucks!

Step 3: Properly load up the camping gear on top of the car… FAIL

That’s right. We’re stupid. We loaded coolers, sleeping bags, and supplies on top of my SUV but didn’t use the racks. By not using the racks, we caused a dent in my SUV’s roof. We had to stop along the way in to unload everything on top, pop out the dent and use the racks like we were supposed to in the first place.

Step 4: Find the right campsite (more on this later) FAIL:

Not only was it dark because we got there late, but our campsite was basically a field with nothing but HUGE weeds/flowers which made my allergies kick in full gear. We had to hack down tons of them to even clear the path. There was no fire pit, and the ground was so hard that we couldn’t even get the stakes into the ground for the tents so we had to just weigh them down with coolers and other things.

Step 5: Don’t forget anything…

I forgot a lot of things, as did everyone else. We had to buy a bunch of stuff from the local gas station/convenient store. Not only did I forget stuff at home, I forgot to grab a bag of ice that I bought from the convenient store that night! FAIL

Step 6: Don’t go hiking with someone who is sick

My friend Erick was so sick that he complained the ENTIRE time we went on a trail. Every little hill, bump, step, rock, twig, bug, etc. was a nusance to him for some reason and he had to let everyone know about it at ALL TIMES. I think I might have almost puked once at the amount of complaining he was doing. Erk… it wasn’t THAT bad! Also, you don’t need to wash your hands after getting dirty dude, it’s frakking camping!!

Erick resting for about the 20th time (I stopped counting)

Step 7: Don’t camp on private property!! FAIL

We didn’t know it was private property, but the ranger and sheriff sure made an effort to show up and tell us. This is when the camping trip ended. Apparently we were on private property and they told us that we had to move our camp site somewhere else. Yeah right, we were not about to take down EVERYTHING, load it up, try to find a campsite (all were taken anyways), unload everything again, and set up camp AGAIN in the dark like the night before. Getting the camp site set up at midnight with enough time for a 1 hour fire and roasted hot dogs is not my idea of a blast, especially on the last night we were supposed to be there. Also, the sheriff gave us a hard time. He was trying to find drugs on us which we did NOT have. He found some little white pegs that went to a camp chair and asked if they were pills, smelled my tupperware salt/pepper shaker asking if there was drugs in it, and accused us of drinking (which we were going to do but hadn’t done so yet).

Apparently salt and pepper are abusive drugs now:

Thus ends the camping trip. We had to stop to fix the load on my car, we were late, had to set up our tent in dark, camped in an nightmare area for someone with allergies, camped on private property
and kicked off by the police, had friends bail on us, friends who complained on hikes and were clean freaks during camping, forgot stuff before and during the camping trip, and to top it all off I didn’t get to drink any beer or smoke a cigar!! Though the camping trip sucked there was a few good moments when we hiked in the gorge and scaled a large rock/mountain formation called the indian staircase. All in all, I still got to spend a small amount of time with friends away from society for a day or so and got to do some hiking I wouldn’t normally be able to do with the kids around. Below are a couple of pictures from the highlights of the trip:


Here is a link to the full album: http://www.flickr.com/photos/wolfspirittt/sets/72157622270226242/