The bins can have a peg in one of eight positions. Switches are placed at the point of interest, probably at the end of the conveyor belt, arranged to align with the peg positions. When the bins move past the switches, one peg will activate one switch, so you know that a bin is at the point of interest, and which bin it is.So you have a switch that trips when a bin activates it. How does that translate to which bin in which position?Hardware provides switch positions. Software 'knows' which bin at which position.
Assumption is that there is some sort of 'teaching': recording bin to position in software.
Alternatively use four switches and four pegs. One peg is a "presence" peg, and the other three form a binary code for 0-7. When the "presence" switch is activated, read the other three switches and you know which bin is there.
Instead of switches, use small flags made of card, plastic, or metal, which go through the slots of the previously mentioned optical switches. Then no force is needed to activate the switch.
Or a camera to look at the colour, or to read a QR code on the bucket, or to OCR a number on the bucket. Or a potentiometer with a spring arm that is pushed by different height pegs on the buckets as they go past. Or, assuming the motor driving the buckets runs at a constant speed, a serrated element on the bucket with serrations at different spacings, which rub against a rod an generate an audio frequency, which can be measured to determine which bucket just passed.
There are lots of ways to do this. Pick one and try it.
Statistics: Posted by ame — Sun Feb 01, 2026 8:38 pm