74LS08 troubleshooting (weird output) NOOB WARNING

Thread Starter

Green Bean

Joined Mar 31, 2017
126
Okay, let me just say in advance that I am a COMPLETE noob to the analog world. I write code in assembly language, I've designed circuits in purely digital simulators (Logisim, etc.) but that's basically it. Over the past month I've been learning some stuff and recently acquired a breadboard and a few components.

So, I wired up my breadboard with a 74LS08, a couple buttons, and an LED.

IMG_20170331_1729541_rewind.jpg

The problem is that this AND gate is acting like an OR gate!!!

IMG_20170331_1730243_rewind.jpg

As you can see, only one input is high, and the output is high! Pressing the other button alone produces the same result, as does pressing them at the same time. The only way to get a low output is by not pressing either button.

I should probably mention that my "power supply" is just 3 AA (1.5 volts each) batteries taped together, collectively outputting 4.5 volts. The positive terminal of the front battery is wired to VCC, and the negative terminal of the posterior battery is wired to GND.

IMG_20170331_1731017_rewind.jpg

I think I should also mention that I initially had 4 AA batteries taped together for my power supply, collectively outputting 6 volts. After a few tries (getting the same results as I would later get with 4.5 volts), I decided to remove one battery because I thought this could be the problem. I later noticed that the 74LS08 had become slightly darker in color than it had been when it had never been used. Here it is (on the left) next to a never-used 74LS32.

IMG_20170331_1732306_rewind.jpg

I think (hope) this is normal and that I didn't overheat and damage the chip somehow, but I am ultimate noob.

Anyway, help!
 

be80be

Joined Jul 5, 2008
2,073
There's no resistor on the led I don't think thats a good Idea the led maybe pulling 100 mA. without current resistor.
 

MrChips

Joined Oct 2, 2009
31,088
You have at least three mistakes in your setup. There are more when you get into the details.

As pointed out already:

1) You need pull-up or pull-down resistors on the switches. You have to get the values correct.
2) You need a resistor in series with the LED.
3) You have to be aware the two ways of connecting the LED, as current load or as a current source.
 

absf

Joined Dec 29, 2010
1,968
With all the good advices from post 2 to 4, I think what I can add is a schematic with simulation on your LS08 and LS32, with all the added resistors....

GREEN BEAN 1.PNG
There is nothing wrong what you have actually observed.

Normally we are thinking in postive logic. ie 1 = True and 0 = Flase. But in your wiring, you're thinking in negative logic : 0=True and 1=False.

Allen
 
Last edited:

ScottWang

Joined Aug 23, 2012
7,414
@absf
The led looks like 2V/10mA/2mm, if that is true then the R2 is too small, I have some leds are 10mA/2mm, but it needs 3V, so this have to ask the TS to clarity the voltage of led.

Normally I will using 80% of current rating of led.
 

absf

Joined Dec 29, 2010
1,968
I use 220Ω because he was using 4.5V AA batteries. And also assuming that the battery are not brand new.

But anything from 220-470 ohms are fine for me as my simulator was reporting back 9.5mA only.

Allen
p/s: are you sure that is 2mm LED. It looks more like 5mm to me.
 

ScottWang

Joined Aug 23, 2012
7,414
@absf
I rechecked the real size of led and ic, it could be a 5 mm led, and what I said 2mm is wrong, it should be 3mm.

The 3mm led looks like half width of ic, and the 5mm led looks like the same with ic, I used paint to compared the size of led and ic from the #1, they are almost the same and the ic has a little tilt, but this needs the TS to clarity it.

LED and IC.jpg

The 2V/10mm/3mm LED.


The photo was copied from here.
 

Thread Starter

Green Bean

Joined Mar 31, 2017
126
Thanks for all the quick replies! I followed asbf's schematic, and it worked! However, as soon as I tried to take a picture, it stopped working!!! Pulling both inputs high did nothing! There was no way to power the LED.

IMG_20170331_2029331_rewind.jpg

I tested the LED afterwords, it didn't burn out. What happened?
 

Thread Starter

Green Bean

Joined Mar 31, 2017
126
@absf
I rechecked the real size of led and ic, it could be a 5 mm led, and what I said 2mm is wrong, it should be 3mm.

The 3mm led looks like half width of ic, and the 5mm led looks like the same with ic, I used paint to compared the size of led and ic from the #1, they are almost the same and the ic has a little tilt, but this needs the TS to clarity it.

View attachment 123726

The 2V/10mm/3mm LED.


The photo was copied from here.
All my LEDs are 5mm.
 

absf

Joined Dec 29, 2010
1,968
Thanks for all the quick replies! I followed asbf's schematic, and it worked! However, as soon as I tried to take a picture, it stopped working!!! Pulling both inputs high did nothing! There was no way to power the LED.

View attachment 123727

I tested the LED afterwords, it didn't burn out. What happened?
Do you have a meter to make sure that the voltage is available at the + and - terminals?
Could be the inter-connections of the 3 battery are not making properly.
Also measure directly on the pins 14 and 7 of the IC and make sure the voltage read at least 4V.
Could it be that your battery is getting weak?

Allen
 

Thread Starter

Green Bean

Joined Mar 31, 2017
126
Okay, unfortunately I was busy yesterday, so sorry for not responding. I think the problems I was having were all tied to the fact that I didn't understand the concept of "floating" (which makes sense since I come from the pure digital world.)

I get that now (thanks to a bit of research) but I still don't completely understand how pull up/down resistors work.

For example:

IMG_20170402_1144216_rewind.jpg

So GND pulls the LED low normally. But when the button is pressed, VCC passes through, coming in contact with GND. Wouldn't this cause a short circuit?

Also, I have another unrelated question. To my understanding, a resistor is ultimately used to reduce the voltage supplied to a component. Ohm's Law states that V=I*R. Resistors are labeled for their resistance, but without a multimeter, how do I tell the voltage applied to the component?
 

MrChips

Joined Oct 2, 2009
31,088
Okay, unfortunately I was busy yesterday, so sorry for not responding. I think the problems I was having were all tied to the fact that I didn't understand the concept of "floating" (which makes sense since I come from the pure digital world.)

I get that now (thanks to a bit of research) but I still don't completely understand how pull up/down resistors work.

For example:

View attachment 123796

So GND pulls the LED low normally. But when the button is pressed, VCC passes through, coming in contact with GND. Wouldn't this cause a short circuit?
Are you referring to your diagram shown? What is that funny looking symbol above the button? If I assume it is a resistor, then no, GND is not connected to the LED. It is connected to the resistor. When you press the button, the LED is connected to Vcc. Current will also flow from Vcc through the resistor to GND.

Also, I have another unrelated question. To my understanding, a resistor is ultimately used to reduce the voltage supplied to a component. Ohm's Law states that V=I*R. Resistors are labeled for their resistance, but without a multimeter, how do I tell the voltage applied to the component?
No. Don't think of a resistor as reducing any voltage.

Current flows through the resistor. One can calculate the voltage across the resistor and the current through the resistor if one has all the information about the rest of the circuit that is connected to the resistor.
 

Thread Starter

Green Bean

Joined Mar 31, 2017
126
Ok now I think I understand. Everything is making sense now. Thank you.

The only reason the circuit stopped working is because I accidentally bumped it and the 74LS08 came loose. I popped it back in and it works now.
 

GopherT

Joined Nov 23, 2012
8,009
Ok now I think I understand. Everything is making sense now. Thank you.

The only reason the circuit stopped working is because I accidentally bumped it and the 74LS08 came loose. I popped it back in and it works now.
Also, your "power supply" is likely to give you trouble soon. The blue tape doesn't have much elastic tension to pull the batteries together. I suggest a roll of vinyl electrical tape and wrap the long way around all three of those batteries while pulling/stretching the tape a bit so it is pulling the batteries together - give it three or four wraps with good tension.
 

Thread Starter

Green Bean

Joined Mar 31, 2017
126
Also, your "power supply" is likely to give you trouble soon. The blue tape doesn't have much elastic tension to pull the batteries together. I suggest a roll of vinyl electrical tape and wrap the long way around all three of those batteries while pulling/stretching the tape a bit so it is pulling the batteries together - give it three or four wraps with good tension.
Sounds good. As soon as I get the funds, I should probably invest in a legit power supply for my breadboard. Have any recommendations?
 

GopherT

Joined Nov 23, 2012
8,009
Sounds good. As soon as I get the funds, I should probably invest in a legit power supply for my breadboard. Have any recommendations?
I started out using 9V batteries, then a variety of 5V cell phone chargers and 12V dc adapter from an old desk lamp.

I got lucky and stumbled on a 50VDC 0.5A HP dual supply from the 1970s. Then, about a month later, a second one appeared on Craigslist so I bought that too. The point is, use what works and use what you can afford.

I recommend not using a switchmode power supply (SMPS) if you plan to do audio - particularly from microphones or guitars (weak sources). Other than that, use what you want.
 
Top