Temperature and Humidity Sensor Project Part 1!

I’ve raved about these guys many times in my past posts, and it continues! I got another order in today from Dipmicro. They consistently ship out by the end of the next day and the goods arrive three days later for me (standard, $3 shipping). Considering my increasing intolerance for eBay and things going through customs, finding this company is gold to me. Check them out if you’re in Ontario.

IMG_20140109_161539So what goodies came for me today? The purpose of the order was for the temperature/humidity sensor. I started thinking that the air was getting dry in my house recently (I woke up on new year’s day with a nosebleed) so I wanted to monitor it. That’s where the 7-segment displays come in. Of course, I was drawn into the LED section again and so I started thinking of another revamped light show. I will be experimenting with some shift registers, along with 20 new RGB LEDs. I also picked up some resistors, capacitors, and a couple of prototyping boards now that I’m not afraid to use my soldering iron.

Now back to the temperature/humidity sensor project. The original plan was to make a small module that I could kind of “plug and play” since I only have this Arduino Mega which will be shared between this project and a new light show. I want to be able to plug it back in at any time, reupload the code, and see the values read out on the 7-segment displays. Since I had some time restlessly waiting for the shipment to come in, I decided to try writing a Visual Basic program that would do the same thing as the 7-seg displays.

IMG_20140109_221229The set up was easy. There’s a tutorial on the Adafruit Learning System.

ConnectionLogThe program launches with this Connection Log window. It goes through possible serial ports until it connects to the Arduino. If it doesn’t detect the Arduino, the program just quits. Half of my time spent on this program was just working on error handling. If you’re in the main program and the Arduino disconnects, it will reopen this window and try to reconnect instead of crashing into a fiery ball of sadness. It gets a little wonky if the temperature/humidity sensor circuit is broken so you have to quit the program, and disconnect and reconnect the Arduino. It’s not the way I wanted to handle that error but that’s how things worked out.

interfaceThe VB program grew from a couple of text boxes into this, and I’m really happy with it. The only issue is that it’s laggy when you try to drag the window around, probably due to the amount of things I have it doing every second. It’s still usable, though.

debugThis is how the program started out. The Debug tab can be enabled in the File menu. It was just to test that I could send and receive between the Arduino. I didn’t really understand the concept when I tried this before so I was really excited when I got this working. You can bet this will be part of the new light show.

Now, there is a part 2 to this project, and that is the hardware. I want to put my new soldering iron to use in this one so I’m going to set up my two 7-segment displays on the protoboard along with the sensor and hopefully my original plan works out. I’ll post about that soon. Thanks for reading!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s