Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

traffic light controller

Status
Not open for further replies.
May I ask if anyone of you know a site wherein I can download a schematic and a code of a traffic light by using a parallel port (DB-25) and if there by any chance to create the code into turbo-c language.


Thanks It would be a great help for me...
 
Last edited:
hey all;
I need some assistance in designing a 4way traffic light system and ped crossing using a pic16f877. I have already developed the codes for the 4 way lights but i am having trouble with incorporating the ped crossing. Could someone give me some assistance please.
Rawle.

ps. here is what i have.
View attachment 13491
In your delay loop, poll a pedestrian crossing button. When the button is pressed, set a flag indicating that a pedestrian is waiting to cross. At some point in the main loop where all the lights are red but before it turns the next light green (say, at the end when you branch back to main), check the flag. If it is set, make all lights red and illuminate the walk signals for a period of time. Reset the flag at this point. Then flash the Don't Walk a few times, then resume the normal light cycle.
 
Does anyone know how actual traffic lights are controlled? Is it a central control centre where there are cameras at junctions being monitored by humans or stand-alone systems where each junction is controlled independently by a computer in one of the light boxes? Or is it completely different depending where you are in the world? I live in Exeter, Devon, UK, and there seems to be a huge amount of traffic lights everywhere, I believe the second most traffic lights per mile of road. Even round-abouts have traffic lights on them, which I think there shouldn't be as round-abouts are self regulating.

Anyway, back on topic, I remember doing the typical traffic light controller assignment in school, and the smart a** I was, I added a time of day reference so all lights flash amber after 10.30pm. I got marked down for not following the assignment!
 
Does anyone know how actual traffic lights are controlled? Is it a central control centre where there are cameras at junctions being monitored by humans or stand-alone systems where each junction is controlled independently by a computer in one of the light boxes? Or is it completely different depending where you are in the world?
It could be "any of the above". Most lights in the northeast USA at least have control boxes for each intersection/set of lights, and most of them use inductive sensors in the road to detect when there's cars waiting for the light. The controllers can be wired together so that the lights can be synchronized as well--this is often done when there's two sets of lights near one another, say at a highway junction where the ramps in one direction meet the road in one spot (one light) and the ramps in the other direction meet in another spot (the other light).

But there's lots of ways to do it. I bet there are some centrally monitored systems in larger cities.

You should have gotten extra credit for the amber flash feature!
 
Last edited:
Traffic Light

Here's my traffic light controller. I've attached the layout, the schematic, the source code, and in this message, I'm putting the HEX code that was compiled by flowcode. The first three outputs control the N/S lights and the last three control the E/W lights, so its a 4 way light setup.

Traffic.hex
Code:
:02000000A52930
:08000800FF00030E8312031335
:10001000B4000A0EB500040EB6008A110A12CD29EA
:10002000CC08031D1428080031300000FF3E031DDA
:10003000152800000000CC0B14280800FA30CC0072
:100040001020FA30CC001020FA30CC001020FA300A
:10005000CC001020CB0B1E28080030308316031371
:100060009F000130831203179E00831603130508B7
:100070008312CC0001308316050485000130831201
:100080009F00CD0128304D0203184828CD0A422890
:1000900002301F049F009F184B284C0883168500D0
:1000A000831203179E0103139F010800D001D101A1
:1000B000D301D401D201521A08000310D30DD40D7C
:1000C000CA0DCB0DD00DD10D4D085102031D6A286C
:1000D0004C085002031C73284C08D0024D08031C26
:1000E000D103D1025314D20A5B28023083160313C2
:1000F00005048500023083120505CA00C9010230DB
:100100004A020319C90A4908003C031C0800831667
:1001100087012130831287003908CB001E2002306E
:10012000831605048500023083120505CA00C90143
:1001300002304A020319C90A4908003C031C08009E
:10014000831687011130831287003B08CB001E20E5
:100150000230831605048500023083120505CA00AB
:10016000C90102304A020319C90A4908003C031CAC
:100170000800831687010930831287000530CB0001
:100180001E20023083160504850002308312050507
:10019000CA00C90102304A020319C90A4908003CD1
:1001A000031C0800831687010C308312870039086E
:1001B000CB001E2002308316050485000230831216
:1001C0000505CA00C90102304A020319C90A4908D3
:1001D000003C031C0800831687010A308312870045
:1001E0003B08CB001E200230831605048500023038
:1001F00083120505CA00C90102304A020319C90A5F
:100200004908003C031C080083168701093083124B
:1002100087000530CB001E20752883160313870145
:100220000A30831287000130CB001E20831687011D
:10023000831287010130CB001E2002308316050493
:100240008500023083120505CB00C90102304B0244
:100250000319C90ACA0149030319CA0ACA08031DB6
:100260000D2908002D201E08CA00CB01CA0DCB0D98
:10027000CA0DCB0DFC30CA0583161E0C8312CC00B0
:10028000CC0CCC0E03304C05CA04CB084A08CC0079
:100290004B08CD000800831203179E019F01C03058
:1002A00083160313810087018312870132214C08D2
:1002B000BD004D08BE003D08CA003E08CE00CA0A77
:1002C0000319CE0ACF014E08CB00CE1F6D29CA09F3
:1002D000CB09CA0A0319CB0ACF0A1130CC00CD01D1
:1002E00056205308B9005408BA004F1C7C29B9099C
:1002F000BA09B90A0319BA0A3908BB003A08BC009E
:100300003A0DBC0CBB0C0430831605048500043088
:1003100083120505CA00C80104304A020319C80A3D
:100320000230831605048500023083120505CA00D9
:10033000C90102304A020319C90A4908003C0318DE
:10034000A3290D21832975208329D5308312031316
:10035000A000C430A100BB30A200DC30A300A40187
:10036000A501A601A701A801A901AA01AB01AC0141
:10037000AD01AE01AF01C201C301B701B801C401B3
:10038000C501C601C701B001B101B201B301C0018D
:10039000C101BF018A110A124B2983120313360EC1
:1003A0008400350E8A00340E8300FF0E7F0E090094
:02400E00F1318E
:00000001FF
 

Attachments

  • traffic lights schematic.PNG
    traffic lights schematic.PNG
    200.9 KB · Views: 757
  • traffic lights board.PNG
    traffic lights board.PNG
    34.9 KB · Views: 723
  • TrafficLight.c
    10.7 KB · Views: 447
Hello,
Could you help me design a traffic light junction with a RAM memory?


You should start a new thread!!!
Why o why would you want RAM memory??? For what???
 
Last edited:
It was dead since 2009 when I made the last post, until digital revived it.
 
Last edited:
The RAM memory is in project specifications.I thought you could help me with am ideea, instead asking why i choose to use RAM memory...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top