Author Topic: Traffic light circuit with 556 timer?  (Read 10396 times)

0 Members and 1 Guest are viewing this topic.

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #25 on: December 22, 2019, 09:14:26 pm »
Why are you obsessing about doing it with a single IC and avoiding a microcontroller? What is the goal exactly? Are you trying to learn a specific aspect of electronics? I microcontroller is the single IC solution, it's the smallest, easiest, cheapest way to go. A $2 attiny85 Arduino can do it with code that can be written in literally 2 minutes.

Otherwise most solutions are going to take multiple ICs, or a single IC and some transistors and diodes, you can build a astable mulivibrator out of two transistors, two capacitors and 4 resistors. You might also try a ring oscillator out of transistors, or you could try the CD4060B which is an integrated counter/oscillator IC. You're going to have to experiment, that's part of the hobby.
 

Offline SmokeyTheElectrician

  • Contributor
  • Posts: 25
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #26 on: December 22, 2019, 09:36:51 pm »
Besides a microcontroller, what’s a single simple IC that could do this? There are many 555 variants out there (like the 556), would any of those achieve this effect?

Wow and Holy Cow!,
 there is a ton of awesome advice here
in all of these posts and replies.

Thanks for sharing EEVBlog!

I'll bet once the OP achieves success with 555
type timers, you all have opened up an entire
universe of discovery should the OP decide to
further persue their interest in futzing around
with electronic circuitry.

Now getting back to trying to follow the OP's initial and insistent request:

Please redraw the circuit you originally shared with shared with us,
according to my prior suggestions and post the new circuit so we
are able to make sure we are on the same page.

( even better, if you do not already have it downloaded and install
. LT SPICE {or any other free SPICE version} and use that for
. schematic capture and you will be able to also simulate the
. circuit {and share those results} )

Next take a look at the 555's and 556's pin assignments
.. ( you already have a diagram for the 555 in the OP ).
.. ( hint go on your favorite search engine and search LM556 Pinout )


and construct a table as follows:
( actually, here, I'll help you out a little more by getting the table started
. just fill in the pin numbers from the 556 -- hint: since Vcc and Gnd are
. share between the 2 556 timers, just repeat the 556's Vcc and Gnd
   assignments  in the below table for each timer )

Function               555     556tmr1      556tmr2
------------------   -----     ----------     ----------
Ground                  1
Trigger                 2
Output                  3
Reset                   4
Control Voltage         5
Threshold               6
Discharge               7
Vcc                     8


Then re-redraw the circuit using the 556 in place of the 555s
according to the above pin cross-reference map that you created.

&&& again,
share your results so we can help keep you on track,
(as well as gloat with you once you achieve success....)

.  ( BTW the ultimate goal here is to help you to learn to answer your own questions
.... at which point you will start to be able to help noobier noobs on these forums
.... as well as share the clever things you come up with the rest of us  )

Cheers to all!


"We must stick them with quills! It's the only way!"
-- Scott Adams
 

Offline SmokeyTheElectrician

  • Contributor
  • Posts: 25
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #27 on: December 22, 2019, 10:05:45 pm »
I don't see how. You'd need to add at least something to allow you to hold the second timer in reset and also prevent either LED from lighting while the first one is on. As I mentioned earlier, this is an unusual way of doing a traffic light.
With the circuit redrawn according to my earlier suggestions:
.
Timer 1 free runs

&&&

When timer 1's output is low:
a) The Red LED lights
......12v---/\/\/\---->|-------TMR2out(low)
and
b) timer 2 is held in reset where by
b.1)the discharge transistor is off
...(the Orange LED will be off  :   12v---/\/\/\---->|-------disCHRg2(open) )
and
b.2)the output is low
...(the Green LED will be off  :   TMR2out(low)-----/\/\/\--->|-------GND  )

Then when timer 1's output goes high:
a) The Red LED will be off
......12v---/\/\/\---->|-------TMR2out(high)
and
b) timer 2 can free run
b.1) during the phase where TMR2output is low ( actually TMR2's 2nd half cycle )
the discharge transistor will be on
...(the Orange LED will be on  :   12v---/\/\/\---->|-------disCHRg2(GND+Vsat -i.e. low) )
...(the Green LED will be off  :   TMR2out(low)-----/\/\/\--->|-------GND  )
and
b.2) during the phase where the TMR2output is High ( actually TMR2's 1st half cycle )
the discharge transistor will now be off
...(the Orange LED will be off  :   12v---/\/\/\---->|-------disCHRg2(open) )
...(the Green LED will be on  :   TMR2out(low)-----/\/\/\--->|-------GND  )
and
c) the time constant for timer 2 is long enough such that timer 1 puts
it back in reset before timer 2 starts on a second cycle.

Cheers to all!
"We must stick them with quills! It's the only way!"
-- Scott Adams
 

Offline SmokeyTheElectrician

  • Contributor
  • Posts: 25
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #28 on: December 22, 2019, 10:24:25 pm »
PS
circuit diagrams are compliments of ASCIICAD
"We must stick them with quills! It's the only way!"
-- Scott Adams
 

Offline SmokeyTheElectrician

  • Contributor
  • Posts: 25
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #29 on: December 22, 2019, 10:44:37 pm »
Corrections:
a) I have typos where TMR2 should be TMR1
b) the orange diode powers off of the Timer output
+ c) some clarification in the operation of Timer2
 
so lets see if I can spell out the circuit's operation
without any more ooopsies:

~~~~~~~~~~~~~

Timer 1 free runs

&&&

When timer 1's output is low:
a) The Red LED lights
......12v---/\/\/\---->|-------TMR1out(low)
and
b) timer 2 is held in reset where by
b.1) the 555's internal discharge transistor's state does not matter (it is either low or open)
...(the Orange LED will be off  :   TMR1out(low)---/\/\/\---->|-------disCHRg2(do not care) )
and
b.2)the output is low
...(the Green LED will be off  :   TMR2out(low)-----/\/\/\--->|-------GND  )

Then when timer 1's output goes high:
a) The Red LED will be off
......12v---/\/\/\---->|-------TMR1out(high)
and
b) timer 2 can free run
b.1) during the phase where TMR2output is low ( actually TMR2's 2nd half cycle )
the discharge transistor will be on
...(the Orange LED will be on  :   TMR1out(high)---/\/\/\---->|-------disCHRg2(GND+Vsat -i.e. low) )
...(the Green LED will be off  :   TMR2out(low)-----/\/\/\--->|-------GND  )
and
b.2) during the phase where the TMR2output is High ( actually TMR2's 1st half cycle )
the discharge transistor will now be off
...(the Orange LED will be off  :   TMR1out(high)---/\/\/\---->|-------disCHRg2(open) )
...(the Green LED will be on  :   TMR2out(high)----/\/\/\--->|-------GND  )

~~~~~~~~~~~~~

sorry for the additional confusion
"We must stick them with quills! It's the only way!"
-- Scott Adams
 
The following users thanked this post: phennessey

Offline phennesseyTopic starter

  • Contributor
  • Posts: 36
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #30 on: December 22, 2019, 10:48:17 pm »
For the ring oscillator, can the timing be altered between each LED flash by changing resistance values?
 

Offline phennesseyTopic starter

  • Contributor
  • Posts: 36
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #31 on: December 22, 2019, 10:53:42 pm »
It isn’t an obsession, it’s just that I feel like a microcontroller is cheating. It’s too easy! (That being said, I ordered one anyway.) I’m going for “simple” and “elegant” solutions with common discrete components and basic ICs :)
 

Offline phennesseyTopic starter

  • Contributor
  • Posts: 36
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #32 on: December 22, 2019, 11:00:18 pm »
That’s great, but did you try it using a 556 timer instead? :) Apparently it’s impossible!
 

Offline SmokeyTheElectrician

  • Contributor
  • Posts: 25
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #33 on: December 22, 2019, 11:49:24 pm »
That’s great, but did you try it using a 556 timer instead? :) Apparently it’s impossible!
If the above is in reply to my responses,
either you did not carefully read through all of them
or am I being trolled?

Everything needed to get your circuit functioning as you
originally requested has been covered in my posts ( aside
from maybe some typo or other mistake in communication ).

It is left for you to take the help I have offered and
help yourself by redrawing your circuit using a single
556 in place of the two 555's.
"We must stick them with quills! It's the only way!"
-- Scott Adams
 

Offline phennesseyTopic starter

  • Contributor
  • Posts: 36
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #34 on: December 23, 2019, 02:20:41 am »
I’m not trolling, I just thought it had been established (by others in this thread) that this circuit cannot be done with a 556, because the power to the second 555 comes from the output of the first 555, and that cannot be replicated with a 556, which only has one +V input. I thought your instructions were using two separate 555s.

Frankly, most of this is over my head. I have ordered the parts and I plan on tinkering. I’ll even sketch an attempt (I don’t have any circuit software, so I’m drawing stuff with Adobe Illustrator.) I was just hoping someone would sketch out a 556 timer circuit so I could try to translate it to a breadboard. I initially thought this would be a simple enough request that it would just be matter of re-drawing a couple lines in the first diagram I posted (which I did not make, nor do I fully understand.)

Regardless of what happens, I plan on building this thing and I don’t care how long it takes me! Parts are ordered and that’s that!

I plan on attempting this circuit in 4 different ways:

1. 2x 555
2. 1x 556
3. 1x 74hc14 (ring oscillator)
4. attiny85 (I ordered the usb programming board, too)

Everyone’s help has been incredibly valuable. I will post results here!
« Last Edit: December 23, 2019, 03:56:25 am by phennessey »
 

Offline electricMN

  • Regular Contributor
  • *
  • Posts: 87
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #35 on: December 23, 2019, 03:05:40 am »
...I don’t have any circuit software, so I’m drawing stuff with Adobe Illustrator....

Download Kicad for creating your schematics. It's free.

 
The following users thanked this post: phennessey

Offline SmokeyTheElectrician

  • Contributor
  • Posts: 25
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #36 on: December 23, 2019, 03:34:11 am »
... this circuit cannot be done with a 556...
With some minor change to the circuit, it can be done.

...Frankly, most of this is over my head....
My apologies, with the schematic you presented, I over estimated your level of experience.
 
I was just hoping someone would sketch out a 556 timer circuit
stay tuned ( I misunderstood and thought you wanted corrections so you could draw it )

Regardless of what happens, I plan on building this thing and I don’t care how long it takes me! Parts are ordered and that’s that!
that's the spirit

I plan on attempting this circuit in 4 different ways:

1. 2x 555
2. 1x 556
...
again, stay tuned
&
I look forward to seeing your posts as you realize
the other versions of the circuit

Everyone’s help has been incredibly valuable. I will post results here!

I entirely agree
"We must stick them with quills! It's the only way!"
-- Scott Adams
 
The following users thanked this post: phennessey

Offline SmokeyTheElectrician

  • Contributor
  • Posts: 25
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #37 on: December 23, 2019, 04:39:22 am »
Ok, here is the original circuit entered in LT SPICE

  ( LT SPICE is free for all to use, when you feel ready,
     you can get off of Linear's website:
     https://www.analog.com/en/design-center/design-tools-and-calculators/ltspice-simulator.html
   )

--Notice the 555's symbol follows the actual chip's pinout.
Also I modified the LEDs' current limiting resistors to have the LED current under 20mA.
When I ran the simulation, it does not quite work.
The orange LED stays on through the red LED's phase.
« Last Edit: December 23, 2019, 04:51:11 am by SmokeyTheElectrician »
"We must stick them with quills! It's the only way!"
-- Scott Adams
 
The following users thanked this post: phennessey

Offline SmokeyTheElectrician

  • Contributor
  • Posts: 25
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #38 on: December 23, 2019, 05:26:46 am »
Studying the waveforms from the prior post:

Notice I_red_led follows Timer1's output (Vtmr1), but is inverted

Also notice I_green_led follows Timer1's output (Vtmr2).

Then there is that space in time between when I(D_red) and I(D_green) is flowing
where we would like current to flow in the Orange LED - I(D_orange).

We ask ourselves is there anything unique in the relationship between
12v, Vtmr1, Vtmr2, and ground during that time interval that does not
       ( edit:           /\ Discharge1, Discharge2, )
exist during the interval when the Orange LED should be off?

Well if you drive the Orange LED with Timer1 and sink it with Timer2,
you may observe Vtmr1 is high and Vtmr2 is low during the time
and only during the time the Orange LED should light up.

For all other time intervals Vtmr1 and Vtmr2 are both either high or low
simultaneously.

Ideally (other than that glitch) the waveforms we would like are as follows:


The only modification (correction to your drawing?) to the circuit
was to re-route the high side of the Orange LED circuit from 12v to
the Timer1 output ( V(tmr1)), like in the following diagram:



« Last Edit: December 25, 2019, 06:12:13 pm by SmokeyTheElectrician »
"We must stick them with quills! It's the only way!"
-- Scott Adams
 
The following users thanked this post: phennessey

Offline SmokeyTheElectrician

  • Contributor
  • Posts: 25
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #39 on: December 23, 2019, 06:20:14 am »
You may recall Mr "schmitt trigger" pointed out in post 3 that Timer2 was powered by Timer1's output.
   ( generally bad form as small form IC outputs generally to not have the capacity to supply much current )

Then in post 15 Mr "schmitt trigger" advised exploring not powering up Timer2 in the above manner
as well as exploring what the 555's Reset functionality may do for us. 

I made a quick scan of the datasheet for reset operation.
According to what I read and saw on the block diagram, reset is an active low input, upon which the
output would go low ( no current {=== no light}  possible for the green LED)
and the internal open collector discharge transistor would be de-energized
(off ---> orange LED off).

Hmmm,
the Red LED is wired to be on when Timer1 Output is low
if that signal is fed into Timer2's reset, both the green and orange LEDs will stay off
because the second 555 is held in the reset state.

Then when Timer1 goes high, the red LED will turn off
and Timer2 will be enabled and operate as discussed in
posts 17, 27, and 29 (29 has corrections to 27).

Ok, by now we see that we would like the second 555 powered off of 12v
and
it's reset pin driven by Timer1's output, like in the following schematic:


( the waveforms are almost exactly the same as the last set posted
. -- timing is the same, just Vtmr2 and associated currents are different due to the more proper voltage supply for 555 #2 )

Now this circuit is entirely realizable in a single 556.
« Last Edit: December 23, 2019, 06:55:06 am by SmokeyTheElectrician »
"We must stick them with quills! It's the only way!"
-- Scott Adams
 
The following users thanked this post: phennessey

Offline phennesseyTopic starter

  • Contributor
  • Posts: 36
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #40 on: December 23, 2019, 06:43:46 am »
Then the 556 is a piece of cake! Just remove the Vcc and ground from the second 555, and that’s basically it!  :clap: :clap: :clap:

Can’t thank you enough for your work on this. I just had this sneaking suspicion that the reset on the 2nd 555 could be useful.
« Last Edit: December 23, 2019, 06:45:28 am by phennessey »
 

Offline phennesseyTopic starter

  • Contributor
  • Posts: 36
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #41 on: December 23, 2019, 09:44:21 pm »
Here’s my attempt at a hand-drawn 556 circuit. I’m on vacation so this is as good as I can manage for the moment. Let me know if this is correct? I’m sure I botched something somewhere, and drew this inefficiently or just incorrectly. I’m not sure what I’m allowed to move. I’m trying to picture current flowing through this circuit and trying to think about what relationships I need to keep and which ones are flexible. This was a mind-melting exercise.

895598-0
« Last Edit: December 23, 2019, 09:48:25 pm by phennessey »
 

Offline SmokeyTheElectrician

  • Contributor
  • Posts: 25
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #42 on: December 24, 2019, 04:57:19 am »
With a quick glance, it looks good to me.

This is a really simple circuit, but / however,
formally, you could create netlists for both circuits,
then cross reference them to each other and
affirm all the components pins are connected to
the equivalent nodes between the two circuits.
"We must stick them with quills! It's the only way!"
-- Scott Adams
 

Offline phennesseyTopic starter

  • Contributor
  • Posts: 36
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #43 on: December 25, 2019, 02:37:53 am »
No idea what a net list is or how to build one :) I’ll get googling!

My main concern was that I had fundamentally changed part of the circuit somewhere (changed a component from series to parallel, changed the order of something, etc).
« Last Edit: December 25, 2019, 02:49:09 am by phennessey »
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #44 on: December 25, 2019, 04:17:39 am »
A netlist is just a list of nodes (such as pins on ICs) and what connects to what. You draw the schematic in the schematic editor and it creates the netlist for you, you don't have to directly manipulate it.
 

Offline phennesseyTopic starter

  • Contributor
  • Posts: 36
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #45 on: December 25, 2019, 01:31:23 pm »
I don’t have any EDA software (yet). I plan on getting a copy of Fritzing soon.
« Last Edit: December 25, 2019, 02:08:42 pm by phennessey »
 

Offline SmokeyTheElectrician

  • Contributor
  • Posts: 25
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #46 on: December 25, 2019, 02:35:49 pm »
... As I mentioned earlier, this is an unusual way of doing a traffic light.
Yeah,
I mostly agree,
but I would bet a pack of Big League Chew
  ( and  as a matter of trivia of sorts )
that at least some of the first traffic light circuits
had more in common with the OP's original schematic
than most of what was given as advice ( that is not
to say there was anything wrong with any of that
advice, quite the contrary, you all totally pointed the OP
in the right direction for when they become interested
in tackling more complex circuit applications).

In those original traffic lights I am thinking of,
you'd likely find pneumatic delay relays functioning
as the timer elements in a string of one shots connected
in a ring (think of a ladder logic implementation).

cheers
&&&
Merry Christmas to everybody
« Last Edit: December 25, 2019, 06:15:57 pm by SmokeyTheElectrician »
"We must stick them with quills! It's the only way!"
-- Scott Adams
 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2431
  • Country: mx
Re: Traffic light circuit with 556 timer?
« Reply #47 on: December 25, 2019, 10:13:57 pm »
Back in the early 70s, I worked for a summer for the city’s traffic light department, in maintenance.

There were a couple of systems, that I remember:
-Relay ladder logic as you described.
-A camshaft driven by a 1RPM geared synchronous motor.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Traffic light circuit with 556 timer?
« Reply #48 on: December 26, 2019, 04:32:34 am »
There's lots of information out there about traffic light controllers, at least the stuff used in the US. Eagle, Econolite and Crouse-Hinds were some of the big makers here. Early systems used motor driven timing wheels and solenoids, then in the early 80s microprocessor based controllers started taking over.

https://northstarhighways.wordpress.com/2016/09/10/how-traffic-signal-controllers-work-part-1-an-overview-of-controllers/
 

Online Ed.Kloonk

  • Super Contributor
  • ***
  • Posts: 4000
  • Country: au
  • Cat video aficionado
Re: Traffic light circuit with 556 timer?
« Reply #49 on: December 26, 2019, 05:04:40 am »
Traffic lights are classic classroom example when learning about state diagrams and/or truth tables.
I have made a fictional intersection in a pair of streets: Second avenue and Main street. Please check the attached Excel spreadsheet.

To keep things simple, I've arbitrarily made them one way, and have not included turn signals.

The circuit has four states, which repeat endlessly and six outputs, one each for each light color on a street.
Fortunately, four states can be realized with a two bit counter, with a single IC dual flip flop like the CD4013.
 
Then using sums of minterms, you decode each output. For instance, the Second ave green light is simply A * B/

The fact that the yellow light has a different duration than the other lights complicates things a little, but with additional steering logic you could change your astable's time constant.

Of course, doing this with a microcontroller is trivial.

Part of the enjoyment of visiting England and driving around there is that country's feature of the traffic lights facing you goes amber/orange prior to turning green. This gives the motorist time to extract a finger and put the vehicle in gear.

Returning home, it's always a disappointment that we cannot implement such an innovation here. I once asked someone who works in the transport ministry why we can't manage it? A blank, short-circuited look for a few seconds and then the response: "Oh, cost."

 :palm:
iratus parum formica
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf