Maize seed detector and counter

I am aiming to develop a maize seed counter for one of my projects. The maize seed has an average of 7 mm of diameter. The seed has to pass through the area of 25 mm x 25 mm where the detection is to be performed. I tried mini laser diode coupled with ambient light sensor but that mechanism covers one 13 mm of the width. What are the other possible options that i can try to detect maize seeds efficiently in the said area?

How are they passing that area (with fixed relative positions e.g. on a conveyor belt, or e.g. falling, possibly bouncing from each other and the walls) and can you influence it (make it smaller, add some mechanics to separate)? How fast are they passing the area?

Make them bounce off a piezo, and count the number of impacts. If you place the piezo at an angle the grains will bounce off and every grain will produce exactly one impact.

Well, that's the ideal world, in reality some bouncing grains will hit falling grains so you may double count kernels or miss a few, but as long as your stream is not too dense that shouldn't be much of an error.

With the laser, just add parallel mirrors so the beam zig-zags across the field before entering the detector?

MarkT: With the laser, just add parallel mirrors so the beam zig-zags across the field before entering the detector?

Only works if we can expect a gap between the grains. We can guess as much as we want, but the OP has to answer my and probably more questions.

Maybe something using this concept: https://www.bannerengineering.com/us/en/products/sensors/slot-sensors-and-part-sensing-arrays/small-and-flat-object-detection-lx-series.html#all

The Arduino-compatible Pixy camera can detect and report blobs of different colors.

Do it like the commercial seed counters do it: http://www.dickey-john.com/product/unirate-seed-sensor/

ElCaron: How are they passing that area (with fixed relative positions e.g. on a conveyor belt, or e.g. falling, possibly bouncing from each other and the walls) and can you influence it (make it smaller, add some mechanics to separate)? How fast are they passing the area?

The seeds are free falling from a certain height after regular distance say 7 cm (however, there are chances of two or at max three seeds falling together). The area cannot be made smaller since it will result in collision of seeds and causes seed distance to vary drastically. They are passing through the area with a speed of 13.2km/hr.

wvmarle: Make them bounce off a piezo, and count the number of impacts. If you place the piezo at an angle the grains will bounce off and every grain will produce exactly one impact.

Well, that's the ideal world, in reality some bouncing grains will hit falling grains so you may double count kernels or miss a few, but as long as your stream is not too dense that shouldn't be much of an error.

We cannot make the seeds to bounce on the piezoelectric material as it causes disturbance in seed motion and results in variation of seed distance (fix seed-to-seed distance is the requirement of the application)

Two-step process then. Step 1: count the seeds as they pass through, bouncing off the piezo or whatever. Step 2: catch the seed in the dispenser tube or whatever it really is to make sure they fall evenly.

Otherwise: optical. Use a cross-array of narrow break beam sensors, so every grain will break one or more beams in each direction. You will be able to sense every single one of them, as long as you don't have too many coming through at the same time (up to three at the same time should be 100% detectable no matter what pattern they fall in; four or more may start to completely overlap with one another but not necessarily).