Which sensor should I use??

I am trying to detect some objects (nuts and bolts) as they pass on a belt conveyor. Belt is 6 inches wide and size of objects is not fixed. Speed is about 10-12cm/s and they are passing one at a time not necessarily through same point. They can be anywhere within 6 inches width of the belt.
I am a complete noob when it comes to electronics so I experimented with those cheap IR obstacle sensors. Now they only detect upto 2-3cm and sometimes miss too. I could buy the ones with a higher range but how do I ensure it won't miss any object?? Any other cheap alternative? Analog or digital any will work as long as it detects right and always.

a1604:
I am trying to detect some objects (nuts and bolts) as they pass on a belt conveyor. Belt is 6 inches wide and size of objects is not fixed. Speed is about 10-12cm/s and they are passing one at a time not necessarily through same point. They can be anywhere within 6 inches width of the belt.
I am a complete noob when it comes to electronics so I experimented with those cheap IR obstacle sensors. Now they only detect upto 2-3cm and sometimes miss too. I could buy the ones with a higher range but how do I ensure it won't miss any object?? Any other cheap alternative? Analog or digital any will work as long as it detects right and always.

There are multiple options. I would do it with optical barrier. Basically you take the cheapest red laser you can find ( less than 10 dollars) and a fototransistor sensitive to that specific wavelength. You put the laser on one side of the belt and the fototransistor on the other. You can sense voltage drop / current / resistance with a micro controller. when the barrier is interrupted you can light a led / send message to a PC / message to mobile phone ... Etc.

The hardware costs : a development board ( e.g arduino ) , laser and cheap dirt for the rest. If you make your own board you can pull it off bellow 20 dollars.

The software costs : 30 min - 2 hours from someone who knows.

Speed is not an issue. I made data transmission with the above stuff and made 9600 reads / second.

Instead of the IR obstacle sensor (assuming they are in the same package) buy the led and receptor separately, mount one on each side of the belt and detect the interruption of the beam.
Check this link

The two leds are side by side in that example, but you can put on on each side of the belt.