Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] [moved] Traffic Lights using TTL ICs (Logic to loop malfunctioning)

Status
Not open for further replies.

frito23

Newbie level 4
Newbie level 4
Joined
Jun 14, 2015
Messages
5
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Activity points
41
Hello,

I need second opinion om my circuit. The LED and logic is not functioning properly as I planned it to be using basic TTL ICs.

The functions are as follows
Intially, 30 seconds countdown, green light is on
03 seconds countdown, yellow light is on
15 seconds countdown, red light is on
Repeat...

Here is the circuit it is quite big
https://obrazki.elektroda.pl/8442989800_1438197012.png
 

I see a lot of floating inputs especially the clr input to the ls192's. First thing I would do would be to tie all of those off.

John Eaton
 
Are these LEDs with internal R? because you have switches driving them to +5V.

Unused TTL inputs are normally high at 1.3V when floating and pullup Rs are normally used per group of 10 inputs to prevent transient failures over 5V or grounded as required.

The LED outputs are poorly defined and you can't drive normal LEDs high from TTL very well with < 0.5mA
Perhaps low on Cathode side with a series R.
YOu have no contact debounce on switches
if not edge sensitive ok.

YOu need to verify the function of each chip to ensure there are no wiring or design errors.

Start from the outputs and work backwards to verify the inputs are valid for each section.

Ensure you have a valid Power on Reset condition by design, not a fluke.
 
  • Like
Reactions: frito23

    V

    Points: 2
    Helpful Answer Positive Rating

    frito23

    Points: 2
    Helpful Answer Positive Rating
Interesting - and complex! All of the above design comments are usefully correct and should be followed.

For TTL, as noted, up to 10 inputs can be tied high together through a single 10K resistor for a 'one'. (Not using a resistor will work but isn't good practice.)
Any input can be connected directly to 0V for a 'zero'. Unless it's an exotic IC which specifically notes otherwise in the datasheet, unused inputs should never be left floating. (Else, it may work as hoped - some of the time!) An undefined input may also be sensitive to static depecding upon the logic family - at best it would change the state - at worst it could destroy the input/chip.) Not good or professional.

As for outputs, (check the datasheet for your family), a red LED with a 470R resistor to +5V can be driven from a logic '0', but you should not try to drive an LED by connecting it to ground, If you must connect it ground or need more than 10mA of drive, some form of power buffer (transistor, etc) is required. Other colours of LED than red have different voltdrops: recalculate as necessary, but blue LEDs won't usually work here.


As to your design, from the outline spec you gave, it seems a little compex with undescribed features? I don't know your intended use for this, which may be exactly fulfilled by your design, but as a general idea could I suggest another approach?

Your design appears to be based on the american system as the british have an additional phase of R+Y as 'prepare to go'. But what concerns me is that there is no dwell built in to allow traffic to stop in one direction before being released in the other. Also, with a longer green cycle, there's no way a matching cross stream could be equally timed.

With a timebase of 3 seconds, could I suggest R=10, G=5, Y=1 which will allow a matching cross stream on the same count base: R=1, G=5, Y=1, R=9

This could be more easily implimented with a 0-15 decoder and combining the groups from this for each LED:
- Logic can combine every required count to light a specific LED, or
- Specific counts can set/clear flipflops for each LED
Plus, as this the american system, only one LED is on at a time for each direction, so Red (10 counts) can only be on when Green (5 counts) and Yellow (1 count) are both off.... which Simplifies the decoding even further! (You could now use a 4 bit binary counter instead of the 0-15?)

So, see how things could be simplified. e.g. the count number for each transition doesn't have to be as implicitely defined, as after the first 16 counts, it isn't synchronised to anything. i.e your design could define a Yellow as the 0000 count or 1111 count as it's easier to decode, but does that impact adversely on any other logic design requirement? POR logic may need to clear the counters/flipflops That way, at least it would start up on all red!

Sorry if I've gone off on a tangent, but it may be of interest to some other reader. Remember: think outside the box, don't give up, and good luck with your design.

- - - Updated - - -

Having thought about the design concept a little more (having just woken up from a nightshift!) a couple of other points arise. It usually pays to consider enhancements / expansion or variations, even if they don't make their way into the final design as they may have a bearing on the design philosophy.

For example, my back-of-a-fag-packet design for two streams has a 0-15 counter, 2 flipflops, and a few gates for POR and Red decodes. If the streams are non-symmetrical, or on-demand, do you need a way to pause the counter or shorten the cycle? Choose different trigger counts etc? More resolution? Turn filters? A heartbeart (Clock) LED could be reassuring. Designing a PCB for production could incorporate alternate choices without actually populating them. Octal driver chips are good too for outputs! Going to CMOS would ease power supply requirements. ... And so it goes on.

But then again, the more complex you make it, the more a PIC or micro looks attractive.... But it doesn't change the basic design points outlined above by others! Make it foolproof. (Idiots are too intelligent and will break it anyway!)
 
  • Like
Reactions: frito23

    V

    Points: 2
    Helpful Answer Positive Rating

    frito23

    Points: 2
    Helpful Answer Positive Rating
Sorry for not stating everything beforehand but the pieces of advice you gave really helped a lot.

Thank you again. :-D
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top