A question on SN74ALS138N

Discussion in 'The Projects Forum' started by harisudharsan, May 12, 2014.

  1. harisudharsan

    Thread Starter New Member

    May 6, 2014
    16
    0
    Hi Team,

    I am trying to test my basic understanding over the decoder chip by doing a simple circuit practically. I connected 4 LEDs on the output lines (Y 0,1,2,7) and made all the inputs to High.

    I was expecting to see the Y 0,1,2 LEDs to glow and Y7 LED must not glow (as per the table provided in the datasheet of this chip. But to my surprise I found all the LEDs are glowing.

    Later I brought the A,B,C to low. Still all the LEDs were glowing. Am I missing some thing some where ?? I double checked, that there is no show circuit. I ensured to keep the G1 high while checking this.

    Attached is the circuit. .

    With Regards,
    S.Sudharsan
     
  2. jjw

    Member

    Dec 24, 2013
    173
    31
    You should connect G2A and G2B to low.
     
  3. harisudharsan

    Thread Starter New Member

    May 6, 2014
    16
    0
    If it is not connected to any thing is it not already logically low ??

    Low means 0 volts right ?? So if i am not connecting any thing to it, is it not already low ??

    Regards,
    S.Sudharsan
     
  4. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,810
    834
    As a matter of fact, if it is not connected to anything, it is undefined, particularly in CMOS ICs. Older TTL actually used to see an unconnected input as a high signal!
     
  5. harisudharsan

    Thread Starter New Member

    May 6, 2014
    16
    0
    So when you say "connect it to low", i need to connet it to the negative of the battery ??

    Regards,
    S.Sudharsan
     
  6. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,810
    834
    Yes. To input a low signal, it should be connected to the negative of the battery or in other words to the digital circuit ground.

    Added second sentence because my answer was too short.
     
    harisudharsan likes this.
  7. MrChips

    Moderator

    Oct 2, 2009
    12,447
    3,363
    Sudharsan, welcome to the world of electronics.
    There is so much to learn that they don't tell you in the classroom or in a textbook.
    Hands-on experience makes a world of difference.
     
    harisudharsan likes this.
  8. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,542
    1,251
    Also, it looks like the upper left LED is tied directly across the power pins with no current limiting resistor. This could be why it is so bright. Unless they are special LEDs with current limiting built in, all LEDs need external current limiting, such as a resistor. Without them, the chip will not last long.

    ak
     
    harisudharsan likes this.
  9. harisudharsan

    Thread Starter New Member

    May 6, 2014
    16
    0
    Thanks Analogkid !!!

    That is a very useful info. I have seen people connecting resistors & capasitors in the circuit. But i am not sure why they do and more importantly how they calculate the value of those components to be used. I was think what those components do in a digital circuit as these circuits works by truth table.

    So your reply makes sence.

    Can you help me how the value of those components has to be calculated ?

    Regards,
    S.Sudharsan
     
  10. MrChips

    Moderator

    Oct 2, 2009
    12,447
    3,363
    The calculations will depend on every specific situation and components used.
    You have to become familiar with the basic principles such as Ohm's Law and the characteristics and variability of components.

    Consider an LED with a forward voltage of 2.5V and operating current of 5mA. (These parameters will be different for a different LED).

    A TTL gate powered from 5V will have an output of about 4V. (The output voltage will be different for a different family of devices).

    A resistor in series has to drop the difference in voltage, i.e. 4 - 2.5V = 1.5V

    Applying Ohm's Law, I = V/R

    The value of the series resistance R = V/I = 1.5V/5mA = 300Ω

    Use 270Ω or 330Ω since these are standard values. 270Ω will make the LED slightly brighter.

    (See, there is a reason they teach Ohm's Law in school.)
     
    harisudharsan likes this.
  11. harisudharsan

    Thread Starter New Member

    May 6, 2014
    16
    0
    Thanks for this wonderful explanation MrChips..

    I just now got from good google what is forward voltage means.

    Now, In my case I used that LED (in series) with the circuit like a resistance. Actually the batter i used is a 9V battery. WhenI checked, it was giving 7 v currents (due to its age). But I found the operating voltage of the chip is 4.5-5.5 v.

    So I connected this LED in series to limit the current flowing to the circuit. Which looks like a wrong thing.

    But I have a question now. Lets say, I have a chip which has 6v as its operating voltage and I have the right powersupply to feed it. Now I want to add a LED to the project which has to work like a power indicator (which remains on when the circuit is closed).

    Now, if i limit the current flowing to the LED using a resistance then subsequently will not it affects the voltage flowing to the CMOS chip ??

    Regards,
    S.Sudharsan
     
  12. MrChips

    Moderator

    Oct 2, 2009
    12,447
    3,363
    Do one thing at a time. Don't confuse the issue.

    Say you have a 9V power supply and you want a power indicator.
    Put a resistor in series with an LED across the 9V power supply.

    Voltage drop across the resistor is 9V-2.5V = 6.5V
    Resistor required for 5mA LED is R = V/I = 6.5V/5mA = 1.3kΩ

    Choose nearest value, i.e. 1.5kΩ

    Your 74LSxx chip requires 5V +/- 0.5V

    You need a 5V voltage regulator to bring the 9V supply down to 5V.
    Look for the LM7805 or similar 3-terminal regulator.
    (There are hundreds of other 5V regulators with different part numbers, too long to list here, which would also work for your situation.)
     
Loading...