Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rochester!pt!speech1.cs.cmu.edu!phd From: phd@speech1.cs.cmu.edu (Paul Dietz) Newsgroups: sci.electronics Subject: Re: TTL Questions Message-ID: <1008@speech1.cs.cmu.edu> Date: Fri, 17-Jul-87 07:42:57 EDT Article-I.D.: speech1.1008 Posted: Fri Jul 17 07:42:57 1987 Date-Received: Sat, 18-Jul-87 13:29:28 EDT References: <1395@crash.CTS.COM> Distribution: na Organization: Carnegie-Mellon University, CS/RI Lines: 59 Keywords: Many solutions... In article <1395@crash.CTS.COM> rpluth@pnet01.CTS.COM (Ron Pluth) writes: > 1. What's the easiest way to go about interfacing a TTL >output (from, say, a standard S or LS AND gate) to a relay, for >controlling anything from automobile (12VDC) to house (120VAC) >environments? These are two *different* situations. I'm look >ing for hardware that can be easily picked up at Radio Shack >(gasp!)... if anyone would even happen to know part numbers from >such equipment, this would also be great. There are about 1 zillion and 12 ways of doing this, but just about all of them depend upon what sort of relay you want to drive, i.e. what voltage, and what current on the input. One traditional solution is to use an open collector device (these are fairly easy to find) with a large pull-up resistor. Connect this output to the base of some big PNP (Darlington it, if you like) through some appropriate current limiting resistor. Tie the emitter to the big plus supply (doesn't have to be the same as the TTL supply) (oh, and the pull-up should go here to...) and the source to your relay. Tie the other end of the relay to ground. You should also use a free wheeling diode (a reverse biased diode in parallel with the coil) to protect the PNP. A much easier solution is to use a low current, 5-volt relay. Then almost any of the serious driver chips can drive it directly. There are also any number of relay driver chips on the market. They are more obscure, but almost every major manufacturer makes them. Even better still, do everything solid state! Especially for the household AC stuff. RS used to carry a wonderful opto-isolator with a triac output. I believe it could drive tiny loads directly. However, the way to go is to use it to drive a big triac. This is VERY cheap, very easy, and opto isolated to boot! However, it's not good for inductive loads... > 2. I've worked with Schottky and Low-power Schottky logic >chips in the lab, and have seen that a no connection to inputs, >such as a simple AND or OR gate, even sometimes in MUX's and >others, drives the input high. Is this guaranteed true? If so, >does it apply to all families (S, LS, CMOS, etc.)? I'm working >on projects that would be a heck of a lot easier if this were >true. Never, never, never, never, never assume this! This is the quickest way to get into trouble! Yes, standard TTL floats high by nature, but any mild strays are enough to glitch it to another state! Generic CMOS doesn't float either direction, so it makes a wonderful antenna, and it will couple to the subtlest of strays! Since CMOS power glitches when switching, you'd like to minimize extraneous switching. This is why you SHOULD tie all inputs somewhere, even if they're on gates you're not using! While we're on the subject of glitching, watch out when driving relays! These can cause a substantial glitch on your power line, which WILL cause eratic behavior of your logic. The moral of this story is to isolate things the best you can and use big enough power supplies. If you're not sure how to do this, ASK! Hope this is what you were looking for... Paul H. Dietz Carnegie Mellon University