design and construction of a motion sensor