Coin Counter

Hello, I am developing a new product, and want to make a prototype with working electronics. I am completely new to arduino, and have limited coding exposure. I have a product that will sort copper pennies from copper coated zinc pennies, and want to use a light sensor of some sort to count the pennies as they pass by. Right now I have 15 tracks that will feed pennies into two collection bins. As the pennies fall, they will go passed one light sensor, then slide over a door that solid copper pennies will activate and drop through, and the zinc pennies will pass by and go over another light sensor and fall into a separate bin. The arduino will need to connect a total of 30 light snesors and run an LCD Display that keeps track of the solid copper pennies and zinc pennies. The reason I went with light sensors like photovoltaic or something similar is that they are cheap. Would it be possible to do this? there will be a potential of 15 pennies dropping at one time.

Thanks in advance! Chase

Are the "light snesors" digital or analog? If they are digital (on or off), the Mega has enough pins to read them all. If they are analog, there are no Arduinos with enough analog pins.

Keeping the LCD updated with input from 30 (digital) sensors might be a problem. They are slow devices, and can block until the data is shifted out.

I don't have any sensors or anything, and I don't know the difference between analog or digital light sensors. I assume analog just outputs a voltage or current based on the amount of light and digital is what might be in an outdoor light where when it get's too dark the light turns on? As of right now I only have an arduino mega 2560. As for LCD, it doesn't have to be LCD, but I don't know how else to keep track of it.. And I don't even know where to get digital light sensors..?

You are asking quite a lot here especially given your current state of knowledge.

Are the light sensors only detecting the presence of the coins? If so then you need a digital one. You should not rely on ambient light you should shade the system and use only the lights under your control. How are you detecting the difference between these coins?

I made a coin counter many years ago that used light sensors to detect the diameter of coins as they rolled down a slot. Are you planning to build this yourself?

Depends on how much build you want to do… If this will be a mass-produced product, look at “Opto-Interrupter” units which are just an LED and a Phototransistor in a plastic package…

I can get these for < $1 from my suppliers in China…

You could mount separate IR LEDs and Phototransistors in your product too…

Yeah I just need some type of sensor that will detect the coin and that is cheap.. And also they are not rolling, they are sliding. I am probably look at a price of 30 cents a piece or less for the sensor if we were to buy about 9,000. I can do what I need to do in order to accommodate the right sensors. And yes I will be building the prototype. I told the client that I am just starting in this and that it should be doable, but I have to play around with it in order to see if I am able or not. I would agree that digital is the right one, but now to find the cheapest digital sensor I can that will work everytime. I do like yours Terry, but I think it might be a little big... I need something that can sit under the surface and look through a hole preferably..

There is this:- Ignore the price if you want 9,000 it will drop a bit.

Interesting, how does this work? When there is no coin it will reflect off of something above it back down into the sensor and when the coin goes over it and is close enough it will prevent the infrared the chance to reflect back down into the sensor?

Or when something comes near it, it reflects back down into the sensor?

What ever way round you want it, it depends on the distance from the coin to the sensor.

Yeah, those are pretty expensive, it might be more feasibly to use the transmissive type.. Have you seen those switches with really long thin wires that stick up and when something goes over it, it pushes it down pushing the switch?

Yeah, those are pretty expensive

No they are not.

That is no where near the price you will pay for 9,000. You make prototypes with one off prices then you find a supplier to sell in bulk. As a rule of thumb expect to pay about 10 times less for the quantity you are looking for. While 9,000 is not a lot there is substantial scope for discount.

Well I was looking and prices for 1,000 or more were still $1.30 or around there...

No you don't get it. You wouldn't dream of getting bulk components from a distributor like that. They are for prototypes and small batches only. If you are going to do this commercial you deal with a distributor that doesn't mess about selling you single devices but gives you samples of 10 or more. There is a whole world of difference between prototypes and commercial production.

Okay, I understand! Thanks for the help. I will buy a few of these and see what I can do. Do you think the arduino board can count 30 simultaneous streams from the digital inputs and display and lcd display? And it doesn't even need to be an true LCD it can just be a digit counter, that is just used for numbers. I don't know the exact name...

Thanks for all the help! Chase


You can get 7-segment LCDs like in a multi meter, I haven't seen them around for years but there must be driver chips for them (we used to use XOR gates).

Or you could use 7-segment LEDs, no speed issues with them.

Or "serial" displays where you just spit out serial data with the numbers.


Yeah that is what I was thinking of, How many of those can I run off of arduino mega (7 segment LED), with 30 of the digital ports taken? I will need to run atleast 8…

Maybe something like this?

If you use LED driver chips like the AS1108 (this does 4 7seg displays) you can run as many displays as you like with 3 pins.

MAXIM also make chips (like the MAX7219) that will run these displays, some go up to 8 displays per chip.


Awesome, if I happen to get this job, do you guys think it can be done? If it can I would be willing to hire your help, but I will have to build that cost into the prototype, so if anyone can do it, let me know. Thanks!