Saturday, May 18, 2013

Project Log 2013 - Temperature to Thermostat Part 1

It's finally time to start my little electronics log. Unlike a fancy blog this is just a way for me to jot down a bit about each project I work on. Honestly I have no idea what to expect--in fact because life was so busy I gave up on blogging anything at all (it's really just for me and some friends anyway).

This blog is all about learning curve. I'm a decent programmer but I'm just getting a handle on assembling electronics. Fortunately there are now wonderful toys, er, tools to make my life easier!

We've gone from this:
 [Source: 1977 Radioshack Catalog, Page 154]


To this:
[Source: Adafruit, Arduino Uno R3]

[Source: Adafruit, Raspberry Pi]

Now, I don't mean that the fundamentals are all that different--but now very advanced computing tools are cheap and incredibly small. And also, they're getting pretty easy (lego-like) for both professionals and hobbyists to play with.

So, when I was a kid I played with electronics. Today I'm relearning some old stuff but also lots of new stuff. I have at more appreciation of the technical details today since I've been working with technology most of my career now. It's very exciting to actually hands-on with the physical stuff that uses electricity and spits out both raw electricity and data.

One of the things I have for my test projects is an Arduino Uno R3. My second ever project was to build a thermometer with the Uno microcontroller, a 74HC595 shift register, a TMP36 analog temperature sensor and some LEDs.

The thermometer was super easy to put together for prototyping. To get an nearly instant start I used the Adafruit tutorials "TMP36 Temperature Sensor" and "Arduino Lesson 4. Eight LEDs and a Shift Register". The fun really came in writing the code for it... I was now writing code for something I'd "built" myself (even if by "built" I meant assembled kind of like Legos).

My second project with the Uno
Everybody actually got a kick out of having the project on display--especially because we all love arguing about how hot or cold it is in the house. The LEDs range from about 62°F to 76°F. Note that since I like it cool in the house the first red LED represents ~70°F. Heh.

Here's the circuit diagram. Ridiculously simple but I was very excited at the time!



I'm not going to go over the prototype more now. I have no doubt I'll show breadboarded circuits with my Uno in the future. Also, I'll show you the code for the thermometer project later on or you can check it out [here].

Right away I knew I wanted to use thermometers for a few things. First was just to have my own home-made thermometer I could set around the house. The next was I'm about to build a peltier cooler for my computer and I want to be able to turn it off and on with either a switch or a thermostat (which of course requires a thermometer). I'm also interested in creating wireless data collecting devices--more on that later, too.

Of course it's one thing to have a breadboard soft-wired to an Arduino. It's even more something else cooler to have a more compact microcontroller and all the circuitry soldered. Something I could attach everything to and mount in a project case.

Enter the Menta [got it at Adafruit]:

My Menta, after soldering all the pieces onto the board
The Menta was fun to put together. You get a PCB board and you solder everything onto it. Plenty of room for stuff on the Arduino-style headers (the Menta uses a standard Arduino ATMega328P chip with a custom bootloader written by Adafruit).

Here's some of my rustic assembly and soldering skills at play (scary):


Pro-Tip (this took me a few minutes to figure out):
When programming for the Menta using the Arduino IDE (as of when I'm writing version 1.0.5) you need to set the board settings (under the Tools menu) to "Arduino Duemilanove /w ATMega328".

Now that I have the Menta assembled and tested out (I lived in constant fear of whether I'd soldered everything) it's time to make the thermometer.

Actually, I'm leaving a little room on this project board to both display the temperature and switch a relay to turn other things on/off depending on temperature. I plan on using the headers so I can maybe modify what I do with this board... but basically this Menta is all about temperature. I may add a SD card board later so I can data log the temperature.

For Part 2 I'll discuss a bit more about the actual project and go into a bit about the display I'm going to use.