CMOS ICs and Pullup\Pulldown(?) resistors

Discussion in 'The Projects Forum' started by Agent24, Jul 13, 2011.

  1. Agent24

    Thread Starter Member

    Jun 14, 2010
    23
    0
    I know this is probably going to be a moronic question but as of right now I am a bit confused by this particular circuit.

    The circuit in question is not my own and is from here:
    http://roznerd.blogspot.com/2009/12/2-digit-7-segment-updown-counter.html



    For example, what is the purpose of R21? When S3 is up, the resistor is bypassed, but when down it still connects the input to the 5v rail. I also question R39 for the same reasons.

    The video on the blog shows the circuit working so I guess it's OK, probably just be me not understanding it properly.


    The only thing I think I am sure of is that IC1C should have the unused inputs tied to ground
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    R21 ensures that IC1D pin 12 is never "floating". S3 could've been a SPST switch to ground instead of a SPDT switch.

    R39 is a waste of power. After looking at it some more, the connections to IC1B and IC1D make it so that you won't be able to select the direction of count. I have no idea why they made that area so convoluted.

    C1 should not be where it is; all it will do is cause S2's contacts to burn out quickly.
    IC1C's inputs should not have been left unconnected.
     
    Agent24 likes this.
  3. Agent24

    Thread Starter Member

    Jun 14, 2010
    23
    0
    Thanks for the quick reply! Now I have a couple more questions...

    I don't understand the up\down counter selection much either but the video shows it working just fine so I guess it works somehow..

    Why would pin 12 of IC1D ever be floating? With the switch used isn't it only ever either at 5v or 0v? Or would the problem occur while the switch was being toggled?

    How could I fix the issue with C1?
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    The problem might occur when the switch S3 is being toggled.

    Either remove C1 from the circuit entirely, or add a 1k resistor between S2 and C1.

    Also, R31 through R38 should be replaced with wire. Otherwise, the J1 thru J4 inputs would be at 1/2 the voltage supply if the S4 and S5 switches were closed. That is a very un-good thing, as 1/2 of the supply voltage is an indeterminate logic level.
     
    Agent24 likes this.
  5. Agent24

    Thread Starter Member

    Jun 14, 2010
    23
    0
    Great! So I will:

    1) Remove R39
    2) Add 1K resistor in series with C1 or remove completely (it might be needed for debounce to work?)
    3) Replace S3 with an SPST and ignore 5v connection for simplicity
    4) Replace R31 through R38 with wire (or remove them and S4\S5 completely as I doubt I'll need them anyway)

    Just one last question - if I remove S4\S5 etc, do I actually need R19\R27 and associated resistors that connect the J-Inputs to ground?
     
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    It's very late and I'm tired.

    There are mistakes on that schematic, and I don't want to give you "bum scoop".
     
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    and also the ground from pin 6; connect pin 6 to pin 5 instead.
    You can do either, or both, and the debounce will still work.
    There is another necessary modification; remove the wire from pin 13 to the junction, and connect pin 12 to pin 13.
    If you replace S3 with an SPST between +5v and pin 12, you will need to connect a 10k resistor from pin 12 to ground.
    If you replace S3 with an SPST between ground and pin 12, you will need to connect a 10k resistor from pin 12 to +5v.

    If you elect to remove S4 and S5, you should connect all J1-J4 to ground; the resistors below R19 and below R27 won't be necessary.

    Nope, just connect those to ground.

    Don't forget to connect the inputs to IC1C to ground.
    The resistors on IC4/IC5 pins 3 and 4 are not necessary; just connect them to +5v.

    VERY IMPORTANT! There is no 0.1uF capacitor shown from the output of the 7805 regulator to ground. This is required. Without it, the regulator might oscillate at high frequency. On an actual regulator, the GND and OUT pins are next to each other; connect the cap as close to the regulator as you can.
     
    Agent24 likes this.
  8. Agent24

    Thread Starter Member

    Jun 14, 2010
    23
    0
    Thanks again for your contribution and help! I have learnt much more about digital circuits since posting this (actually can't believe how long it's been!), and can now understand clearly how several of the things in this circuit don't make sense.

    There is also a horrible mistake I think neither of us noticed before - the carry out (pin 7) on the 2nd counter (IC2) is shorted directly to ground!

    I never actually built this circuit, unsure if I ever will. It was something I thought could be "fun" and maybe useful to build in SMD parts as a soldering skill test, however I ended up building other things.
     
Loading...