Wednesday, January 21, 2009

Arduino Oscilloscope



If you are interested in electronics and haven't heard about Arduino yet then you should definitely check it out. I got a Duemilanove for Christmas and it's been great fun so far. Before I bought the Harmony 880 the wheels in my head started spinning, I was thinking about how I could use Arduino to make a Universal Remote. I found an article that discussed how to start making one and what the code would look like. Sadly I don't have an oscilloscope and don't plan on spending the money for one anytime soon either. With more wheels turning I researched making an oscilloscope with the Arduino and found another article on how to do this. So now I'll show you what I've done so far to create an Arduino Oscilloscope.

First you do need to have the Arduino IDE and Processing installed on your machine (both pieces of software will run on PC, Mac and Linux). Then go to the Poor Man's Oscilloscope post and download the .PDE file that holds the processing and Arduino code. Open that file with a text editor and copy the bottom section that starts after the line
          '// The Arduino code.'
and paste that into the Arduino IDE. Now you need to hook the Arduino up to the computer and upload the sketch to the board. If this is the first sketch you are uploading I would suggest buying 'Getting Started with Arduino' by Massimo Banzi (one of the creators of the Arduino Board). There is also a getting started guide on the Arduino website. Select your operating system on the left side and that will get you up and running.

Now you need to add your sensor to Analog Pin 0 and the Vin pin. If you are trying to make an IR Decoder for the Universal Remote project you will you the IR Phototransistor into the board.

Now close the Arduino IDE and open Processing. Start a new sketch and paste in the top portion of the code from the .PDE file you downloaded (This will be all but the part we used before). You may have to change the serial port number depending on what port your Arduino is plugged into on your computer. Count the number of ports above the one you are using to connect your Arduino (not including the Arduino port) and change the line that reads:
          'port = new Serial(this, Serial.list()[0], 9600);'
change [0] to however many ports are above the one you used in the Arduino IDE to connect to the board. Run the Processing sketch and it should show you a real time graph of the input. It would probably be a good idea to test the program by doing something similar to the video above. Insert an LED and turn the lights on and off to see if you get any movement in the graph.

That should be about all you need to know. Use the comment section to discuss how you modified this project or any other Arduino projects that you've been working on.

Tuesday, January 13, 2009

Logitech Harmony 880


If you don't know the Harmony is Logitech's line of Universal Remotes. I found a Harmony 880 refurbished on Amazon.com for a decent price. The 880 features an LCD screen 4 soft buttons and plenty of hard buttons to control all of your normal remote features (numbers, play, rewind, fast forward, pause, etc). The remote can control up to 15 devices and can be programmed to perform up to 255 activities.
Activities are basically anything you want the remote to do. Examples could be to watch TV, watch a movie, listen to CD, play game, or pretty much anything you can think of. When you first open the Harmony remote you have to let it charge for a while until the battery is full. The remote does come with a charging cradle that you sit the remote in while it's not in use. Then connect the remote to your computer with the provided cable and launch the Harmony software. You do need to be connected to the internet for the software to launch because it needs to get the remote codes from an on-line database. After you enter your devices the wizard will help you set up the activities that you might do with the components you've entered. If you need to add any more the wizard can help you with that too. Also, if the software can't find remote codes for one of your devices or is missing a feature from the remote it can learn from your old remote by holding it up to the Harmony and pressing the button.
Once you get the remote set up like you want you just point it at your entertainment system and press an activity button. It will turn on all the right components and turn them to the right inputs for the specified activity, with just one press of a button. If something doesn't work correctly you can hit the help button and it will ask you questions and send out remote functions to try and correct the problem. You might have to do this the first time you use a function because the remote won't know which input a specified component is on, but it will remember from then on. This remote works really well and I've had no problems whatsoever out of it. I love it and it really does replace all four of the remote that I previously had to deal with. I would highly recommend this remote to anyone who has to use multiple remotes on a daily basis and especially anyone that has trouble remembering how to turn on all the components in your living room.