# Arduino powered money counter

Hello!

I have looked forward getting an Arduino board for quite a while now and I have finally come up with a thing I would love to try to make.
As the topic title says - I'd like to make a money counter.
First - to use a photo diode. I guess it would be easy to make a coin counter as you could just add one to the coin total when signal is interrupted between the photo diode and the light emitting diode. I am quite new to electronics, but what I remember from school and university classes this is how a photo diode works - current flows through it when there is light?
The problem with this one is I have no idea how would I be able to get the size of a coin, so I could make correct calculations on the amount of money.

Second - using some sort of a mechanism where the coin has to be pushed through and the opening of the mechanism determines the value of the coin by it's size.
The problem with this one is that I have no idea where to or how to make a mechanism of that sort.

I know that both approaches are quite easy to fool as they do not check whether the coin is real or not and so on.

Any comments and suggestions are more than welcome!

I made this many years ago:-

However it uses a linear CCD sensor which is in effect lots of photo detectors to measure the size of the shadow as the coin passes in front of the sensor. I did not do this for an arduino but the idea should be easily translated. The only snag might be getting hold of this sensor nowadays.

(image taken from http://www.pololu.com/catalog/product/958)

The OUT line would be connected to a digital pin. Assuming you arranged a space between your phototransistor/diode and IR led for the coin to fall through you can get an estimate of the coin's size by recording how long the OUT line goes high when the coin is passing through (see the reference for the pulseIn() function). This assumes that all of your coins are falling through at the same speed.

Discrete photodiodes/transistors are cheap; I would suggest a plurality of detectors arranged in such a way that a coin rolling past them on a slope could be read for its height.

This looks interesting, thank you for both replies.

A quick search didn't reveal any easy ways to obtain a linear CCD sensor, so I guess that's not really an option.

Would it be possible to install multiple sensors stacked above each other to determine the size of the coin, so it could fall through instead of rolling?

friiks:
Would it be possible to install multiple sensors stacked above each other to determine the size of the coin, so it could fall through instead of rolling?

Yes, that should work. When the lowest photodiode/phototransistor first has the light to it blocked, read the sensors above it to see how many of them are blocked too.

A quick search didn't reveal any easy ways to obtain a linear CCD sensor, so I guess that's not really an option.

A quick search showed me that Mouser has some
http://uk.mouser.com/ProductDetail/TAOS/TSL1401CL/?qs=sGAEpiMZZMu3iiO3VE9n1HgqhuDV7hNIKth4B0i4FJo%3D

In fact they have many:-
http://uk.mouser.com/Search/Refine.aspx?FS=TRUE&N=4294758757+15099918+1323043

I guess, I don't know where to look, Grumpy_Mike. Thanks!

Now, though, I'm looking forward the photodiode approach more. What's the limit of how many of these I could connect to Arduino uno?

What's the limit of how many of these I could connect to Arduino uno?

There is no limit, just like asking what is the limit to the number of input pins. You just go on expanding until you have enough.

Are you going for analogue or digital inputs from your sensors?

I'm actually a bit ashamed to admit this, but I don't really know the difference between analogue and digital inputs. From what I've understood digital is 1/0 - on/off but the values in analogue differ.
If I go with the photodiode approach the digital inputs (if I've understood them correctly) is the best choice in this situation as I could check and compare which sensors are on or off and determine the size of the coin from that.

I also wanted to ask what would happen if the diode would be partly covered? Is it possible to determine the amount of the area covered? For example, 100 would be the diode not covered at all and 30 would be diode covered by 70%. I guess it's not doable like the example I gave, but could it somehow be calculable by the strength of electrical flow going through the diode? Or is the diode not able to do that and only outputs an on/off signal?

I also wanted to ask what would happen if the diode would be partly covered?

Using analogue sensors you would see this half region in the way you want, as proportional. Using digital is is always a 0 or 1. The down side is it takes longer to read an analogue sensor. You can do only about 10,000 reads per second with analogue although there are things you can trade to make it faster.

Do some measurements with photo detectors first and get a feel for how to use them.