Inverting Negative Logic TTL To Positive With Discrete Transistors - Page 1
Forum section: electronics / beginners

author: KJ-90
author_rank: Contributor
timestamp: March 29, 2017, 12:45:25 am
content: I'm not sure if this is the right forum section to post this in, but I am wondering how to build a TTL compatible logic inverter from discrete components. Normally today, we use an IC for this task. However, I'm building a copy of a 1970s vintage TTL morse code generator, from the ( now defunct ) 73 Magazine, the design being from the February 1973 issue. The article is called "A TTL Logic CW ID Generator". This article is readily available online. Due to the circuit design, the morse code audio signal output of the circuit is produced as a negative logic signal. The circuit, which runs at a very low frequency ( below 5 Hz ), produces +5V when not generating a tone signal, and swings down close to 0V when generating tones. I know this is a strange way for the circuit to have been designed, but it is the original design. What I need to do is build a discrete transistor and component TTL-compatible inverter that converts the negative logic output to positive. In this way, the output is correct: +5V for tone signals, and close to 0V for no tone. You can assume the input to the inverter circuit is the output of only one standard 7400 "plain" TTL NAND gate, at below 5 Hz. The inverter would run on 5V, like the rest of the circuit. The output load of the inverter would be either a LED ( 1.8-2.2 Vf at 15mA ) or a small speaker. I'm not sure if a non-inverting buffer stage is needed after the inverter.Although such circuits are very readily available online, my problem is that I don't know how to determine the required resistor values, for this application. Can someone point me towards a suitable circuit with suitable resistor values? I am building a discrete component inverter for an original period copy. In the original article, oddly enough, the author didn't provide a discrete inverter stage for positive logic output.

author: danadak
author_rank: Super Contributor
timestamp: March 29, 2017, 11:15:02 am
content: When driving an L load, like a relay, or speaker, use clamp diodes toprotect driver (D2 and D3 here, this is an example) -Regards, Dana.

author: kosine
author_rank: Regular Contributor
timestamp: March 29, 2017, 03:05:59 pm
content: A slightly oddball technique I've used in the past is a reverse mode transistor, specifically a 2N2222, although I think a BC547 will work as well.Basically you wire it up backwards: collector to ground, emitter to 5V (through a suitable resistor). Your input just goes to the base.You need to check whatever NPN transistor you use for the Vebo rating. Not all can handle 5V in reverse, but the 2222 and 547 can handle up to 6V, so they are OK.Your output is from the emitter, and should be a clean 0V - 5V square wave at low frequency (I've used this trick up to 100kHz), duly inverted as required.Because reverse mode has terrible gain, you may need to buffer the output through another transistor to power your LED or whatever. If you have a cheap multimeter with transistor test socket, you can check the gain - just reverse the C and E connections. It'll probably read about 5-10, but it will still work.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 29, 2017, 04:28:07 pm
content: "Negative logic" implies negative voltage. I think the word you are looking for is "active low"?Active low is very traditional for TTL (all 74xx families except the CMOS ones), because the low state has a stronger output drive than the high state. (And for CMOS, it's more symmetrical, but still has a stronger low state by about 50%.)What logic ICs, exact part numbers, are used in the design?Tim

author: Zero999
author_rank: Super Contributor
timestamp: March 29, 2017, 05:10:16 pm
content: Quote from: kosine on March 29, 2017, 03:05:59 pmThat will work but why is it any better than configuring Q1 the 'correct' way round?It's also missing a base resistor, unless the signal source already limits the current to a safe level.

author: ebastler
author_rank: Super Contributor
timestamp: March 29, 2017, 05:26:14 pm
content: Quote from: KJ-90 on March 29, 2017, 12:45:25 amI can't seem to find it. Found a couple of recerences to it, but not the article itself. Could you post the link please?EDIT: Found the original article here, p. 27:https://ia800803.us.archive.org/35/items/73-magazine-1973-02/02_February_1973.pdf(Brace yourself for the cover page...)I guess the author went with the inverted polarity simply because that's what he could create by making full use of the four NAND gates in the 7400 chip. In the spirit of the original design, you could simply replace the 7400 by a 74804 (six dual-input NAND gates, slightly exotic though), and use one of the two additional gates to invert the output.Another EDIT: Or you could ask the original designer for advice.Peter Stark is still around:http://www.users.cloud9.net/~pastark/

author: Dinsdale
author_rank: Regular Contributor
timestamp: March 30, 2017, 02:37:20 am
content: QuoteI searched for ECL to further emphasize this fact. I was dismayed to see no mention if "negative logic" in the Wikipedia article.I went to Wikipedia page for "negative logic". It only mentions topics of "logic level" and "negation".The world is really getting to be a f*cked up place.

author: edavid
author_rank: Super Contributor
timestamp: March 30, 2017, 03:23:35 am
content: Quote from: T3sl4co1l on March 29, 2017, 04:28:07 pmIt does not.positive logic: logic 1 = nearer to supply voltage, logic 0 = nearer to groundnegative logic: logic 1 = nearer to ground, logic 0 = nearer to supply voltageIf you are drawing 7400 gates as NANDs, you are using positive logic.If you are drawing them as NORs, you are using negative logic.

author: Mechatrommer
author_rank: Super Contributor
timestamp: March 30, 2017, 10:43:23 am
content: Quote from: edavid on March 30, 2017, 03:23:35 amif that is the case, then whats wrong with this, or that? (attached 2 circuits)

author: kosine
author_rank: Regular Contributor
timestamp: March 30, 2017, 11:12:37 am
content: Hero999 is correct: I should have added a base resistor (maybe 10k).In this particular case, running Q1 in forward mode would work OK, but for other applications that's not a given.I ran into the issue when trying to convert a 1.5V 9600 baud serial link to 5V. (It was the output from one of those cheap digital calipers.) Forward mode simply didn't work - the output was not even close to a 0V-5V square wave. I got a sequence of exponential charging curves instead, and not rail-to-rail either. A cascode and discrete Schmitt trigger both worked better, but didn't completely solve the problem, whereas simply reversing the input transistor did.The problem was likely due to the source output impedance, which I reckon was 100k or more. Too little input current to adequately charge the transistor I think. (Reducing the gain also reduces the capacitance seen by the source.) You shouldn't have that problem with a TTL source, but reverse mode is one of those simple tricks that come in handy on occasion, so I thought I'd mention it as a possible solution.

author: edavid
author_rank: Super Contributor
timestamp: March 30, 2017, 03:27:50 pm
content: Quote from: Mechatrommer on March 30, 2017, 10:43:23 amThey are fine, depending on what the load actually is. The whole "negative logic" thing was a red herring.What I don't understand is why the OP insisted on a discrete stage, instead of just hooking up another 7400 or 7404.