[HELP] Circuit simulator help - Semaphore

ThunderbInazuma

Well-Known Member
OP
Member
Joined
Aug 31, 2015
Messages
507
Trophies
0
Location
Under Your Bed
XP
2,103
Country
Portugal
Hi guys.

I'm in the middle of a school project that I need to create, with a simulator called Logisim. What I need to do is to create a semaphore for cars + pedestrians that work as 4 states:

  • State A - Cars Green; Pedestrians Red
  • State B - Cars Yellow; Pedestrians Red
  • State C - Cars Red; Pedestrians Green
  • State D - Cars Red; Pedestrians Red
The circuit goes on as A->B->C->D with the clock. However, when it is on state A, it stops there waiting for a pedestrian input (click on button) and, on C, it is supposed to use a counter before it changing state.

I've been trying to get the equations for the Flip Flops to resolve the problem during 2h, but I can't seem to reach anywhere. I know that we need only 2 FF to make 4 states ( 00,01,10,11) but I can't seem to get the changes on the Leds (that simulate the Semaphore). Can anyone help me to reach something?

Thanks in advance.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,403
Country
United Kingdom
I fear I have spent too long considering micro controllers as even a 2c thing would probably handle this just fine. We shall do it in basic principles though.

Slightly expensive method.
You say you have 4 states but to me it seems like adding another binary digit (which may well be unused in most states) you could add another level of functionality and with it.

To start with three bits per state. Have the highest bit indicate a timer in running/active. Pressing the button can then trigger this timer state and after finishing state D it then resets the button/timer bit and allows the process to happen all over again. You may have to do something about the button so you can't press it in the middle of state C and have it mess something up.

You say it happens on a timer but specifically mention C after that. Is the timer there special? If it needs to run for longer why not do ABCCD (or ABCCCD...), or do you mean it also has to display a counter while it is running in that state? Is the counter a standalone circuit you can just fire with a transistor or something?

Going back to states then I would next look at the outputs.
You have three for cars and two for pedestrians, not all combinations can happen which make some kind of multiplexer an option but let us not go there. The big question is do you combine the outputs into one logical pool or treat them as separate? Separate works for me for this. Also are you using colour changing LEDs and if so what method do they change by? In the real world I might have some kind of lockout on the lights so if a fault occurs I can never have both be green. While anticipating things are you going to be asked to expand this (now you have a cross junction or something) as some effort now might help you later? I don't know if you will for your projects but it is a pretty classic move to teach people to design for future expansion.

100 (the rest/cars green state)
000
001
010
011
back to
100

if
100 PED red
000 PED red
001 PED red
010 PED green
011 PED red

Sadly can't key of a single bit for this one, at least if your clock counts in binary and you reset after D (reset after C and it could be done).

Can use two gates though

Do an XOR of the lower two bits. Take the output of that and NAND it with the lower bit.

if
100 CAR green
000 CAR green
001 CAR yellow
010 CAR red
011 CAR red


NOR lower two bits green
simple transistor or whatever off lower bit for yellow.
OR lower two bits for red.

That would leave yellow on as well as red at some points, and not in the same way it exists in some countries. Maybe run the middle bit through a NOT gate and then feed that and the lower bit into an AND gate. Alternatively the middle bit will be high when the red is on and no other time so that could be used from a simple transistor.

The timer can be switched off with an AND of the lower two bits.
 

ThunderbInazuma

Well-Known Member
OP
Member
Joined
Aug 31, 2015
Messages
507
Trophies
0
Location
Under Your Bed
XP
2,103
Country
Portugal
Hi! Thanks for your answer. I didn't remember that way of maintaining C there (repating it). I achieved to make the circuit like this.
upload_2017-11-22_20-48-35.png
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BigOnYa @ BigOnYa:
    They help you delete some incriminating videos?
  • K3Nv2 @ K3Nv2:
    No you asked for proof that your wife was finally leaving
    +1
  • BigOnYa @ BigOnYa:
    Nuh I had her chipped, I always know where she is.
  • K3Nv2 @ K3Nv2:
    I found where it was
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    If I could halucinAte this is what I imagine it would look like?
  • K3Nv2 @ K3Nv2:
    Featuring Taylor swift
    +1
  • BakerMan @ BakerMan:
    guys, pubg should've never blown up
  • BigOnYa @ BigOnYa:
    Wut do you mean? Pubg is alright, I play it with a few buddies online.
  • BakerMan @ BakerMan:
    the game itself is ok, but it's influence is the problem
  • K3Nv2 @ K3Nv2:
    Call of duty is a good Fortnite skin
  • BakerMan @ BakerMan:
    call of duty and fortnite, ex-fucking-actly
  • BakerMan @ BakerMan:
    without pubg popping off, fortnite wouldn't add battle royale, and call of duty wouldn't go even shittier than it did before because of blackout, warzone and dmz
  • Psionic Roshambo @ Psionic Roshambo:
    Make a porn based spoof of it, Pube G
  • BigOnYa @ BigOnYa:
    Just play My Pony online. Its better than Fortnight or COD.
  • Psionic Roshambo @ Psionic Roshambo:
    FPS porn games sound fun lol
    +1
  • K3Nv2 @ K3Nv2:
    Call of duty got close with that by using Nikkie Minaj
  • BigOnYa @ BigOnYa:
    -Bonus- Faceshot
  • K3Nv2 @ K3Nv2:
    5 killstreak call in the gangbang
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Still enjoying Bad Ass Babes lol
  • Psionic Roshambo @ Psionic Roshambo:
    Legit a super solid beat em up
  • Psionic Roshambo @ Psionic Roshambo:
    The special moves are hilarious
  • BigOnYa @ BigOnYa:
    Introducing the most anticipated 1p v 4p game of the year - COCC (Call of couch casting)
  • RetroNerdGamer @ RetroNerdGamer:
    isnt that just gal gun
    RetroNerdGamer @ RetroNerdGamer: isnt that just gal gun