hi everyone,
i am currently pursuing my first year in electrical and electronic engineering. a project was assigned to me and i am facing some problems which i really can't solve. it would be a great help for me to have some advices from experienced members in this forum. i have to present it on thursday(5th Nov) and had been working on it for two weeks but still ended up with a problem.
the question requires to build a four way junction with four traffic lights. each junction must be able to take the left or right turn and go straight when the traffic light is green, which means only one traffic light can turn green at a time.
my design was initially 3 bits using JK flip flop. i used three JK flip flop and designed it on multisim. multisim shows that it works well. unfortunately when i work it out on the breadboard, the JK flip flop couldn't run according to the sequence. for example, it couldn't go from 000 to 001 to 010 to 011. instead it goes from 000 to 010 then to 0001 then to 011. i couldn't understand why but my friends suggest to use counter since JK flip flop doesn't work.
now that i am using a 4 bits counter, the traffic light does work on breadboard. the problem encountered at this point is at 0010, for the first traffic light(R1Y1G1) both yellow light(Y1) and green light(G1) are simultaneously lighted up. even in multisim. it happens to each traffic light for both green and yellow light. i was using the first traffic light as an example. anyone mind helping me out?? my truth table for the traffic light is as follow:
DCBA R1 Y1 G1 R2 Y2 G2 R3 Y3 G3 R4 Y4 G4
0000 0 0 1 1 0 0 1 0 0 1 0 0
0001 0 0 1 1 0 0 1 0 0 1 0 0
0010 0 0 1 1 0 0 1 0 0 1 0 0
0011 0 1 0 1 0 0 1 0 0 1 0 0
0100 1 0 0 0 0 1 1 0 0 1 0 0
0101 1 0 0 0 0 1 1 0 0 1 0 0
0110 1 0 0 0 0 1 1 0 0 1 0 0
0111 1 0 0 0 1 0 1 0 0 1 0 0
1000 1 0 0 1 0 0 0 0 1 1 0 0
1001 1 0 0 1 0 0 0 0 1 1 0 0
1010 1 0 0 1 0 0 0 0 1 1 0 0
1011 1 0 0 1 0 0 0 1 0 1 0 0
1100 1 0 0 1 0 0 1 0 0 0 0 1
1101 1 0 0 1 0 0 1 0 0 0 0 1
1110 1 0 0 1 0 0 1 0 0 0 0 1
1111 1 0 0 1 0 0 1 0 0 0 1 0
(edit : p/s R1= red for traffic light1, Y1= yellow for traffic light2 and so on)
to sum up, i have two questions :
1. why does the JK flip flop doesn't run according to the sequence?
2. what may have caused the yellow and green light to be lighted up simultaneously?
hereby would like to thanks in advance for any help. thank you.
i am currently pursuing my first year in electrical and electronic engineering. a project was assigned to me and i am facing some problems which i really can't solve. it would be a great help for me to have some advices from experienced members in this forum. i have to present it on thursday(5th Nov) and had been working on it for two weeks but still ended up with a problem.
the question requires to build a four way junction with four traffic lights. each junction must be able to take the left or right turn and go straight when the traffic light is green, which means only one traffic light can turn green at a time.
my design was initially 3 bits using JK flip flop. i used three JK flip flop and designed it on multisim. multisim shows that it works well. unfortunately when i work it out on the breadboard, the JK flip flop couldn't run according to the sequence. for example, it couldn't go from 000 to 001 to 010 to 011. instead it goes from 000 to 010 then to 0001 then to 011. i couldn't understand why but my friends suggest to use counter since JK flip flop doesn't work.
now that i am using a 4 bits counter, the traffic light does work on breadboard. the problem encountered at this point is at 0010, for the first traffic light(R1Y1G1) both yellow light(Y1) and green light(G1) are simultaneously lighted up. even in multisim. it happens to each traffic light for both green and yellow light. i was using the first traffic light as an example. anyone mind helping me out?? my truth table for the traffic light is as follow:
DCBA R1 Y1 G1 R2 Y2 G2 R3 Y3 G3 R4 Y4 G4
0000 0 0 1 1 0 0 1 0 0 1 0 0
0001 0 0 1 1 0 0 1 0 0 1 0 0
0010 0 0 1 1 0 0 1 0 0 1 0 0
0011 0 1 0 1 0 0 1 0 0 1 0 0
0100 1 0 0 0 0 1 1 0 0 1 0 0
0101 1 0 0 0 0 1 1 0 0 1 0 0
0110 1 0 0 0 0 1 1 0 0 1 0 0
0111 1 0 0 0 1 0 1 0 0 1 0 0
1000 1 0 0 1 0 0 0 0 1 1 0 0
1001 1 0 0 1 0 0 0 0 1 1 0 0
1010 1 0 0 1 0 0 0 0 1 1 0 0
1011 1 0 0 1 0 0 0 1 0 1 0 0
1100 1 0 0 1 0 0 1 0 0 0 0 1
1101 1 0 0 1 0 0 1 0 0 0 0 1
1110 1 0 0 1 0 0 1 0 0 0 0 1
1111 1 0 0 1 0 0 1 0 0 0 1 0
(edit : p/s R1= red for traffic light1, Y1= yellow for traffic light2 and so on)
to sum up, i have two questions :
1. why does the JK flip flop doesn't run according to the sequence?
2. what may have caused the yellow and green light to be lighted up simultaneously?
hereby would like to thanks in advance for any help. thank you.
Last edited: