time delayed output switch

Thread Starter

ionace7

Joined Oct 27, 2009
8
Hi, I am making a traffic light project. Actually i already made the circuit for the traffic like but now i need to add a yellow (orange) light that goes on for x secs when the lights switch. so basically im looking to figure out how to switch the output from light to the other after however many seconds. I am using Multisim 10.1.
 

beenthere

Joined Apr 20, 2004
15,819
From the conditions of this forum:

Important

The Homework Help Forum is not a free homework service; we are here to help your understanding, but fully expect the users of this forum to dictate the course of their own learning.

When posting a request for homework/coursework/assignment help, you must provide details of your attempts at the questions. Any thread that just posts up a copy of the questions without any attempts on the part of the opening poster will be directed to this thread and will be given 48 hours to satisfy the requirements detailed within. Help us, help you.


What ideas do you have?
 

Thread Starter

ionace7

Joined Oct 27, 2009
8
Sorry. Well my problem begins with the fact that my 'professor' (term used loosely here) doesn't actually teach and since this is his first ever class he doesn't really know what he is doing, but enough complaining. SO, my knowledge is limited at best.

Now this is the circuit I have from a previous project that we now have to add a yellow light to for x amount of time (dependent to us, it doesn't really matter).
http://img.photobucket.com/albums/v457/ionace/p2pic.jpg

I have tried using 555 timers, Johnson counters, timed relays but I have been unsuccessful in all my attempts, either within that circuit or just trying to make a seperate circuit that does something similar (without all the inputs and such).
 

Thread Starter

ionace7

Joined Oct 27, 2009
8
Well I tried using Timed NOTC's and NCTO's to some success only to realize that these do not reset themselves after being used once. So what I would be looking for is something just like them but that resets after it does its thing (after signal goes low of course). Any one know any components that do this?
 

MaxSmoke

Joined Oct 29, 2009
35
First you need to think about a trigger for the delay circuit, this trigger signal needs to come from your existing logic. Your circuit has two outputs, one from U1C and the other from U3C. As the outputs are logically opposite, you can use each one to trigger your delay circuit. First you need to add some memory that, if the output is at a logic one, it is held until reset, so use each output to clock a flip-flop, that is set when the any one output from your circuit changes to a logic one.

By using the Q output of each flip-flop you can control a counters reset input, by ORing the Q signals together. Now arrange your counter to reset both flip-flops when say, the last stage is set. This in turn will reset the counter. Remember the counter will need a clock input that is running all the time. The LED can be driven by your counter reset signal, from the flip-flops.

I could draw you a circuit, but I think you need to do this. I would use the 74LS74, D flip-flop with the D input wired to VCC (+5V).

By the way, hope you do not think I am being picky, but I see your circuit uses 7400 series logic, so if this was a real LS TTL circuit, rather than a simulation. You would find that the LEDs were quite dull, this is because LS TTL is not good at sourcing current, but good at sinking current. Also, the LEDs, should have current limit resistors, in between LED and supply, say 330R for standard LEDs.
 

Thread Starter

ionace7

Joined Oct 27, 2009
8
Thank you for your input. I don't mind that you're picky, I am that way in the things I have good knowledge of too. We are only doing this in a simulator so that's why my prof. probably didn't even notice or think about the fact that TTL circuit would have little current (also I replaced the LED's with Indicators because LEDs blink in multisim when they are turned off). I am going to need to re-read my flip-flops section.

K well I'm going to go and try to figure this out with your help, thanks again. I'll probably be back with more questions.
 

Thread Starter

ionace7

Joined Oct 27, 2009
8
Okay, well after trying to build what you said I am quite confused what I am connecting where. You said to wire the D inputs to VCC, so they're always HI. So then am I to wire my outputs to PRE? or CLK perhaps?

Also what kind of counter; a decade counter like a johnson counter (4017) or something different?
 
Last edited:

MaxSmoke

Joined Oct 29, 2009
35
OK, the reason for using an LS74 is because the clock is edge triggered, so the clock input only responds to a rising edge. So when each of your outputs go to a logic one, the flip-flop 'Q' output will set or go high. The pre-set and clear inputs are level sensitive and so cannot be used with the approach I described above. They need to be tied high to VCC, so they do not erroneously trigger. It is good practise to tie a logic input high or low with a resistor, so in this case you could consider using a 4K7 pull-up resistor. By the way, for pull-downs I normally use a lower value between 1K to 2K2.

Now you choose the Q or \Q output of the flip-flop to drive the OR or NOR gate to achieve the de-assertion of reset when one of the flip-flops sets. This allows the counter to run. As for the counter you are only looking for a time delay, so use the MSB of the counter to reset the flip-flops, the type of counter is your choice, but I would stick with LS TTL, as the rest of the circuit is LS TTL. The time delay will of course be related to the clock frequency, so the lower the clock frequency the longer the delay for a given counter length.

You could use a couple of 74LS93 ripple counters in series and use the MSB to reset the flip-flops. Not that the LS93 counter has two reset inputs, both need to be high to reset the counter. Other counters are the synchronous LS161, with an asynchronous reset, there is examples on the wiring on the LS161 datasheet.

Another method you could consider is a shift register, that when reset has all the bits set to logic zero. The LSB "serial input" is wired to a logic one. Now when reset is removed the shift register will clock out a logic zero from its MSB and shift in logic ones. When the logic one reaches the MSB the flip-flops in your cicuit would be reset, assuming you use an inverter. Take a look at the LS166 for more information.

Hope this helps, rather than hinders!
 

Thread Starter

ionace7

Joined Oct 27, 2009
8
Okay so I think what I am confused about is how the flip-flops get cleared. From what I've gather, I tie D, PRE and CLR to VCC, and CLK to the outputs from my previous logic, so then how am I supposed to reset the flip-flops using the counter if all the pins already tied to something? I am at work at the moment so I can't test this to see what happens for myself but I will as soon as I get home.
 

Thread Starter

ionace7

Joined Oct 27, 2009
8
Ya, I was able to figure out what you were saying now that I am home. Now I just have to figure out how to make the greens and reds turn on/off corresponding to the yellows. Thanks for your help so far!
 
Top