For my project I need to build a repeatable vehicle without using any programmable devices (eg: Arduino, microcontrollers etc) After activation, the vehicle needs to move straight towards a wall which is a random distance away, make contact with the wall, and come back as close as possible to the starting point. I have decided to use a DPDT to reverse the motor but I still can't figure out how to make the vehicle stop at the starting point after returning from the wall. The distance between the starting point and the wall ranges from anywhere between 1.4m-4.0m.
edit: the whole project has to be built within a budget of 30£