What's the most suitable and availble motion detection sensor can be used to detect a light glass marble (1.7 cm in diameter) on a metal track ? and how to connect it to both motor and Arduino ?
It is really helpful if you can describe the whole application. What are you trying to do?
You want to detect its presence or the fact that it's moving?
You could try a reflective sensor like one of these; you would need to test if the marble reflects properly. Or, an IR LED and a receiver on the other side; you would have to test that the marble breaks the beam properly.
If it's motion you want to test, you could write the code to see if the marble is "not-there" then "there" then "not there" in a certain time.
I doubt if a marble would trigger a passive IR (PIR) sensor, and if it did it might get triggered falsely by other things moving around it.
(As marco says though, better to give more info....)
Okay i'm making a marble track made of galvanized steel , and once the marble comes to a certain position , the sensor should send a signal that the marble is coming , so that the motor would work. "As for a closed loop".
Still not clear if you only need to detect the fact that it arrived or that it's actually moving. Sounds like simply the fact that the marble arrived?
Try an IR LED and phototransistor as I suggested above; you can read about those in Part 1 of my tutorial here. It's a simple on/off switch really, so you can read it easily with Arduino and use the fact that the marble has arrived to switch on the motor. Read about hooking up a motor here. A reflective sensor like I linked, works much the same way in fact.
When does the motor turn off?
What have you learned about Arduino so far- I see you're new to the forum.... are you new to Arduino? If so you'll need to work through the examples and try to code your project yourself. You'll get all the help you need but it's standard practice for the one asking for help to post their code first, as opposed to expecting members to provide a turnkey solution. Just so you know...
The motor will turn off after delivering the marble to it's next destination and coming back to it's initial position.
Does this Emitter and receiver will be triggered by the marble ? and not falsely triggered by other movements as you stated above ?
Well Yes, i'm new to Arduino , so this university project seems to be some kind of challenge.
Is this can perform efficiently for this process ?
That looks like the right stuff. Mount them in a way that they are shielded from other light. This will also help with the marble deflecting the straight path between the emitter and receiver but you don't want them able to see any other path. (reflections.)
MorganS: That looks like the right stuff.
Not sure... that receiver has 3 wires so it might be one that expects a carrier wave, you'll need to check the data sheet and if it does, modulate your signal. Not a bad idea to do it that way, it apparently makes it less susceptible to ambient light.
My tutorial here may help.