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

Status
Not open for further replies.

kiosk

New Member
Hi, i'm doing a traffic light project with an IR sensor and a microcontroller. if there is something blocking the connection between the IR emitter and the receiver at specific time, say for 30 seconds, the sensor will send data to the microcontroller that there is a long line of cars. if there is a heavy traffic, the microcontroller will provide an input to the traffic light and then the traffic light will show an output which is a lengthened GREEN light because of the traffic.
 
So while your IR sensor is detecting interruptions, all other traffic stops and waits, fine but im sure after a while the other traffic will get pissed off with the long wait and not receiving a equal turn.

What happens when a bug sits on the sensor, or some vandal spray paints it, and it gets stuck in one traffic mode only.

Now what was your question anyway??
 
See post #2. What is your problem?
 
what particular microcontroller can be used for this purpose

The short answer is Any micro can be used.

Due to your limited knowledge and the simplisity of this project my recommendation would be to use a Picaxe micro, as it is the easiest micro to program and also has many built in functions like some IR options.

Your biggest problem will be interference from sunlight, and will need to modulate the IR at 38khz or above to reduce the effect of sunlight, no big deal if you use a IR receiver chip designed for 38khz modulation.

Are you aware most traffic lights have a loop wire in the road to read the presents of a large metal object (car) as a standard function, and many lights already time the interval between cars to set the amount of traffic flow to time required.

IR is not the best way to do this, but i guess it is a school project so IR would be the easiest.
 
well, uhm, my professors told that i use an IR kit like intruder alarm instead of building my own. which of the do you think is the much better to use? thanks
 
Not clear to me why you're using IR. IR sensors of the type used in intruder alarms detect warmth/heat. Do you want to detect warmth/heat, or just the presence of simulated traffic?
 
what type of sensor is like a LINE of SIGHT? the emitter and the receiver is facing each other.
 
Yes. An object on the line of sight will block the light path and so can be detected.
 
It really depends on the distance you intend to sense over and what your budget is.

I have built driveway sensors with a 555 to modulate the IR led at 38khz and an opamp on the detector to set the trip point.

Now days i would use a picaxe chip on the detector end.

As from the picaxe manual see image below.
 

Attachments

  • IR.JPG
    IR.JPG
    22.2 KB · Views: 725
i only want a short distance because the project is just a prototype. what picaxe do you use on the detector end? thanks
 
The 08m2 picaxe would do what you require. (the 08m2 has recently replaced the older 08m)

Download "Programming Editor" from the Rev-ed website, its the software used to program a picaxe with, have a look in the help files as there is a lot of information on IR under the "infrain" instruction and a few other instructions.

There has been several threads in the picaxe forum about doing IR security beams that you might like to search for.


Here is a link to a data sheet on the type of IR detector used in the circuit above.

https://www.electro-tech-online.com/custompdfs/2011/07/tsop382.pdf
 
Last edited:
i already bought an IR sensor kit but the frequency used is 12khz. i am thinking of covering the emitter so that the sunlight cannot affect the frequency.
 
hi kiosk

I made same circuit last year. I posted ır emitter dedector and traffic light with sound circuit.
 

Attachments

  • Clip.jpg
    Clip.jpg
    141.2 KB · Views: 340
  • Clip_2.jpg
    Clip_2.jpg
    245.9 KB · Views: 301
Just a note to people bashing the IR stuff. In the UK IR is used quite a lot to detect traffic - its cheaper then digging up the road to put a sensor coil in!

However it's not a beam break system as used here, i belive its a PIR type device which detects movement of hot objects. This seems to work well for cars as their hot engines get picked up quite well.

However if you cycle, as i frequently do, you have to be in a group of 5 or more to be detected by these. Any less and your going to have to wait for the next car to trigger it for you!
 
However if you cycle, as i frequently do, you have to be in a group of 5 or more to be detected by these. Any less and your going to have to wait for the next car to trigger it for you!

You might need to carry a hot water bottle.
 
Perhaps you would do better if you were female and "Hot"
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top