forward and reverse counter

Discussion in 'General Electronics Chat' started by spelcaztr, Dec 10, 2011.

  1. spelcaztr

    Thread Starter New Member

    Feb 16, 2011
    12
    0
    Hi guys. I am looking for an idea of how to make a decade counter count forward and with a pulse count in reverse then with another signal count forward again. Basically it is like a human counter that is attached in a door to count how many is inside a building or a room. I have looked up for counter circuits but they only do a single function- either count forward or count reverse. Is this idea possible?

    We have a limited supply of parts here so we have no access to any advanced devices such as microcontrollers but we still have ICs. Anyway, thanks in advance

    Here is a video i found but i'm not spanish so i could not understand. but the video shows a count forward and back.
    http://www.youtube.com/watch?v=okG5dRIab60&feature=related
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Have a look on this page:
    http://www.kpsec.freeuk.com/components/cmos.htm
    The 4029 and the 4510 are both ICs that you could use.
    The 4029 can be used for either BCD or binary counting, up/down, with preset.
    The 4510 is BCD only, up/down, with preset and reset.
     
    spelcaztr likes this.
  3. spelcaztr

    Thread Starter New Member

    Feb 16, 2011
    12
    0
    Thanks for this. Just the exact thing i was looking for. i will update if i encounter any problem.
     
  4. spelcaztr

    Thread Starter New Member

    Feb 16, 2011
    12
    0
    hello again.. i Have constructed my circuit as shown in my attachment. Now i am looking for a way to delay the signal of the preset so that the clock and preset would be activated using the same signal so that after every clock pulse, the circuit will hold the last value. I have searched some ideas but none of them seem to work(at least in my ISIS simulation)

    And is there a way for an ic to switch the state of up/down using two different signal; signal 1 that turns it to high and signal 2 to turn it to low, other than using a latching a relay to the signal 2 (using a transistor as a short to ground) and opening the latch with signal 3? (hooking up the relay seems a little too bulky to the circuit)

    Thanks again.
     
  5. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Hi spelcaztr,

    Could you elaborate on what is happening? The count should not change unless there is a clock pulse. So, if your counter displays 6 and you don't send a clock pulse, the display will continue to show 6 until either a clock pulse is received, preset is set high, carry in is set high, or power is lost to the circuit.

    Preset is only used to "preset" the value of the counter before any counting begins. So, in your example, if you needed to tell the counter to start with zero, you would connect each of the preset inputs to ground and send a quick high signal to the preset to have the count start at zero. You should not need to tie the output of the 4029 to the preset input values.

    I'd suggest using a CD40110. It will take the place of the 4029 and the 4511 and it has separate count up and count down inputs. The only caveat is the 40110 does not have preset inputs but it does have a reset input so you can always reset the display to zero (just no other value).
     
    spelcaztr likes this.
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    How are you going to tell the difference between someone entering the room, and someone leaving the room?

    You need some method to determine which way through a door that someone is moving.

    At the same time, you need to be able to tell the counter which direction it needs to count.

    I cannot give you the answer, as this is obviously homework.
     
  7. crutschow

    Expert

    Mar 14, 2008
    13,014
    3,233
    Here's a hint on determining the direction of the people going through the door. Look up "quadature decoder".
     
    spelcaztr likes this.
  8. spelcaztr

    Thread Starter New Member

    Feb 16, 2011
    12
    0
    wow haven't visited this thread in a long time. Yup i have made a sensor that will distinguish who is entering and leaving. Something using Relays and sensors. :j first time i ever heard about a CMOS having 5 digit name. o_O but it sure rocks! Hope its available in my area. With this, i could bypass my problem to resorting to 74LS192 (limited in 5 volts). Thanks a lot guys, really appreciate that a lot!

    BTW door those wondering how the sensor work, (just use your imagination)
    For 74LS (different up and down pin)
    Outside
    Set+
    Go-
    Go+
    Set-
    Inside

    With both set latching the respective go to power and each go triggering a relay that would trigger the high-low state
    And each Set sensor unlatching each other.

    For CD4510 (common clock pulse)
    Outside
    Set+
    Go Count
    Set-
    Inside

    With each set triggering the up/high state and go triggering a count pulse.

    For those who are wondering, MC is not available in my are. ^^,
     
    Last edited: Mar 1, 2012
  9. spelcaztr

    Thread Starter New Member

    Feb 16, 2011
    12
    0
    Hello again. After building my circuit i came up with this (see below) all resistors are 10k except RVAR which i do not know what value to put. Put up only an adjustable POt (100k) series with a center tap (100k) Can anyone help me with this circuit? The circuit only works if the center tap pot has its parallel contacts shorted.

    With the current set up, at count zero, the relay is turned of, and with a count; the relay will turn on (base will push current that would drive the transistor as a switch) but after a reset (zero) the relay still remains turned on. (even though at count zero gives a -0.13V and any other count gives 2V)

    anyone has an idea to solve this somehow? I tried adding a diode to allow only positive current towards the base but the result remained the same. If it will help, i used a BC547 here
     
    Last edited: Mar 3, 2012
  10. crutschow

    Expert

    Mar 14, 2008
    13,014
    3,233
    What is the voltage at the transistor base?
     
  11. spelcaztr

    Thread Starter New Member

    Feb 16, 2011
    12
    0
    -3.xx up to 0 for low state and 2.xx for high state. It would seem that (according to my observation) the transistor is behaving like an SCR. After the activation (turn on of relay) it remained latched. I even added a Switching diode in the base to make sure that no negative current will pass through the base but it seemed that the transistor is failing to cut-off. (due to absence of base current).

    So any idea why?
     
  12. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You may have mis-wired the transistor or the relay.
    A 100k pot in series with the base is way too much.
    You have not said what the resistance of the relay coil is, or the rated current at the specified voltage. You need to know that before you can calculate what is needed for the base resistor.

    What transistor did you use?
     
  13. spelcaztr

    Thread Starter New Member

    Feb 16, 2011
    12
    0
    I don't think i have mis-wired the relay or the transistor. I have checked it a few times and rebuild it but get similar results. I think1n4148 could not properly limit the "high" (about 4.05 Volts) pulse from the "low" (about -0.27 Volts) pulse from CD4071

    As you have said, 100k pot is way too much, i just used it as a reference to get my desired resistance and it is now about 47k.

    The relay coil is about 109.xx ohms and has the description of 6v, 5A

    I tried using BC548 but only BC547 switched on the circuit properly. :j

    Maybe a higher resistance is needed to further limit the "low" pulse from the "high" pulse?
     
Loading...