Object identification

Hey everyone. So recently I’ve started working on a new project, being a display case for “infinity stones”, similar to what was seen in the most recent avengers movie. The plan is to have 6 sockets I could place each stone in to, the arduino would then recognize which stone is in which socket, and then it would light up an RGB according to which stone is in that socket. Once all six stones are in place then the RGB’s will run through all colors at a high rate for a couple seconds to resemble the infinity gauntlet when all six stones are collected. The issue I’m running in to is how to uniquely identify each stone while on a budget. I’ve tried using an LED and photoresistor in hopes that a difference between the stones could be recognized, but unfortunately they all have about the same opacity. One idea I had is to cast my own stones in resin, with a resistor on the inside and small prongs coming out the side so I could measure the unique resistance value of each stone, but that’d be a lot of effort for still having pieces of metal coming out of the sides. Right now I think the idea is to measure the unique length of each stone using a potentiometer, a linear gear track, and arms to hold the stone in place. but this still seems like an overly complicated system. Can anyone think of a simpler way to reliably identify each stone with as little modification to the stones as possible?

P.s. the “stones” I’m using are little decorative rocks from the base of a fish tank (obviously im very on a budget here, but hey they look decent-ish)

Maybe an RGB color sensor like this in each socket.

I thought about that, I just wasn’t sure if it was worth it considering I’d have to buy 6, which would total around $50 for only one aspect of the project. I’ll be willing to do that if nothing else works, I’m just pursuing other possible alternatives at the moment. Thank you though!

If you can glue/mount things onto the stones themselves, you can put resistors on them - a unique resistance for each stone. Then you can have each stone as part of separate voltage dividers and use analogRead() for each of the voltage dividers to determine what stone is where (and if any stone at all is present)

You can get cheaper versions of the RGB color sensor, especially since you probably don't need great accuracy. For example, on AliExpress.

Another idea is Magnets and hall-effect sensors.

What happens when you put a stone in the wrong slot?

You are the one showing off the device. Just remember not to put the stones in the wrong places.

Good question, I see I left that detail out. I’m actually planning on having a panel pop open to reveal a set of Avengers DVD’s, so I could take this case to marvel movie marathons with my friends. I’m using the stones as a sort of “password”, where if you put the stone in a slot it will light up its correct color, but the panel will not open up unless the stones placement is in line with how it is ordered in the gauntlet. I should’ve explained that in the initial post, I just didn’t want to make it more complicated.