The Naked Scientists

The Naked Scientists Forum

Author Topic: How do I build a ball counter?  (Read 6518 times)

Offline jakecee

  • First timers
  • *
  • Posts: 8
    • View Profile
How do I build a ball counter?
« on: 22/09/2009 15:40:58 »
I'm new to engineering so can anyone enlighten me please with what type of bcd counter and what type of 7 seg decoder i should choose? the voltage is around 5.1V after being regulated by zener diode. anyway the circuit I'm building is to count tennis balls. which ir emitter and ir detector are needed. once the tennis ball passes through, it cuts the infrare beam from ir emitter and so the active level switches from low to high (or vice versa) and thus triggering the counter to start counting and pass the digit to 7 seg decoder and lastly the 7 seg display lights up. if possible, can anyone tell me how to built the circuit and what type of components should i use? thank you lots lots lots!
« Last Edit: 02/10/2009 08:18:10 by chris »


 

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8122
  • Thanked: 53 times
    • View Profile
Re: How do I build a ball counter?
« Reply #1 on: 22/09/2009 17:24:41 »
The hairiness of your balls could be a problem, (not joking).

Because the ball does not have a sharply defined edge the IR beam will flicker as it passes through the hair at the edge of the ball.

Your circuit could misinterpret the flickering as additional non-existent balls, (i.e. over-count). 

Some sort condition could be applied to avoid this,
 e.g. only when the beam was interrupted for a period greater than X would it be counted as a ball.

[cf contact bounce ]
« Last Edit: 22/09/2009 17:35:03 by RD »
 

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8122
  • Thanked: 53 times
    • View Profile
Re: How do I build a ball counter?
« Reply #2 on: 23/09/2009 22:45:59 »
Ready made counters are available for about five pounds (less than $10).

Quote


COUNTER MODULE

An electronic Counter Module with 5-digit LCD display. The display increases by 1 every time a positive-going edge is applied to pin 3. A reset is available, and a tone output which can drive a piezo sounder directly and bleeps on every count and on reset. Square wave outputs at 512Hz and 32768Hz are also provided.

COUNTER MODULE Specification:
Current:   2A standby
   8A average when counting
Count range:   00000 to 99999 (resets
   to 00000 after count 99999)
Max. input frequency:   7Hz
Input voltage range:   1V to 15V
Min. duration pulse:   <100s
Overall size:   68 x 35 x 24mm

The apparently slow response time of this counter "7Hz" may sidestep your hairy ball problem: If true pulses shorter than 1/7th of a second won't be recorded by this device.
["7Hz" could be a typo, "7KHz" perhaps]
   
« Last Edit: 23/09/2009 22:57:42 by RD »
 

Offline LeeE

  • Neilep Level Member
  • ******
  • Posts: 3382
    • View Profile
    • Spatial
Re: How do I build a ball counter?
« Reply #3 on: 25/09/2009 00:10:31 »
7Hz seems awfully low for an electronic device, and doesn't really fit in with a <100s detector pulse duration.  It seems a bit daft to make a device that can detect pulses of less than <100s, but only if less than seven of them happen per second.  I reckon it's a typo too, and 7kHz is probably nearer the mark (and with a generous margin).
 

Offline techmind

  • Hero Member
  • *****
  • Posts: 934
  • Un-obfuscated
    • View Profile
    • techmind.org
How do I build a ball counter?
« Reply #4 on: 02/10/2009 22:16:53 »
S
I'm new to engineering so can anyone enlighten me please with what type of bcd counter and what type of 7 seg decoder i should choose? the voltage is around 5.1V after being regulated by zener diode. anyway the circuit I'm building is to count tennis balls. which ir emitter and ir detector are needed. once the tennis ball passes through, it cuts the infrare beam from ir emitter and so the active level switches from low to high (or vice versa) and thus triggering the counter to start counting and pass the digit to 7 seg decoder and lastly the 7 seg display lights up. if possible, can anyone tell me how to built the circuit and what type of components should i use? thank you lots lots lots!

See if you can get hold of a copy of the book "Adventures with Microelectronics" (or "Adventures with Digital Electronics") by Tom Duncan.
The books were published in the late 1980's and are out of print - but if you can get a library to get a copy for you they are very good at explaining things.
(although a few of the the more obscure components suggested are obsolete)

http://www.amazon.co.uk/Adventures-Microelectronics-Tom-Duncan/dp/0719536715/ref=sr_1_1?ie=UTF8&s=books&qid=1254518231&sr=1-1

These books use the 4000B series CMOS logic which can operate from about 5V to 15V - eg directly off a 9V battery, but the principles would be just the same using newer 74HC series 5V logic.

With regard to fluff on the balls, if you use a beam which isn't too narrow (probably ideally at least 5mm diameter - bigger than the fluff) and what's called a Schmitt-trigger buffer (a buffer with hystersis) between the light-receiver amplifier and the counter input, you'll probably be ok. The opposite, eg a 0.5mm dia laser beam would more likely be problemmatic.

Properly used, Schmitt-trigger inputs can be good engineering practice. The other way of avoiding multiple-counting is to have two light beams eg 2cm apart, and arrange that breaking the first beam 'primes' the counter, and the second beam-break increments the count - various forms of logic could ensure that you can't count more than once by 'tickling' one beam.
But if this is just for a demo project then I shouldn't worry too much unless it proves to be a problem.


In reality, if you use a simple continuous light beam you risk being sensitive to ambient light. A robust engineered solution would invariably used a pulsed light beam and a pulse-sensitive detector - but again for a simple demo this is something you needn't worry about.
« Last Edit: 02/10/2009 22:23:11 by techmind »
 

The Naked Scientists Forum

How do I build a ball counter?
« Reply #4 on: 02/10/2009 22:16:53 »

 

SMF 2.0.10 | SMF © 2015, Simple Machines
SMFAds for Free Forums