So if the voltage is below 0.8v it will considered as "LOW". (Pin1)
Then the pin 2 output voltage is depends on vcc or? Or any fixed value voltage? Want to want whether it can magnetized the 5v relay or not.
Generally NO you might try .. Schotky transistor.. A better way is to connect a transistor as a RTL INVERTER. Takes only a few resistors and npn transistor. The transistors cant handle alot of current that a relay requires
As others have pointed out, if you have to use a 7404, it can be done. You will have to wire the relay from 5V to the output, not to ground, because the "1" output of TTL is weak, ie about 3 Volts and 1mA. If you must have an active 0 input then use another inverter before the input. 7405 and 7406, 7407 are better but still not great choices. the chip for the job is something like
[ Ti.com Link ]
BE SURE TO CONNECT THE FLY-BACK DIODE!!! or you will kill the chip the first time you turn the relay off.
Yes it will power a reed relay or if you parallel several gates it will power a large relay.
The output will sink 16mA per gate and there are 6 of them so 16*6=96 ma unless you use several IC's...
relay [ Mouser.com Link ]
NO, IT COULD NOT SUPPORT THE COIL LOAD FROM RELAY SINCE OUTPUT CURRENT IS AS LITTLE AS 16mA. UNLESS USE SEMI CONDUCTOR RELAY ( NO COIL) THAT REQUIRES TRIGGER CURRENT UNDER 16mA.
NORMAL Vcc USES 5V TO 5.5V BECAUSE IT IS TTL.
LOGIC HIGH IS BETWEEN 4.5V TO 5V
All TTL logic has a very weak HIGH drive, typically 1mA or less and almost certainly not enough to power a 5V relay directly.
If you want to drive a relay from TTL (or any logic) the most usual way is to use an NPN transistor (eg BC107) to boost the current and use the relay as the collector load, see the diagram below. Note that the relay is ON when the input is HIGH.
Note that many people will suggest a similar circuit using FETs and there are some great FET's tailored to logic level inputs. However, my experience using them for personal projects / hobby circuits is that they are prone to sudden failure probably from static and generally they are a bit too delicate for casual handling.
BTW, I'm not convinced that the 1k base resistor is an ideal value (or even necessary for TTL) but it is probably a fairly safe initial value. I would start off with 1k but I think it may restrict the current too much as TTL already has a fairly high output impedance. If the relay won't fully switch I would drop the base resistor to 100R or even remove it completely if the relay still doesn't switch.
Also, that diagram isn't mine, I just searched for something close, so it shows a 12V relay but clearly you would be using a 5V relay connected to the 5V supply.
And another thing, it would be fairly standard to put a reverse biased diode across the relay coil as a flyback diode to prevent high voltage spikes killing the transistor when the relay turns off.
Edit: Since the pin 2 will be "HIGH"