best approach?

Hi all . i have a little experience with arduino but not loads.

I was wondering if anybody could tell me the best way to go about this:

I intend to make a 4x7 grid (a grid of squares)- each square within this array needs to be able to detect the presence of a unique object .

say for example - at grid 0.0 will be a piece of plastic representing a rock and at grid 0.1 will be a piece representing a tree - each of the 28 objects will need to be identified as unique and return a value ( which i will send to a processing sketch).

What do you all think is the best way to approach this? i've heard of multiplexing LEDS but don't know if the same applies to sensors?

I look forward to your replies.

Kind Regards


Have you decided on what sensor / technology you want to use in order to identify the object?


As for multiplexing, I think it should work. (Please correct me if I'm wrong, not really a hardware guy)

This what I was hoping you would be able to help with . I was thinking RFID, but can that read multiple tags at the same time . Also the objects position on the grid is important so multiple sensors will need to be used I think ? One for every array element?

I think you would be best off using RFID, and a sensor at each array element.

You could make a motorized sensor, that would scan all elements, but it might be too slow and noisy?

Yeah I think it would be too slow aswell, can u use multiple sensors from 1 reader with RFID ?

Parallax RFID Serial Reader

...can u use multiple sensors from 1 reader with RFID ?

What exactly do you mean? :slight_smile:

RFID will be somewhat expensive.

If you can make each piece the same shape, and the "squares" have a receptacle that exactly fits each piece, then you can use some mechanical means maybe. Like have a row of 5 "pins" sticking out the bottom of each piece that closes a contact underneath. 5 pins means you can have 32 different combinations of these pins (e.g., pin-nopin-nopin-pin-pin) would be like binary 10011, or the number 19.

You could use the same approach with optical reflectors instead of mechanical pins.

I like the close circuit pins idea I was thinkin of doing something similar. And the RFID thing , I mean will ok RFID reader me able to tell what object is at what coordinate ?

Just my 2¢, perhaps a pattern of magnetic reed switches under the platform with a varying amount of small magnets on each object. (Cheep / easy solution as long as put magnets on the objects.)

i like that idea, that might make things much simpler , wouldn't that mean, 28 magnets under each item tho?

Well, I don't know how big - physically - your grid is so I don't know how practical this is.

But with a 4x7 grid you have 28 objects that must be uniquely ID'd. If the presence of a magnet represents a binary "digit" then 5 reed switches under each square will give you 0-31 possibilities - depending on how many magnets are under the object.

the base of each obect will be about 3inches square. so theres not alot of room to play with, the concept is definitely on the right track tho.

RFID is most appealing to me due to the -contact-less-ness of it.

Am i right in pressuming that a reader will only be capable of reading one passive tag at a time?

I don't know much about RFID in non-commercial applications, but I would fear that each square would require it's own reader - big bucks!

I write only to say that the magnetic reed switch is in a sense contactless - at least between the object and the sensor.

You'd need 140 and perhaps you could scan them like a keyboard. The base the objects are placed on would need to be made of a non-magnetic material.

Good luck with whatever method you use. :slight_smile:

Hi , Thats great thanks for the help , i will play with your concept a little first. Im sorry to ask so much but could u give a little explanation of how you would set this idea up ? I dont have a lot of experience in electronics and this is more of a means-to an end than an experiment.

Thanks again


"Means to an end" is a good thing. It means you are actually going to make something. But I'll be honest with you, I'm not the guy to suggest the circuit to use - especially at this point. (Someone else might be.)

However, I can give you more advice. I think that your next step is a proof of concept. If it were me, I'd do the following . . .

Get 5 or 10 reed switches. I used to have 100's from old keyboards, but a quick look shows the're more expensive than I thought they should be ~ 50¢ each! - i.e., - so $70 - still game?

If yes, I would mount 5 in a square - depending on your object - perhaps one in each corner and one in the middle of the square.

I'd tie one side of all the switches to ground and bring the other to 5 digital input pins (pulled up). Then I'd write a simple sketch to read the pins and create a decimal number from bit each pin represents.

I'd also make a few objects with magnets mounted to create various decimal values and see how happy I was.

If I was happy, I post a question on how to read a 4x7 matrix of switches using a multiplexer and scanning the rows of switches. Someone will give you good advice.

But $70 is probably a lot, (I was expecting 10¢ each!) so first I'd cover that side of things.

Expect to learn a lot.

That's fantastic advice im really greatful for the advice , I've had an idea though , how about putting extrusions under the block that pushes down on a button type setup instead ? So basically it just completes the circuit in a similar way to a remote control? That would be a cheaper alternative , what do you think? (instead of 5 reeds Its just 5 buttons)

perhaps one in each corner and one in the middle of the square.

You need to mount them "asymmetrically", so that the magnets will only trigger the sensors they're supposed to. If you put them at the corners, and the pieces are square, you could insert one rotated, and produce an incorrect reading.

Goldmie also has Hall Effect sensors for 50 cents each:

It's worth checking a few of my other favorite surplus dealers, too:,,, and

Anytime you're buying 140 of something from a surplus place, it's worth dropping them an email: you might discover they don't have that many, or you may find out they'll give you a discount. And let them know you're flexible: if those reed switches come in trays of 50, they might give you a big break if you buy 150, and save them the trouble of counting and bagging.

If a simple "right/wrong" indication will do, and you use the reeds switches, you can simplify things by wiring all the "1" switches in series, and the "0" switches in parallel. This will give you two outputs per square: one that's closed only if all the "1" bits have magnets, and one that's closed if any of the "0" bits do. That reduces the checking to a scan of a 7x8 matrix.


Anytime you're buying

Ok all , well im going to have a go, price up etc etc. i might be back for a bit of help soon.

I just want to say thanks to all the people here, its not often you get a forum where EVERY post / poster is so helpful. Thanks Guys , much appreciated.

Kind Regards





Readily available.

I've mulled over using resistor values but I need a no contact approach