Friday, December 21, 2012

Aluminum Speakers

Related to my 2nd clock project (as yet incomplete), I machined and built a couple of aluminum speakers:





Some machining pics in the early stages:





Lamp Project Result

I finished this lamp some time back but did not get around to showing the final result.  Well here it is:




Temperature Logger

This past year I've starting brewing beer and a recent addition to this hobby was a fermentation chamber - which is essentially a temperature controlled chest freezer:



This temperature controller can control both a cooling source and a heat source.  I use a FermWrap attached directly to the carboy as a heat source in winter.

To make this project a little more fun I decided to add the ability to monitor the temperature remotely via internet and to keep a historic log.  I used the Arduino platform coupled with Cosm.com to manage the temperature logging.  



This aspect of the project is pretty much superfluous in terms of producing good beer but it was fun nonetheless.  Also, the temperature logging portion can be leveraged to just about any application, be it monitoring your home temperature or whatever.

This project is relatively simple compared to most Arduino applications, but there is a bit of a learning curve.  If this is your first Arduino project, I recommend you go through some of the basic tutorials provided to gain some familiarity.

Cosm.com

Before we get into the hardware and programming, let me quickly introduce you to cosm.com.  I initially was going to use this complicated approach involving writing to a Google spreadsheet, etc. but then I found this website that was designed for exactly this kind of thing.  Cosm allows you to upload feed data to their servers and then you can access it remotely, monitoring and graphing it.  You can also set alerts, etc.  Here is an example from a recent fermentation:


I added a few annotations to the top graph.  You may note that I also have two monitors for "Cooling state" and "Heating state".  These are not plumbed physically yet so the data is not real.  They were intended to indicate when the heater or cooler turned on.  The functionality is in the included code but you would need to add some additional electronics to enable this.

You can take a look at my live own temperature log here (assuming I have something actively fermenting):


Hardware

This is not an especially cheap project.  We're talking, maybe $80-$90 shipped.  But once you've made the investment, you can use this equipment for any number of applications.

Parts list:
  1. Arduino microcontroller, ~$21
  2. Arduino ethernet shield, ~35
    • You could use a wireless shield but they are more expensive and the programming will be slightly different.  I elected to use the wired ethernet shield.  If you don't have an ethernet port nearby you will also need to procure a wireless access point or just splurge for the wireless shield (again programming will be slightly different).
    • http://store.mp3car.com/Arduino_Ethernet_Shield_R3_p/opn-014.htm
    • And you'll need an ethernet cable, of course
  3. +5v power supply, ~$6
  4. Waterproof temperature probe, DS18B20, $10
  5. ~4.7k resistor
    • Should be able to find from Radio Shack or any other electronics supply store
Assembly:

Assembly is very simple.  Piggy-back the Ethernet Shield on top of the Arduino as shown in the photo above.  Connect the 4.7k resistor between the +5v pin (Vcc) and pin 8 of the Arduino using some wire.  Connect the DS18B20 temperature probe pins as follows:

Pin 1 - to Arduino GND
Pin 2 - to Arduino pin 8
Pin 3 - to Arduino Vcc (+5v)

Connect your power supply to the Arduino and the ethernet cable to the ethernet shield.  I personally taped the temperature probe to the outside of the carboy, adding some foam insulation over the top.  This placement is a highly debated topic (vs. inside a thermowell or in the beer itself) so you can put it wherever you want.

Programming

I imagine the Arduino will come with some instructions but you can find pretty much what you need here:


You'll need to access the download link to obtain the software for programming the Arduino.  You'll also need a USB connection to your PC to program the thing.  I won't go into all the detail - it's covered in the link provided.  But here are a few notes:


To enable the temperature logging, you'll also need to set up your own cosm.com account and feed.  You'll also have to modify my code slightly to match your specific details:
  • Replace the feed ID with your own
  • Replace the API Key with your own
  • Replace the Ethernet Shield MAC address with your own (should be supplied with the Ethernet board)
  • I used DHCP for the ethernet address assignment.  If you use a static IP address you'll need to modify it.

Now, to program the board:
  • Set up the Arduino IDE software to your particular Arduino board (Tools/Board)
  • Load my code with your own customization as described above
  • Compile the sketch then upload to the Arduino
  • To see debug info, make sure the serial port settings are set to 9600 baud (Tools/Serial Port)
  • One everything is working properly you can remove the HW from your PC and place it in your fermenter environment.
Feel free to shoot me any questions you might have.