Why do I need this resistor?

Discussion in 'General Electronics Chat' started by mcgski, Jan 18, 2011.

  1. mcgski

    Thread Starter Member

    May 6, 2009
    13
    0
    First off, I'm not a circuit guy but more a code jockey. I got my Comp Sci degree in the 80's when you had to learn digital logic to graduate and spent about four years programming embedded system in the mid 90's. So the upshot is I know enough to be dangerous. I ran across this problem that I eventually solved but quite honestly don't know why it worked and I really want to learn what's happening.

    I have a simple security sensor that puts about a 50 ms pulse out when tripped. I want to latch the signal so I used a simple NAND gate latch with signal and reset both active low. The input signal for the latch is going into a SN74LS00N component with 5v power. The same 5v is going through the sensor to produce the signal pulse.

    Everything is hooked up correctly and I'm using a scope to watch the timing. The signal from the sensor is going from 5v to zero (or about that) but when I hook it up to the 7400 chip, the voltage never gets below 1.2v. The result is the latch never triggers.

    I was able to add a resistor to the signal pin and connect it to GND. The input voltage dropped to about 4.4v (enough to be considered high for the part) and on the sensor pulse dropped within range to signal a low pulse and activate the latch.

    My question is why is this needed? I seem to recall when I worked with this stuff that there might be some "pulling up" of some of the voltage from the part which translates to the input signal. That's why I tried the resistor in the first place. It was like I needed to pull it low a bit to get the 7400 to trigger.

    I'm sure this is a noob question so if there are any tutorials you can point me to with the answer, blast away.

    Thanks in advance!!!
     
  2. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    I have a possible answer, but it depends on your answer to these questions:
    Are you making your measurements with a low cost (OK, cheap) analog multimeter?
    What is the sensor?
     
  3. mcgski

    Thread Starter Member

    May 6, 2009
    13
    0
    The sensor is a Window Bug glass break sensor.

    I'm using a low cost digital scope - DSO Nano v2 from Seeed Studios.

    (http://www.seeedstudio.com/depot/dso-nano-v2-p-681.html?cPath=104_108)

    Certainly nothing fancy but should work for something this simple, right?

    I'd blame the scope but the same happens with or without the scope attached. I've used a micro controller to sense the latch signal and an LED.

    Thanks.
     
  4. marshallf3

    Well-Known Member

    Jul 26, 2010
    2,358
    201
    Either you've got a defective 74xx chip or you need to move on to the 4000 series CMOS logic chips as your triggering device may be the problem.
     
  5. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    Show us the circuit of the NAND latch.

    Have you used pullup resistors to pull the signal input pin HIGH? What is the resistance?
     
  6. mcgski

    Thread Starter Member

    May 6, 2009
    13
    0
    Here's what I put together with Eagle. Don't even know if it's correct, but it models the best I can of my breadboard.

    It's a 1.5K resistor and the signal from the sensor is HIGH already.
     
    Last edited: Jan 19, 2011
  7. Papabravo

    Expert

    Feb 24, 2006
    10,137
    1,786
    Pull down resistors on TTL gates are generally speaking a really bad idea. The reason has to do with the fact that the input will source current into the pull down resistor. If the input sources enough current then the voltage on the input rises above the VIL threshold of 0.8V. No nothing you do can make the input go low.

    An unused TTL input should ALWAYS be pulled up; in the low state it will source 1.6 mA. If R1 & R2 are 1.5K then
    Code ( (Unknown Language)):
    1.  
    2. 0.0016 mA * 1500 ohms = 2.4 Volts
    3.  
     
    mcgski likes this.
  8. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    I also noticed that you don't have current limiting resistors on the LEDs.

    This is very bad because you are also taking the output logic voltage back to the NAND gate input.

    The input voltage to the NAND gates will be clamped by the LED to never higher than 2V, even with the NAND gate output HIGH.

    The LED and/or the gate might get damage too.

    Remember to include current limiting resistor to LED as a general good practice, especially if the output voltage are also fed to other parts of the circuit.
     
  9. mcgski

    Thread Starter Member

    May 6, 2009
    13
    0
    Hmmm.

    So a better way to do this would be:

    1. pull up resistors on the unused inputs of the NAND gate. Leaving them float might be the reason I'm getting higher than expected voltages on my outputs.

    2. Take off the pull down resistor on the used input from the sensor. Bad for circuit in general.

    3. Voltage limiting resistors on the LEDs. While I don't think it's my problem, it's a bad thing for the circuit in general.

    Thanks again for the help guys....

    EDIT:

    So I got home from work and tried this out. Rewired the breadboard and still getting higher than expected voltages on the input. The pull down resistor on the sensor input is the only thing that drives the signal down low enough to trigger the VIL on the 74LS00 NAND gate.

    The 7400 part is the culprit here I think. Without the connection to the part, the sensor gives a nice square 5.08v -> 0v pulse. Connected to the chip without the pull down resistor, it's only getting down to about 1.3v from 5.12v. Too high to trigger the .8v max on the part.
     
    Last edited: Jan 20, 2011
  10. marshallf3

    Well-Known Member

    Jul 26, 2010
    2,358
    201
    Change over to a 4000 series part and report back.
     
  11. mcgski

    Thread Starter Member

    May 6, 2009
    13
    0
    That seemed to do it.

    Why such a big difference between the 7400 and the 4093BCP chips? I realize the later is CMOS so it has different electrical properties. Should I be using these 4000 series equivalents in future designs?

    Oh, and thanks for your patients on this and for all of the help.
     
  12. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Wait a minute - are you using 74LSxx like the schematic shows, or 74HCxx?
    The 74xx, 74Lxx, 74LSxx, etc are very old TTL specifications.
    74HC are much newer. If you're using 74HC, no point in going to 4000 series, which are older and slower than the 74HC type.
     
  13. mcgski

    Thread Starter Member

    May 6, 2009
    13
    0
    I was using the 74LSXX

    So 74HC should be what I use from now on then?

    What's the difference between LS, 4000, and HC?

    Thanks!
     
  14. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    The 74xx, 74S, 74LS, etc are all transistorized - used a lot of power, and the voltages don't approach the power rails.

    The 4000 series are CMOS, developed by RCA as a new-fangled way to save power and have a much wider range of voltage supplies. They're rather slow, and have a limited current source/sink capability.

    The 74HC are high-speed CMOS; they consume far less power than the old transistorized 74xx/54xx series, and are much faster than the 4000 series - and they are compatible with uC's.
     
    mcgski likes this.
  15. marshallf3

    Well-Known Member

    Jul 26, 2010
    2,358
    201
  16. mcgski

    Thread Starter Member

    May 6, 2009
    13
    0
    Thanks. So what do you think was causing the issue I had? Same sensor, different ICs. The 74LSXX needed the pull down resistor or it would never get below the VIL threshold. The 4000 (and I'm guessing the 74HC/TXX) parts do not need the pull down resistor. The input sensor signal goes from 5v -> 0v on pulse.
     
  17. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Your input signal simply cannot sink enough current to pull the 74LS00 input to a logic low level.

    Internally, the "front end" of the 74LS00 has an array of Schottky diodes connected to a 20k pull-up resistor. If the inputs are left disconnected (floating), they will be pulled to a logic high by this 20k resistor.

    Go to the Texas Instrument website at http://www.ti.com
    and download the datasheet for the SN74LS00.
    http://focus.ti.com/docs/prod/folders/print/sn74ls00.html
    The internal schematic for the 'LS00 is on page 3, lower left.
     
Loading...