Not measuring 0v/gnd through ground resistor - Page 1
Forum section: electronics / beginners

author: bitman
author_rank: Unknown
timestamp: October 13, 2019, 09:48:39 pm
content: On the attached schematic (part of a larger clock control circuit of pure 7400 chips) I have a strange issue. On the bread board this works - the selector switch changes the output selector but on the bread board, I measure 1.2v on pin 10 and 11 which means I'm in the bad TTL zone and the selector isn't working. This is a very basic setup - I'm pulling down the input lines to gnd through a 100K resistor - but still I get 1.2V when measuring on the two pins.I would really like to understand why that is. I'm thinking a smaller resistor is needed but I am not sure I understand the reason for it. Note the LEDs that shows selected settings work as expected. When the switch is pulled high I do get 5v on the two pins. It's just not going to gnd as I expected.

author: nigelwright7557
author_rank: Frequent Contributor
timestamp: October 13, 2019, 09:50:47 pm
content: 100k is far too big.

author: bitman
author_rank: Unknown
timestamp: October 13, 2019, 09:52:49 pm
content: Quote from: nigelwright7557 on October 13, 2019, 09:50:47 pmOk - but why? I'm trying to understand the principle (it's simply picked to make the number of different resister sizes as low as possible).

author: rstofer
author_rank: Super Contributor
timestamp: October 13, 2019, 10:05:39 pm
content: Ohm's Law and the datasheetGrabbing a 74xx datasheet:https://www.jameco.com/jameco/products/prodds/910901.pdfIIHis 40 uA max so there is a current flowing into the pin when high.VIHis as low as 2.0V - this is the minimum voltage on the pin that represents a logic 1So, the 40 uA flowing through the pull-up resistor can't drop more than 5.0V - 2.0 or 3.0V3.0V = 40 uA * R or R = 75K Ohms. This is NOT a good value to use even though it meets the specsI use 4.7K or even as low as 1K because I need enough current flow through the mechanical contacts of a switch to keep the circuit controlled. Contacts tend to have some amount of oxidation and it takes voltage to poke through it. It takes current flow to keep the connection 'made'. That's why they invented switches with bifurcated gold plated contacts for low level switching.

author: floobydust
author_rank: Super Contributor
timestamp: October 13, 2019, 10:20:41 pm
content: Always remember TTL gate inputs float high, you have to sink current (~0.4mA) to take them low.So your DIP switches are best going to ground, or the 100k should be much lower value.

author: rstofer
author_rank: Super Contributor
timestamp: October 13, 2019, 10:26:43 pm
content: OOPS! I worked the case for pull-up resistors! Pull-down is far worse:VILis 0.8V and ILis 1 mA so R = 0.8V / 1 mA or 800 Ohms.In other words, to get an input down to logic 0, you have to flow 1 mA out of the pin and this can't result in a voltage higher than 0.8V across the resistor. Again, a value half that is probably recommended.In fact, I never use pull-down resistors for TTL... Among other things, when it comes time to pull the pin high, like to 5V and given a 470 Ohm resistor, I would need to flow 10 mA through the switch. This might be an issue.

author: Audioguru again
author_rank: Regular Contributor
timestamp: October 13, 2019, 10:36:11 pm
content: It is shown on the datasheet.For an old-fashioned 74xxx the input low voltage should be 0.4V and the datasheet says the maximum input low current low is 1.6mA so a pull-down resistor value is 0.4V/1.6mA= 250 ohms.For an old fashioned 74LSxxx the input low voltage should also be 0.4V but the maximum input low current is only 0.4mA so the pull-down resistor should be 1k ohms.

author: MarkF
author_rank: Super Contributor
timestamp: October 13, 2019, 11:09:02 pm
content: Always use pull-ups.Some logic gates do not like their inputs tied directly to Vcc.

author: soldar
author_rank: Super Contributor
timestamp: October 14, 2019, 09:23:39 am
content: https://en.wikipedia.org/wiki/Transistor%E2%80%93transistor_logichttps://en.wikipedia.org/wiki/File:7400_Circuit.svg

author: bitman
author_rank: Unknown
timestamp: October 27, 2019, 07:49:36 pm
content: I again have a lessons learned here. I didn't even bread-board this before just changing the schematic to force a high default. Only to realize post putting it together that nothing works.First, I do appreciate the input - it was exactly what I asked for - learning why things didn't work as I expected. And yes, this is old 7400 series stuff - it still shows huge holes in what I thought I knew, so I'll keep on "hacking" on my simple 7400 CPU until I get all the basics down.Of course the issue here is, the the 74151 is a multiplexer - based on a selector a given input signal is selected and send to the output. The way your quickie diagram shows it, the LED now shows the negative (complementary) of the signal going into the selector - that's definitely not what I wanted. The LED is the indicator of what the selector is set to - and us humans like counting the "on" vs. the "off" to see if things are active.It's not a problem if the switch is "turned on" when you actually break a circuit - as long as the LED follows.Another issue that I'm now hunting on bread-boards is that regardless of throwing the switch, I still get almost 5V on the selector signals. The LED turns on/off just fine, but the signal that controls what happens doesn't change to low. When I measure the pins with the volt-meter it keeps showing a 4.7v potential on the selector leg, even though it should be forced to ground. I wonder if connected the 330ohm resistor the the 4.7k ohm that gets pulled to ground would make the LED follow the input signal. Well, time to test ...So lesson learned, don't just change the diagram with out testing it first. Or rather, even if the change seems simple you should still test. I do that for software - no clue why I didn't apply that for hardware too.

author: rstofer
author_rank: Super Contributor
timestamp: October 27, 2019, 09:00:34 pm
content: You can turn the switch around (metaphorically) and for each specific LED pattern, you wire the input to the proper pin. They won't be in the order they are now but so what? When both LEDs are lit, you are apparently selecting input 3. Fine, whatever signal should be active as input 3 should be connected to the chip input IN0.SW LEDsClosed Closed ON ON Looks like selection 3 so connect 3rd signal to IN0Closed Open ON OFF Looks like selection 2 so connect 2d signal to IN1Open Closed OFF ON Looks like selection 1 so connect 1st signal to IN2Open Open OFF OFF Looks like selection 0 so connect 0th signal to IN3

author: bitman
author_rank: Unknown
timestamp: October 27, 2019, 10:54:43 pm
content: I did a breadboard using the original design but using resistors to connect ground and high directly to the chip as indicated here. This works - my original design did not use resistors between ground and the entry point, so I guess that's the problem and I'll have to revisit the calculations shown here to get the proper values. This is my guestimate that looks like it works when isolated:And the breadboard if anyone is interested looks like this - this behaves as expected. When the two selectors are low, the "LowBit" switch is connected to out. When the first switch is high, the "HiBit" works (yeah, bad name). And when the second dip switch is high and the first is low I get a constant high. This is for proof of concept only - there are 3 input signals in the real circuit - it's not using push switches.So I'm not getting the "default to high" - if I did that, I would have S2 high and give me the wrong result (or I would of course have to use different output pins). I've always pulled unused pins to low and it's never caused an issue - but reading between the lines here, it seems to be more efficient to tie them high. I'll have to experiment some more here to understand it more.But it looks like that when I need signals to toggle, using a resistor via gnd or +5v results in more reliable results for me.So yes - still a confused newbie but on the right track (I think). Thanks again for the posts. While this may be basic for some of us - it is really helpful to me.

author: bitman
author_rank: Unknown
timestamp: October 27, 2019, 11:06:57 pm
content: Quote from: rstofer on October 27, 2019, 09:00:34 pmThat's how I implemented going from the original "gnd" when closed to "+5v" when closed. I can move things like led positions easily - that's not the challenge. The problem I had was that the switch position didn't matter. I kept measuring either +5v or gnd regardless of switch position. Now that I have the resisters between +5v and the switch, and the resister array between the switch and ground. While I still need to get the exact reason for this, it solves the problem.But you're right - I could use different output lines - I would just have to redesign the PCB and get new ones made. Adding a resistor or two is something I can do without getting a complete new PCB.