Speed traps set up by the police may or may not be legal depending on the jurisdiction you are driving in, the traffic laws and the type of speed trap that is being used. There are several different types of speed traps, but whether they are legal depends on the state or locality you live in:
In some states, it is not legal for the officer to hide and be out of the sight of drivers. In addition, while the use of radar is legal, timing a vehicle is not an acceptable method. Most criticism comes from the method with the signs that are partially hidden or unclear. This is criticized as a real trap--one that should not be allowed, and in most places, one that is not legal.
In some states, speed traps are not legal except on local roads--California for one. In Virginia, you do not get a speeding ticket per se; instead you are given a citation for reckless driving if you are using excessive speed. While a speeding ticket that came as a result of radar is the most common and is the most difficult to fight, some jurisdictions recognize only what is termed “road surveys”.
Know the laws of your state and check with an attorney about the types of speed traps that are legal.