Why does the right-hand button increase the LED brightness in this NAND gate?

Thread Starter

Nessus

Joined Feb 24, 2018
9
Excellent point eetech, especially considering I'm trying to build up to making a basic computer :$

Thanks everyone for being so amazingly helpful, especially given how badly I explained myself.
 

WBahn

Joined Mar 31, 2012
30,088
The LED is connected directly to ground, it's connected to positive rail through the resistor at B28 (next to 2 orange jumpers)


Sorry another goof, I've reversed the LED in the schematic below



Thanks, the circuit does work as I said but could you explain how more current flowing through the LED when only S1 ( right button in breadboard shot) is being pressed?
The LED clamps the voltage at it's anode to something around 2 V. That means that when you press S1, the transistor acts like the collector is an emitter (with the collector open-circuited) which means that it basically acts like a diode. You are thus putting two 680 Ω resistors almost in parallel.
 

Thread Starter

Nessus

Joined Feb 24, 2018
9
Thanks again eT,

I think I get the circuit layout for the most part, can I just ask why R5 and R7 are needed at those specific resistances?

Firstly my impression from looking at the schematic is that R5 is required to prevent a short when both PBA and PBB are pressed in the AND circuit and R7 prevents current flow to the base of Q3 when both are pressed because it's higher than R5.

Is it just a rule of thumb that if you don't want current to "overflow" down another path you should double the resistance at that path? And if so why 2200 ohm specifically? Was it just the next resistor in the parts bucket or is it to err on the side of caution or is there a much more mathematical approach that brought you specifically to 2200?
 

ElectricSpidey

Joined Dec 2, 2017
2,786
That's a spice model...you don't need to have any parts in bucket...so to speak, the values are chosen using math or trial and error. (good guesses work too...:))
 

ebp

Joined Feb 8, 2018
2,332
If I remember to do it, I'll dig out some old RTL data. It has been a very very long time since I've looked at it, but I'd be extremely surprised if a NAND gate was implemented in the fashion shown here. It is totally unworkable for more than 3 inputs and each input has different characteristics. The output behavior is inconsistent with other members of the family.

I suspect a 2-input NAND was build with 5 transistors - a NOR gate (negative-AND, by DeMorgan's Th.) requiring 2 transistors, with an inverters on the inputs and output.

RTL ICs used quite low value resistors in part because resistors take a lot of chip area. Given the comparatively low gains of the transistors and high collector current, leaving inputs open circuit will not cause misoperation (behave as logic 0), but it is best practice not to allow them to float.

I think I still have some Sperry RTL ICs in flatpacks, probably made in the 1960s. People think surface mount is something quite recent. It isn't.
 

Audioguru

Joined Dec 20, 2007
11,248
When you re-invent The Wheel then isn't it better to look up a tutorial about how to do it properly instead of "trial and error"?
Oh, maybe you are in the woods and not in civilization? But the internet is not available in the woods.
 

Thread Starter

Nessus

Joined Feb 24, 2018
9
Thanks Bertus & Ebp, as I said I'm not looking for the "right" way to do it, I'm just trying to understand how mine went wrong.

Audioguru my point is I learn more from my mistakes than from copying by rote, I apologise if I offended you in telling you how I prefer to learn that was not my intent
 

ebp

Joined Feb 8, 2018
2,332
bertus, I don't think that helps. As I said previously, the "natural" gate in RTL is a NOR, not NAND. That presentation seems to want to coerce everything into being NAND, and repeats the "bad" RTL NAND structure. Neither the 2N2222 nor the resistor values were in any way "typical" for RTL, though they might be used for building gates from discrete components.

I found what data I had for RTL - not a NAND gate in the lot. I've attached the file, in case anyone is interested. There is not date on it that I can see, but it predates use of postal codes in Canada. I suspect it is from the late 1960's or early 70's.

There is a cross-reference table that may make finding more data on the web possible. I had forgotten about the HEP series from Motorola. There were all sorts of HEP components aimed specifically at hobbyists. (Hobbyist Electronic Parts ??)

[EDIT - I had a quick look on the web for some of the uL9xxx numbers and some HEPxxx numbers. I found no data. Unlikely as it seems, that scan may be the only RTL data anywhere on the web.
 

Attachments

Last edited:

ElectricSpidey

Joined Dec 2, 2017
2,786
Thanks I'll need to look up spice I think :)

I'm trying to build up my intuition and understanding by creating things myself, I think it's more productive than simply copying a schematic to a breadboard

I agree, one of the first things I designed after taking my basic electronics course was a cascading ten step counter without using a osc.

It wasn’t perfect, and now I just use chips…but the learning experience was invaluable.
 

ebp

Joined Feb 8, 2018
2,332
LTSpice from Linear Technology seems to be very popular and it is free. Used sensibly it can be a great aid to understanding how circuits work. How much a simulation will tell you depends on how good the models for the device are. A "good" model for a capacitor, for example, has the ideal capacitor with a resistor across it for leakage current (or something even more elaborate), an resistor in series with it ("ESR"), an inductor in series with it (they're EVERYWHERE!) and maybe even more to model voltage dependence of capacitance, dielectric absorption, etc. But lots can be learned with "ideal" device models.
 

Audioguru

Joined Dec 20, 2007
11,248
I learned RTL and DTL by working with an office computer in the 60'ies that used them. The program was fed with punched cards and the RAM was tiny ferrite cores on many wires. The actual logic ICs were used and I learned logic with them. I fixed a serious problem by piggy-backing a DTL IC on top of an existing IC and luckily they were open collector so nothing needed to be cut.
Since I already knew how transistors work I never made a gate with a bunch of parts.
 

ebp

Joined Feb 8, 2018
2,332
Experimentation and "inventing things for yourself" is very valuable in gaining understanding and "intuition" when you do ask questions like "Why is this happening?". If everyone just built stuff the way someone else did, nothing new would ever be invented. You may invent something that is "not the way we do things, doncha know" but that doesn't matter in the slightest if you still come out having learned something when learning is the objective. Do your thing. Look at the ways others do it. Compare and contrast.

Carry a truncheon on you belt. When someone sticks their nose in and says "you should ...", don't be afraid to reach for your truncheon. Of course if it is someone who really does know a lot and is good at patiently working with you, not just telling you what to do, it's a different matter. The first time someone grabs pliers or an oscilloscope probe or a meter lead from your hand without asking permission and being granted leave - snap their hand off at the wrist and smack 'em in the face with it. Nail the hand to the wall in your workspace as a warning to others.

I think I'm done telling you what to do, now. ;)
 
Last edited:

dl324

Joined Mar 30, 2015
16,943
You'll probably have more luck if you use your RTL gates more conventionally. That is, put the load on the collector instead of what you're doing now.

If you want to do what you're doing now, you should buffer the outputs of the gates so the output voltage isn't dependent on the number of inputs or their state.
Firstly my impression from looking at the schematic is that R5 is required to prevent a short when both PBA and PBB are pressed in the AND circuit and R7 prevents current flow to the base of Q3 when both are pressed because it's higher than R5.
R5 does prevent a supply short when both buttons are pressed, but a better way to look at it is that when both transistors are off, R5 provides the logic HIGH.
Is it just a rule of thumb that if you don't want current to "overflow" down another path you should double the resistance at that path? And if so why 2200 ohm specifically? Was it just the next resistor in the parts bucket or is it to err on the side of caution or is there a much more mathematical approach that brought you specifically to 2200?
Since the collector resistors affect how much current the gate can source, you want it appropriately small, but not so small that you waste power. When logic gates are designed, one of the things you have to define is fan out; how many other gate inputs you can drive without affecting the output logic level enough to affect circuit function.

The base resistors should be sized appropriately to drive their transistor into saturation. The rule of thumb is Ib = 0.1Ie.

For your experimenting, you can use 680 ohm resistors for everything, but you can optimize the circuit by using more appropriate values.
 

WBahn

Joined Mar 31, 2012
30,088
Thanks I'll need to look up spice I think :)



I'm trying to build up my intuition and understanding by creating things myself, I think it's more productive than simply copying a schematic to a breadboard
Engineering is both an art and a science. The art is learning from your own mistakes and the science is learning from the mistakes of others.

Arguably the art is the better teacher, in that we tend to learn more thoroughly from the mistakes we make ourselves, particularly if we have to struggle through and correct them ourselves (or at least mostly by ourselves). That's why the Homework Help forum has the rules that it does. But this method of learning is also very slow and limited in scope -- we simply don't have the time to make all of the mistakes that we need to in order to get fully up to speed. So you also need to learn to practice the science. That involves looking at what others have done right, usually after a lot of things done wrong to get there. You are on the right track by asking why the "traditional" circuit has the topology it does and the component values that it does.
 
Top