Sensing objects/counting plastic coins

Hi everyone
I'm new to this forum and Arduino, I have a little electronics experience and I'm now looking at dipping my toe into the Arduino world.

I would like to build a counting device and circuit. Imagine!! I have a clear acrylic tube 75mm diameter x 1000mm long that stores "achievement coins" ( plastic discs) each coin is dropped into the top one by one and then at the end of the year the coins are counted. Now to same counting possibly 1000's of coins I thought it would be best to count the coins as they went in to the tube. The quantity can be displayed via 7seg display.
There will be four tubes with coins so would retire four sensors and probs one Arduino board.?

I not asking for someone to do this for me but would like a point in the right direction.

What sensing device would work well with the Arduino?
What board would suffice?
What words can I use to search for info?

Would love to here your thoughts and I'll try and answer your questions.

Thanks in advance.

The obvious way would be an IR beam breaking sensor at the input slot.
But you could consider some sort of micro switch the sort that is used on music keyboards but I think they are hard to get these days.

If you don't need to differentiate between coins and something else somebody might use to "cheat", they a simple IR interrupt beam will work just fine to count them as they go in.
The problem is that unless you use nonvolatile memory and your device loses power, you lose the count.
The way around that is that if the coins are uniform, you can just weight them. You know the total mass of coins and the mass of one, just divide and you're done.

Any arduino board can do either.

The problem is that unless you use nonvolatile memory and your device loses power, you lose the count.

Simply store the count in EEPROM, you are not going to ware it out with so few accesses.

Grumpy_Mike:
The obvious way would be an IR beam breaking sensor at the input slot.
But you could consider some sort of micro switch the sort that is used on music keyboards but I think they are hard to get these days.

Hi and thanks.
Good suggestion with the micro switch. The IR is what I'd had in mind first off just need to look at suitable devices that would fit the tube but to be honest it was my first thought and there's plenty other ways I'm sure.

Shpaget:
If you don't need to differentiate between coins and something else somebody might use to "cheat", they a simple IR interrupt beam will work just fine to count them as they go in.
The problem is that unless you use nonvolatile memory and your device loses power, you lose the count.
The way around that is that if the coins are uniform, you can just weight them. You know the total mass of coins and the mass of one, just divide and you're done.

Any arduino board can do either.

Hi and thanks also.
The coins are exactly the same (other than colour). Cheating is a thought so I'd need to have control over the counting display to +/- where required. A weight counter could also work, is there devices available to do the weighing? needs to be small enough to go in the 75mm tube.

Wondering what to search for to look for a sketch that could be useful.

Grumpy_Mike:
Simply store the count in EEPROM, you are not going to ware it out with so few accesses.

Thats a statement I'll have to google, could be useful. :wink: thanks

I would test the plastic you are using for IR transmission.
Many plastics we can't see through are like windows for IR.
Using a visual light and a solar cell might be better.
If the plastic pieces are clear then you might have a mechanical
lever arrangement that the weight of the coil brings a flag
down in front of an IR interrupter that does the counting.
If one used a thin leaf spring as the cantilever it should be
reliable.
Another way that is more electronic is a balanced capacitive
sensor. It is more complicated electronically but takes less
space in the counting part.
Dwight

I would test the plastic you are using for IR transmission.
Many plastics we can't see through are like windows for IR.

While this is true I would expect this to be mounted inside the tube.

Using a visual light and a solar cell might be better.

But at night / day transition you will get a false count.

Another way that is more electronic is a balanced capacitive
sensor.

You can't do that with a non conducting object.

The scale can be outside the tube. You can include it in the measurement.

Grumpy_Mike:
While this is true I would expect this to be mounted inside the tube.
But at night / day transition you will get a false count.
You can't do that with a non conducting object.

It is the plastic coins being transparent to IR that is the possible problem,
not where the IR is mounted.

IR needs shielding from out side sources, just as visible. For indoor uses,
IR is marginally better. It is used for remotes because people can't see it and
only a few indoor sources are bright enough to be a problem.

It can work with non-conducting objects. It is done all the time. The dielectric constant
of plastic is quite different than air.
Dwight

Thanks to all thus far. :wink:

In my mind the tube being clear acrylic would house the sensor in such a way it would availed false triggering from cheating by putting flat objects through the sensor. I'll have to make a fitting that the sensor is housed in that will slide in to the tube with a flush fit. This for me is. The easy bit of the task the tricky bit is where you all can advise.

I've Been looking in to IR sensing and there's loads of net units easily added on the the Arduino board and all seem to do much the same.

As I say I'll have 4 tubes to be filled with coins but this also means I'll require x4 banks of 7 set displays (one for each tube) showing four digits for each. So does this mean I'll need a board with at least 4 inputs ( for sensing) and 4 outputs (for the display count) ?

I also like the thought of weight counting but as of yet I haven't found a device, any pointer here would help.
Many thanks

Is there a reason the counter has to be part of the tube?
I'd think it would be better to have it on top with a slot of the right size for
the coins.
If you fear cheating, you should look at coin counters for vending machines.
The single coin size like used in a pin ball machine.
First the coin is sorted by size. Too large and it doesn't go
through a slot. Too small and it falls through another.
Make of iron and it sticks to a magnet.
( although not much good for your purpose ) the wrong electrical
resistance and it goes too fast or too slow past the magnet and
misses the slot.
Too heavy and it falls too soon and an anvil and bounces too high.
All in a small machine that it about 6 by 6 inches.
When finally OK, it trips a simple mico-switch lever.
Dwight

@dwightthinker
Please stop giving rubbish advice. Do you actually think you have any relevant experience here with what you say?

It is the plastic coins being transparent to IR that is the possible problem,

You are mixing up the translucency of certain plastics with the thought that it means you can not detect the passage of them through a sensor. This is just a very naive view of sensors.

It can work with non-conducting objects. It is done all the time. The dielectric constant
of plastic is quite different than air.

That tells me you have no practical experience using capacitive sensors. If you have real practical experience then please say so but you sound like you have just had an inkling of something from stuff you have read and misunderstood.

I've Been looking in to IR sensing and there's loads of net units easily added on the the Arduino board and all seem to do much the same.

You want a photo slot sensor and get the coin to roll past it inside the tube.

Grumpy_Mike:
@dwightthinker
Please stop giving rubbish advice. Do you actually think you have any relevant experience here with what you say?
You are mixing up the translucency of certain plastics with the thought that it means you can not detect the passage of them through a sensor. This is just a very naive view of sensors.

I've used these sensors enough to know that many pieces of plastic can marginally be detected
by IR. It depends on what was used for the color filler.

[quote author=Grumpy_Mike T]
hat tells me you have no practical experience using capacitive sensors. If you have real practical experience then please say so but you sound like you have just had an inkling of something from stuff you have read and misunderstood.[/quote]

Yes, I know enough about these to know that a differential capacitive sensor can not only detect
insulators, it can also be used to measure the thickness of them, knowing the dielectric constant of the material.
What experience have you had with them. Don't confuse this with an ordinary capacitive sensor, such
as you can buy on one of the shields.
Those are touch capacitive sensors and yes, they require a conductor.
Dwight

Many thanks for the advice.

No reason at all the sensor has to go inside just looks good as a self contained unit.

Let me explain what this is for. I work in a school and the children there get coins as an achievement award, red,yellow,green and blue on for each house. Upon earning a coin the children would put it or them in to their house acrylic tube. At the end of term the coins are counted to see who's in front. The children love to see the coins in the tubes adding up. I thought it might be cool to have the running counts displayed. This as been so popular I need to make a better system and I've took it upon myself to go above and beyond..I'm not a teatcher I'm the caretaker just doing my bit for the kids.

Ok back to the project.

Sorted- I can use IR sensing and loads to be purchased. :wink:

Would like to know about weight counting and the components (sensing) to do this.

Back to the question about inputs and outputs just so I purchase the correct board. As far as I see it I have 4 inputs (IR sensors) and 4 outputs (to displays) ?? I need to drive x4 displays via 7seg each displays 1000's. I have to make sure I purchase the correct board to drive these and thus would appreshiate your advice.

Cheers Mark

Chances are, weight would not be accurate enough for your purposes, especially if you are using an analog weight sensor in combination with your Arduino.

Anyway, you want the counter to be accurate. If a child puts in a token and the counter does not go up, the child will complain. Also, if these child are learning arithmetic, you will want things to "add up". You don't want a machine telling your kid that 97 + 3 is anything other than 100. (Unless the intended lesson is that the machine lies.)

So I can be sure I'd like to go back to the question I raised about inputs and outputs just so I purchase the correct board. As far as I see it I have 4 inputs (IR sensors) and 4 outputs (to displays) ?? I need to drive x4 displays via 7seg each displays 1000's. I have to make sure I purchase the correct board to drive these and thus would appreshiate your advice.

Cheers Mark

There do exist stand-alone electronic counters with built-in digital display. If you can make one of those work with your setup, that kills two birds with one stone.

Personally, I find mechanical counters charming. There do exist mechanical counters controlled with electrical pulses, but getting the right voltage to operate the counter might be a bit tricky. (This might also be a problem with the electronic counters I just mentioned.)