# Is there a sensor for counting the number of cards in a flipping scorecard? [duplicate]

I have a stack of cards and want to know how many cards are in the stack at any given time. Any thoughts on how I might be able to do this? Would it be possible for me to put a tag on every card and then use some type of sensor below the cards which could count the tags above it? The cards are suspended from rings like this:

While there was a prior question that was similar, it does not appear there were any answers that came out of that question.

• Simply weigh the stack. Dec 5 '15 at 21:02
• More homework questions? Weight, thickness, capacitance... Dec 5 '15 at 21:06
• The cards are actually hanging from rings so weight won't work. Here is a link to the cards:amazon.com/Match-Point-Tennis-Scorekeeper-Replacement/dp/… . Probably 8 inches tall, 5 inches wide, maybe 1/4 inch thick, cards are usually white. Dec 5 '15 at 21:23
• Coincidentally enough, we had the same question about keeping track of flipping scorecards. The question was posted within the last couple of years. It would not be easy to find it again, though. Dec 5 '15 at 21:27
• @NickAlexeev, Detecting numbered cards in a stack?, just a couple months ago. Dec 6 '15 at 1:56

Magnets?

Put a tiny magnet on each leaf, in a different position. Put two hall sensors behind, attached to the wall. When someone flips a leaf, the magnetic field will change detectably.

• I like this idea - are magnets additive (more magnets the more strength)? Are there any projects like this that have been done before? Dec 5 '15 at 22:52
• You might place one small thin magnet on the back of each card at further and further positions then use 9 Hall sensors at the corresponding positions to detect the additional cards (1-9) laying over the 0 card.
– Nedd
Dec 5 '15 at 23:09
• You should be able to detect the number of magnets easily, yes. There's a few ways you could do this; as @Nedd says, you could have the magnets in different places on the cards, and perhaps a reed switch behind each position. Dec 6 '15 at 2:40
• Is there anyway to do this with a magnet in the same place on every card and the sensor could determine when an extra magnet had been added? Placing 9 magnets on different spots could get confusing in an application. Dec 6 '15 at 15:38
• Yep, I'm sure you could detect multiple magnets in the same place with a standard hall-effect sensor. If doing it with the same magnet doesn't work, you could have slightly larger magnets on each card. Dec 6 '15 at 15:50

Mark a binary code on the bottom of each card and use photosensors to read them.

Scorecards showing '8' and '6'.

Binary code is

8 4 2 1
- - - - = 0
- - - X = 1
- - X - = 2
- - X X = 3
etc.


You would need some logic to decode the binary code and get it into whatever format you want (but your question doesn't explain that).

Code could be placed on rear if that suits the sensors.

• I think the problem here is there'd have to be a sensor out in front of the cards which could be awkward Dec 5 '15 at 22:44
• What exactly are you trying to achieve? Remote reading? Dec 5 '15 at 22:45
• Yes - trying to allow people not on the tennis court to know what the score is by when people flip a scorecard. Dec 5 '15 at 22:48

The photosensor option:

Photo 1. Card '0' and card '6'. Blue dots represent the photosensors.

• Position nine photosensors behind the cards to line up with the 0 to 8 cutouts shown in the photo. The photosensors may need a short black tube in front to prevent stray light affecting operation.
• On each card cut out the number of tabs to match the number on the card. Card '0' has no tabs removed. Card '6' has six tabs removed. Tab '9' is never removed.
• The logic for decoding the card is trivial although it does require more inputs than, for example, a binary coded system.
• Configure the circuit to give reliable operation in various lighting conditions.

If you can get this to work reliably the big advantage is that the photosensors all go behind the cards, out of harm's way.

You may need to give some thought to protecting the bottom edge of the cards as any dog-earing through use may affect operation.

• Do photosensors work outdoors? I tried something similar to this but the sun was interfering. Dec 6 '15 at 15:35
• We want the Sun to interfere with the darkness that would otherwise be there! If you were trying to detect a signal in the presence of bright sunlight you probably experienced saturation of the sensor by the Sun. In this case we're looking for discrimination between reasonably dark and reasonably bright. Dec 6 '15 at 15:44

Here's a slightly crazy idea.

• Glue a resistor to each card, threading the ends through the holes in a manner to ensure that when the card hangs on the rings the resistor touches both rings. You may be able to create a little pocket for the body of the resistor to help the stack lie flat. In the schematic below SW0 + R0 represents card '0', etc.
• Insulate the back half of the rings (or just one of them) so that they don't contact the resistors on the fliped-over cards.
• Connect 12 V negative to one ring.
• Connect 12 V positive to the other ring through a 10k resistor.
• The voltage across your rings will be the score. 0 -> 0V, 1 -> 1V, etc.
• You may need to add weights to each card to pull them into contact with the rings. Some open-sided lead fishing weights might do the trick.

simulate this circuit – Schematic created using CircuitLab

How it works

When '9' is showing it is the only resistor left in a circuit consisting of the 10kΩ RS and the 30kΩ pull-down, R9. The result is 3/4 of supply voltage = 9 V.

When '8' is there as well we want 8/12 of the 12 V so we need to add enough resistance in parallel with the 30kΩ to bring the combination down to 20kΩ. By parallel resistance formula we can show that 60kΩ is required.

The exercise continues for each step resulting in the following table for a 12 V supply and 10kΩ RS.

Digit    Rp* (k)   Rc** (k)
0        0.00      0.00
1        0.91      1.67
2        2.00      5.00
3        3.33      10.00
4        5.00      16.67
5        7.14      25.00
6        10.00     35.00
7        14.00     46.67
8        20.00     60.0
9        30.00     30.00

• Rp is the parallel combination of all the resistors left in contact with the rings.

• Rc is the resistor on this card (digit).

If you want to run the simulator on this then double-click each switch in turn starting from the left and change the contact to 'open'. A spreadsheet is your friend when working out some of this stuff.

You now have the choice of using a great big analog meter or feeding into an ADC. Now where can we find a 3 foot diameter analogue 10 V voltmeter?

• I like this idea but not sure I'm following. So would you tell which card is in front by when the resistor on that card is touching the rings? Dec 6 '15 at 15:46
• No. If score is 3 then, on the schematic, SW0, SW1 and SW2 are open. The other seven resistors are still in parallel dropping 9 volts across RS and leaving 3 V on the meter. Dec 6 '15 at 15:52

At 1/4" thick, ultrasonic measurement springs right to mind - 5 seconds of web search brought up sensors claiming 1mm resolution from over 1000mm away, which is about 6 times what you need to tell when one is added or removed...

Then again, a bar code reader would do nicely.

If the number & order of cards is fixed, you could do both of these things from the backside since you don't want anything out front - read the back of the next card to be flipped, or read the thickness of the stack of cards that have not yet been flipped.

• Trouble with ultrasound is you'd need to directly couple the transducer to the cards with something that has a similar acoustic impedance. Otherwise the cards would act as a near perfect reflector and you would only be able to tell how far the stack is from the transducer, not how many cards deep it is. Dec 5 '15 at 21:39
• But that's all you need to do - put the sensor out in front of the stack, and see how close the front of the stack is to the sensor. You know where the sensor is, and you know how thick each card is, so that tells you how many cards. Mind you, it would be simpler just to count them as they are moved unless someone moves two at a time. Dec 5 '15 at 21:42
• Could ultrasonic count the number of cards? It looks like distance would work well. Dec 5 '15 at 21:43