Sunday, June 17, 2012

Weeks 6-8: Extensive Testing and Fully Working

These last couple of weeks have been maddeningly busy, but this project has finally come to an end, and everything is in perfect working order.  I've kept my email notifier running for a few days now, making sure it wouldn't fail after some time and things would run well.  Nothing has failed, and everything is going swimmingly with it.  So, without further ado, I present you with the final project, fully-working and explained!

Enjoy, and feel free to leave any comments or questions for me that you'd like!




Link:  http://www.youtube.com/watch?v=5-KWQtCN7sM

Sunday, June 3, 2012

Week 5: In All it's Glory

So, this week has been monumental in the amount of things I've been busying myself with.  However, this has been a top-priority project for me, and I'm finding it quite relaxing to work on it!

As you may or may not remember, last week I wound up kind of jumping ahead and getting my entire server working.  Hooray!  Therefore; this week I was also a week ahead, which meant I was able to actually build the product!

Here's a still-image montage of what went down:

Here is the gathering of the tools and materials I assumed I'd be using.  Turned out, I didn't need a screwdriver or either of the resistors.  I'll explain in a bit.  Doesn't look like much yet, does it?







This is just a close-up of one of the RGB LED's I used.  They look a little funky, but they are really cool!!!










Then, I built the box!  The acrylic was already put together, I just had to cut some squares out of my plastic paper (to diffuse the light), then hot-glue them onto all the walls.  Now came the fun part.







Here is the completed circuit.  Yes, it looks messy.  That's because it is messy!  I never claimed to be an expert at this, but I got it all connected and condensed into a very small space.  I didn't have to use resistors, because both LED's use up almost the entire 5V that is coming from a pin at any given time.  No need to eat up any extra!



Here is the board glued in place in the bottom of my cube.  I used this to mark slots to be cut on the other panel!









Here, you can see the squares I cut out using a dremel tool.  No, they may not be factory-pretty, but they're functional.  This is moving along pretty quickly!








Here is the cube fully-assembled!  The two sides just slide right into place, and the board's connectors help to hold it all together.









Here is a close-up of the connectors.  As you can see, the box requires an Ethernet connection, along with either a USB cable or a 9V DC converter for power.  Since I'll have it in the corner of my room or office, I want it to feel as wireless as possible, so I've acquired a DC converter.





And there you have it!  Look a little silly?  Good!  It's already making my roommates jealous, and I haven't even turned it on yet.










In essence, this project is at a very high point in the completion cycle.  I have a lot of testing and tweaking to do, and I'll eventually upload a video of the product working to show for the final completion stage.  However, for now, I'll throw in a few images of it lighting up!



Of course, it's hard to capture this in a still image.  It slowly flows through the entire color spectrum, and it does this very smoothly!  Again, there should be a video available of this within the next week or two, as I get things finalized.

Sunday, May 27, 2012

Week 4: Local Server, PHP, and Enclosure Design

This week was very exciting, and I was able to get very far on the project.  I was able to finish getting my Apache server up and running, and early on this week had a PHP script running well.  Since I had this done so early, I decided to move ahead and begin designing my enclosure along with acquiring the parts that I'd need!

Here, you can see a model of what the end product will look like that I threw together in 3DS Max.  Pretty simple, right?  But what does the inside look like?




Well, the cube itself will be semi-transparent once it's built.  But as you can see here, it pulls apart quite easily to reveal the insides.  They are also simple.  This is my first project like this, after all!




Here is a closeup of the arduino board and it's circuit.  Of course there will be holes cut in the enclosure for cables, too.  The connectors on the board will butt right up against the wall of the enclosure, so all I have to cut in the enclosure's wall are squares large enough to allow the cables' heads.


So what's with the stupid box enclosure?  Why do those LED's have four pins stemming from them?  Why does it look like there are two arduino boards in that last picture?!  Relax, I'll explain now.

So what's with the stupid box enclosure?:
The cube itself is going to be an acrylic box which, as you can see, is made up of two pieces with three sides each.  This box was something I found at Hobby Lobby and was originally supposed to be a clear case inside of which you could put six photos (one on each side).  I've purchased some craft paper, which is more like a plastic, which is very diffused, yet light is able to travel through it well.  Basically, I will be covering the inside of each box wall with this plastic so that any light on the inside of the box will dissipate and spread out across all of the walls, making it look much cooler!  But why a box?  Well, to be frank, I think it will look mysterious and ominous.  When you see a random acrylic box serving NO purpose in the corner of a room with an ethernet and power cord sticking out of them, you almost HAVE to ask what it does.  This is exactly the type of gadget I like, and want to have lounging around my apartment/office space.

Why does it look like there are two arduino boards?:
The circuit looks a bit stranger in that last picture because I added a second board.  What this actually is is the Arduino Uno board on the bottom, and an ethernet shield for it on top with the LED's plugged into it.  Since my device will need to be connected to the internet, an ethernet shield will be needed!

Why do those LED's have four pins stemming from them?:
The LED's have four pins because they are actually RGB LED's.  What does that mean?  Well, it basically means that they have the correct chemicals inside to create any color of light within the color spectrum, or at least very close!  There is a pin for powering the LED, along with a pin for Red input, Blue input, and Green input.  It's very cool, and each time I get an email, I plan on lighting them up and having them ambiently moving through the entire RGB color spectrum.  Pretty cool, right?!



Aside from designing the thing, I've also rounded up all of the necessary parts, including solder for the LED's and hot glue for a few of the connections, just to keep them steady.  Hopefully by next week, I can show you how the final product actually looks!

Sunday, May 20, 2012

Week 3: Framework Code Completed

This week has been mighty productive.  I've managed to gain a further understanding of the code I'd be needing to run this project, and I've gotten it fully working (to my knowledge), and implemented!  Although I can't fully test the code at this point, I've already begun looking into how to set up a local server which is capable of running PHP so that I'll be able to finish up some PHP scripts for next week.  Once I'm able to run my PHP scripts, I should be able to test the code I've written this week to see if it actually pings my GMail account correctly.  Right now, it works like this:

- I have two LED's on my board.  One will light up each time I ping the server, which is based upon my delay time set of five seconds.  Essentially, every five seconds, I will call upon my PHP script and obtain the result.

- The script called will gather the total amount of emails in my inbox, as that is all I truly know how to do at this point.

- That integer value will be stored as 'num' in my code.

- I will then test to see if the PREVIOUS number I got (on the last GMail ping) is higher or lower than my current number, and then set the current number to prevNum.

- If the new number is higher, I turn on the other LED to indicate a new EMail in the inbox.  If the count goes down, I'll turn the light off.

Viola!


However, I do spot a problem with this.  The only way to turn my light off will be by deleting an email.  What if I receive an important email?  I may not want to necessarily delete it.  Well, I've recently found a PHP script which the owner claims, with a little modification towards your own setup, will gather only the count of emails with a "U" flag on them, or an unread flag.  This would be useful, as I could turn my light off after simply opening the email rather than having to delete it.  I would also only have to keep track of one integer pulled from the script, rather than two.  I'll be looking into this this week, and should have a fully-working example next week!

Sunday, May 13, 2012

Week 2: A General Understanding

I have spent most of this past week studying what, exactly, I'll need to be doing each week to get this project up and running smoothly.  I've watched at least a hundred videos showcasing what people have done with the Arduino line of microcontrollers and am very excited to get things started!

Besides looking at overall projects, I've also begun to look into the code for the boards.  Apart from some minor details, the idea of the programming environment, commands, and code as a whole, are all very familiar to me.  The C-like language is very understandable to me, and I've gotten many of the examples delivered with the development environment to work well with my Uno board, and even some examples to work well with my ethernet shield for the board.

So, here's what I've learned:
     - I'm going to need to learn some PHP.  This is one thing that is going to be VERY hard for me, and jumps out at me almost immediately.  I've never worked with any kind of web programming before, so I'll just need to set up a local server on my laptop capable of running a PHP script when I call it from my board, the main client.

     - I'll have a limited amount of pins on my board, so I have to figure out which pins are capable of what.  Remember, I'm a game programming student.  Microcontroller hardware is something VERY new to me and thank goodness I can get some help from a few students at my school.

     - It may be a challenge getting my local server to work with this project.  I am not considering setting up the server as a major goal of this project, because I've already found a program which will install an Apache server AND give it PHP capabilities all in one go, called WAMP.  The real trouble is figuring out how it all works!  However, I have heard that people tend to have problems when running this type of server wirelessly and allowing their ethernet-connected Arduino to connect with it.  I'm sure I'll be able to get it up and running.


Overall, I think I'm ready to begin programming for the microcontroller itself!  Hopefully I will be able to show that it's completed in next week's post!

Project Plan

I will be creating a separate post for overall work completed this week.  This is a post simply meant to demonstrate my general project plan for this project.  Enjoy!



Project Plan
Tate Marske
May 13th, 2012
Email Notifier


1.       Project Overview:

The Email Notifier is a project which is set to be completed in a total of eight weeks.  For the purposes of this document, the timeframe for completed aspects of this project have been split into increments of 1 week.  This document will provide guidelines as to how the project shall progress to become a complete, prototyped product within these eight weeks of development.


2.       Project Development Management

2.1   Organization and Resources

By structuring the project so that each week will have a clear-cut and reachable goal in the development process, I have eliminated the need for back-tracking or reconfiguration of product implementations and assets.  Each week, I will be completing a major portion of the project based on sturdy and reasonable milestones.


2.2   Personnel

In the case of this project, I am the only person who will be working on the Email Notifier.  Therefore, I will be responsible for all of the physical assembly of the product as well as the programming required to serve as the framework for this product.  Thankfully, I am following a general tutorial to help me set this project up and implement the code.


3.       Schedule and Milestones

Week 1:  Internal Hardware must be acquired. 
START – W1        END – W1

Week 2:  Internal Hardware studied, and programming language mostly understood. 
START – W1        END – W2

Week 3:  Framework code completed. 
START – W2        END – W3

Week 4:  PHP code completed and running on local server. 
START – W3        END – W4

Week 5:  Enclosure and external hardware acquired. 
START – W4        END – W5

Week 6:  Enclosure functional and all code working properly.
START – W5        END – W6

Week 7:  Bug tested and fully functioning code and hardware. 
START – W6        END – W7

Week 8:  Full product ready to present and all bugs worked out. 
START – W7        END – W8

Tuesday, May 8, 2012

Week 1 - Gathering both Knowledge and Materials

It's the end of week 1, and after having a bit of time to bounce back from some holdbacks I've had all week, I've at least been able to research a bit more about my project and figure out what products I need to get to start it off.

I've gone to RadioShack to pick up an Arduino board, and a shield for it.  I decided on the Arduino Uno Rev 3 model board for my base.  This board is simple, and has no more than I need.  I've also noticed that it has the largest consumer base, and so I know I can get more help for this board than any other online.  I also grabbed the Ethernet Shield for this board.  This will allow the Arduino board to communicate over the internet.  I'm going to need this if I'm going to be pinging my GMail account!  Other than these boards, I've also picked up some different LED's that I feel like I may need for testing.

I think I've got everything I need to get the ball rolling with this project, and over the course of this next week I can learn how to set up a local server which I can use!