complete noob in need of help

I'm trying to set something up but the truth is that I'm a bit lost and I've really run out of time (school assignment, kind of jumped into something I have no experience with). If I say something silly, well, I don't know if I'm on the right track or not.

I bought an arduino duemilanove and did the blinking LED script and I have a painfully basic understanding of circuits... 8-)

Here's what I want to do. I want to set up a 3x3 grid that will

a) detect where I put a "piece" b) communicate that detection to Max 4.5

I figure I can dedicate the 9 digital pins to the 9 respective tiles? I read a the tutorial on the Arduino playground about communicating with Max 4.5... as long as I can set up SOME visual representation of where the "piece" is sitting on the grid.

Do I need to etch a circuit, or can I get away with something more simple? It can be totally crude and temporary if necessary... in fact, the easier this is to put together the better. :P

ANY help is super appreciated, although admittedly I would love it if someone would just walk me through a possible process. I don't want to just make this post and never post anything here again, I took on this project out of personal interest and I'm certain I'm going ot stick around... If I can at least get a push in the right direction I would feel much better. :-/

Oh yeah, if it's a good idea to etch a PCB in this case I can definitely do that. lmao I must sound so lame to you guys :(

one relatively easy solution to your problrm would be to use 9 reed switches, and have small magnets in your "pieces".

A reed switch is a switch that closes when a magnet is close to it.

You could easily read the state tof 9 reed switches with Arduino, and send it to Max or whatever.

EDIT: Do you need to distinguis between the pieces or is it enough to know that a piece is on a specifik tile?

First of all thank you so much. A friend of mine mentioned magnets but I didn't totally know what he meant.

And no, it doesn't have to distinguish at all. I have a feeling that distinguishing would make things a lot more complicated.

Also, would I need to run power through this board?

No you would not need to run power through the board. The board could be a thin wodden sheet or whatever. Just has to allow the magnets to trigger the switches.

You would need to hook up the switches with power.

You would probably need to use pull up or pull down resistors and to debounce the switches. If you are not familiar with these concepts, a really good place to start is Lady Ada’s Arduino tutorials. Especially lesson 5 which deals exactly with switches, pull up resistors and debouncing, and explains the concepts really well.

http://www.ladyada.net/learn/arduino/

And for reed switches, this is a good place:

http://www.goldmine-elec-products.com/prodinfo.asp?number=G1347

They have others.

If you have a dealine, check how fast they can deliver, sometimes they tend to take their time to ship.

EDIT: You should prpbably buy a few extra, they are quite fraigle, and do not take much abuse before they break.

Thanks again for taking your time to help me out. I've almost read all of the tutorials on that page, nearly done the 5th one (which has really helped me out).

I live near a few electronics stores that have reed switches in stock. Would any of these do the job? http://www.leeselectronic.com/catalog/advanced_search_result.php?keywords=reed+switch&x=0&y=0

The arduino would be monitoring the voltages passing through the switches, or the switch input, through the digital pins, right? You mentioned that I will need to hook the switches up with power. Should I give each one a power source like a small battery? As long as I keep the Arduino connected to a power source, can I use it to power the switches?

I think i used confusing language when i said that the switches has to be hooed up to power. If you compare the reed switch with the switch in the Lady Ada tutorial, you see that they both have 2 pins, so just treat the read switch just like the good Lady uses her little tactile switch. (well the switches she uses actually has 4 pins but only two are used).

I think any of the three reed switches in the link above will do. They just need to be able to handle the 5Volts that flows from an Arduino digital pin.

Alright, I'm pretty far along now. I have a pretty good idea of what I have to do to do this.. except for one part.

I'm going to use a switch to alternate between 5V and ground with a resistor pulldown towards the ground.

I can't figure out how to keep 9 pins grounded while only giving the 5v input to one at a time. Any ideas?

To use pull downs, you would connect one end of each switch to +5volts, the other end gets connected to an input and to one end of the resistor. The other end of the resistor connects to ground.

But as the pieces are arranged in a matrix, you may want to connect the switchs up so you can directly read the row and column. This would have the benefit of only needing 6 input pins instead of 9. See the keyboard matrix library if you want to pursue this approach: http://www.arduino.cc/playground/Main/KeypadTutorial

To make your switches look like a keyboard matrix, you would connect them together like in the drawing below, although in your case you only have 3 rows and 3 columns

Thanks for the advice, I’m diving through the documentation for the keypad script as we speak.

Before I totally toss away my current set up, is there a way to attach my switches to their own grounds, or am I stuck with the ground pin on the arduino itself?

If you are connecting each switch to an input pin with pull-downs, you would connect one end of each switch to +5volts, the other end gets connected to an input and to one end of the resistor. The other end of the resistor connects to Arduino ground.

I think I know how to create a pulldown, but I can't imagine how I'd organize the wiring so whenever a switch is activated, only one of the pins recieves voltage while the others stay grounded.

Sorry if I'm being a pain.

I can't get past making this over and over again when I try to draw up a plan

If I close either switch in this case, won't both pins recieve input from the 5v?

only the pin that is connected to the side of the switch that is closed will get see +5volt. All pins with open switches will be at ground potential because of the pull-down resistors.

Try it – perhaps write a simple sketch that responds to the wiring as per your picture, and send a serial message to say which pin has gone high.

Wow, I can't believe that I didn't realise that.

I'm on my way out, but I will make sure to let you know how it turns out later today.

You guys have seriously helped me out a lot so far, I really appreciate it. I feel like got a lot done and learned a lot even though I came into this with basically no understanding of anything. :)

Hey guys

The pulldown resistor worked out and my presentation went well. I'm an art school student and this project was for a 300 level interactive electronics class. Everyone was pretty impressed that two people who have never met me took the time to walk me through the process, and I am overjoyed that I've taken my first steps into this vast ocean of possibilities (lol).

So thank you thank you thank you :D I'm definitely sticking around

Glad to hear it went well. We are looking forward to seeing some pictures ;)