Counter/timer, but how?

Discussion in 'General Electronics Chat' started by Jacob J, Jan 19, 2011.

  1. Jacob J

    Thread Starter Active Member

    Jun 18, 2009
    159
    0
    Hey all

    The idea:

    If I have two photoresistors that is placed 20cm's apart. The first one starts a counter, the other one stops it. After that, it has to display how much time it took between the two photoresistors got triggered. The time it has to measure is between 1/500 - 1/4000 seconds.

    I was thinking of two 555 timers, the first photoresistor triggers the 555 timer, wich puts a signal out to a counter to start it. When the light disapears over the second photoresistor, it triggers the second 555 timer wich stops the counter.

    But how would I do this?

    /Jacob
     
  2. Jacob J

    Thread Starter Active Member

    Jun 18, 2009
    159
    0
    I have found this circuit:

    http://www.circuitstoday.com/wp-content/uploads/2008/02/stopwatch-1.JPG

    But as I can see, it only counts in minuts and down to 1/100 of a secound. That isnt low enough. I dont need the minuts, so can I somehow get it to count lower times, so I get down to the 1/4000's of a second or lower?

    Is it possible to somehow do some math on the time insteed? So if I get a time out of the circuit it then gets converted to meter per seconds? This way around I dont have to calculate on the times that the circuit spits out.
     
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You could reduce the size of C1 to increase the speed of the 555 timer.
    3.3uF -> 0.33uF ~= 10x faster.
    3.3uF -> 0.033uF (33nF) ~= 100x faster.
    It's not going to be very accurate; if you need accuracy you'll need to use a crystal oscillator.
     
  4. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    I doubted you can get that fast response time with photoresistor like LDR.

    Use phototransistors instead.
     
  5. Dyslexicbloke

    Active Member

    Sep 4, 2010
    420
    19
    You need to be thinking in terms of circuit elements ….

    (1) A clock IE something capable of producing pulses at a rate equivalent to or faster than the minimum time interval you need to measure.
    You will also need a way to start and stop the clock or switch (gate) its output unless the counter can be enabled and disabled which would have the same effect.

    (2) A counter, one you can reset.

    (3) A latch, to hold the current counter value, and display showing the latched value.

    Operation ….

    When the first sensor is triggered:-
    (Possibly - Reset the counter)
    Start counting
    (You may also want to reset the latch and display)

    When the second sensor is triggered:-
    Stop counting and latch the new value to be displayed
    (Possibly - Reset the counter)

    Dependent on what IC’s you pick there will be many slightly different ways to do this requiring slightly different approaches to the order in which things happen.

    Many counters have built in output latches that will latch the current counter value whilst the counter continues to run but they are also likely to share a reset input which will clear the latch when the counter is reset.

    You will probably want to run your clock much faster than your minimum timing interval and use a second counter as a pre-count to divide its output before it is fed to the actual counter you want to read.

    If you go that way you can afford to use the first clock pulse, during the start pulse, to reset everything, and latch an enable signal.
    When you see a stop pulse, latch the second counter value onto the display and reset the enable signal.

    If you want the display to read m/S you will need do a calculation … I was about to suggest counting down from some preloaded value but that isn’t going to work because the relationship isn’t linear.

    Given that, you may be better just using a small micro-processor to do everything which would probably be simpler to build in the long run.

    I’d be interested to know if anyone knows how to do this with counters and registers?

    Alistair
     
  6. Jacob J

    Thread Starter Active Member

    Jun 18, 2009
    159
    0
    I dont know anything about microcontroller programming, but will I not need a pic-burner or something like that, then programm it and put it into my circuit and connect the in and outputs as needed.

    Ive found this circuit. What do you think of that? Its output is ohms which corrispond to fps and which can be read of an multimeter.

    http://www.dutchforce.com/~eforum/index.php?showtopic=32595

    Will this be accurate enough and is it possible to make the ohm-readout to fit m/s?
     
Loading...