HI Guys!!
I'm working on the project on how to create intelligent traffic light... the aim is to minimize the traffic around the city!! in my project i have used microchip p16f628a.. the problem comes with how to program it!! and what sensors can i use to detect which side of the road has great number of cars in order to allow them!?

There are basically two kinds of sensors that I know of:

  • The ones buried under the road that detect a conductive mass above them because their capacitance changes
  • The ones mounted near the light that detect the car by (radar? They seem to mess up my radio reception a little bit)

A robust system would adapt to whatever sensor(s) are available at the particular intersection.

Don't forget to allow emergency vehicles to override the lights
Think about 'tuned' sets of lights on major roads, set so that at a particular speed, a vehicle will encounter only green lights. How does that interact with emergency override? With maximizing periodic flows?

There are some interesting (I don't know if "good") papers out there about these issues. Don't re-invent the wheel!

I had not thought of the emergency override!! since u mentioned it, i think its better if its implimented with maximizing periodic flows... In my country we dont have burried detectors so i i'll go with the radars!! Is there no way i could use Infrared detectors to achive this instead of radars??....

I don't know any details about how traffic lights detect vehicles. Infrared sounds feasible. What is the cost compared to the kind of radar that department stores use to open the door for you when you approach? In my city, it appears that many lights use both capacitance and some form of radar. Perhaps the radar gives a longer lead time, the capacitance is used to indicate only that a car is actually waiting? Be aware that there is some issue of focus: You may need more than one detector to focus on immediate and distant vehicles.

I strongly encourage you to find an actual expert for this or at least read what actual experts say. I got this list of scholarly articles on the first page of my Google results for traffic light control