Greetings, fellow tinkerers!
I've been forced by the conditions of my employment to undertake a rather daunting task of figuring out a way to create general-purpose detector, used to trigger sounds every time money is dropped into the slot. The problem with this particular one is that it has to accept money of any form - coins, rolled banknotes, regular banknotes, crumpled checks, diamonds, deeds to long-forgotten properties and similar.
As for the general design, I've gone with a box, with a slanted bottom, heading down towards an open edge. This way, no matter what's thrown in, coins, bank notes or otherwise, it'll fall flat while sliding down, means it'll reach the edge with maximum surface area.
Now, as for detection, the current idea is to have row of infrared LEDs lined up at the top of the edge and a row of infrared phototransistors lined up at the bottom of the edge. When the object passes through, it disturbs the beam on at least a couple of these. The disturbance is detected and the sound is played. As far as the circuitry goes, I've managed to get a single photoresistor running (according to these schematics). Where I fall flat on my face is doing it for several photoresistors. The problem is, I'm going to have something close to 20 of photoresistors, but Arduino only has 6 analog inputs to read from (and I need the analog input, as in some cases, the change in voltage is not big enough to pass on digital input, for example with thin banknotes).
The idea I've had is to somehow couple them together on one read line, i.e. four per analog input pin. This way, when there is nothing in the way, the reads are given at 100%, if one from the group is covered, the reads are at 75%, if two, 50% and so on. However, in my rather limited knowledge, I have not managed to design a circuit to allow such reads - everything I've wired acts as 0% if every phototransistor is covered, 100% otherwise. Would you be able to lend me your thoughts on that?
Alternatively, the idea of using an analog multiplexer has occured to me, though I have no experience using such components, so I'd need some guidance, if it seems better option than to wire the phototransistors in groups.
With best regards,
Mick