Pages: [1] 2   Go Down
Author Topic: LED problem  (Read 1723 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi guys,
           I am doing a project with LEDs on traffic light
    I have connected the RED and GREEN leds in reverse polarity and took the input to these pins to an AND gate and connected the output to YELLOW led.


when i am running the pgm i use the following logic

01 for RED
10 for GREEN
11 for YELLOW


but in my circuit my yellow light is ON with a minimum brightness even when the other LEDs are ON
what is the problem?????

pls help guys

I used 7408 as my AND gate
Logged

Johannesburg. UTC+2
Online Online
Faraday Member
**
Karma: 99
Posts: 4399
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

They say a picture is worth a thousand words.... I don't follow the circuit description- a diagram would make it muuuuuch easier.
Logged

Roy from ITCrowd: Have you tried turning it off and on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


       i will get the ckt in a bit
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset




this is a rough sketch
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

this is a rough sketch


* ckt.JPG (12.56 KB, 812x559 - viewed 36 times.)
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

pls guys someone reply pls pls
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 52
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok, i am no expert when it comes to this stuff, so take what i say with a grain of salt. but if i had to guess, the ground from one of your LEDs is activating your AND gate. take a look at the diagram i attached. that is my guess what is happening. but again, i could be completely wrong. im just letting you know what my guess is when it comes to this problem.


* ckt2.jpg (21.73 KB, 812x559 - viewed 23 times.)
Logged

Johannesburg. UTC+2
Online Online
Faraday Member
**
Karma: 99
Posts: 4399
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My take is slightly different from that of suicidalacorn's... I think that with either 01 or 10 and therefore activating the R xor G LEDs, there's enough of a "short" across the AND gate for it to read both its inputs as 1's.

(Which is what suicidalacorn was saying, on second thoughts, now that I see his annotated pic....)

Do some measuring with your meter...
Logged

Roy from ITCrowd: Have you tried turning it off and on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks for your reply.

but can you give me a suggestion to stop this?????
Logged

Johannesburg. UTC+2
Online Online
Faraday Member
**
Karma: 99
Posts: 4399
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

but can you give me a suggestion to stop this?????

Lose the 74' and do the whole thing in software....
Logged

Roy from ITCrowd: Have you tried turning it off and on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

how do u suggest i do it in software?????????????

i dont have enough pins
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 627
Posts: 34213
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

this is a rough sketch
So now do a proper one, showing each LED and the series resistor connected to each LED along with values.
In other words a schematic that people can understand.
Logged

Long Island, NY
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What are you trying to achieve? You mentioned a traffic light. Do you mean that you only want one of the LED's on at a time or do you want the Yellow to light up when the Red AND Green are on?

You may want to use inverters as well if you want only one on at a time.
Logged

Johannesburg. UTC+2
Online Online
Faraday Member
**
Karma: 99
Posts: 4399
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

how do u suggest i do it in software?????????????

i dont have enough pins

Well so far you mentioned only the 3 LEDs, so that would need 3 i/o pins instead of the 2 you have used so far- how many LEDs do you need then?

(Btw a question is not going to get answered any faster with ??????????????? than just with ?)
Logged

Roy from ITCrowd: Have you tried turning it off and on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

Beijing
Offline Offline
Full Member
***
Karma: 3
Posts: 193
Skype name habib.derbyshire
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I remmember once trying to dirrectly drive a seven segment display with my Arduino and the segments were really dim I checked and found that I forgot to put
Code:
pinMode(segment, OUTPUT);
!
Logged

What is man's best friend? The breadboard!

Pages: [1] 2   Go Up
Jump to: