Physics Experiments

Distance Measurements with the WiiMote

The diagram below shows the situation when the WiiMote detects two point sources of light. The two sources are separated by a distance, d, and the WiiMote is a distance, z, from the plane containing the two sources. Light travels from the sources and is detected by the camera as two points separated by a distance, r. In order to determine the distance, z, it is necessary to measure the angle, α, as shown the diagram.

triangulation

Given the angular field of view of the camera in both the horizontal (HFOV = 41°) and vertical (VFOV = 31°) directions it is possible to determine the angular field of view per pixel on the camera, θFOV. There are 1024 pixels in the horizontal direction and 768 pixels in the vertical direction, hence,

pixelfov

 

The distance between the two dots on the camera can be calculated from their individual coordinates,

distance

 

Therefore the total angle subtended between the two LEDs and the WiiMote camera is given by,

totalangle

Hence, the angle, α, is,

halfangle

Given the angle, α, and the measured distance, d, between the two LEDs on the sensor bar it is possible to compute the distance between the WiiMote and the sensor bar using trigonometry,

z-distance

In terms of the measured quantities this becomes,

z-distance-full

Using this equation the program is able to calculate the distance from the WiiMote to the sensor bar. Initial tests show that it is accurate to a few cm over a 5 m range. The accuracy could be improved by more accurate measurements of HFOV and VFOV.

The photograph shows a WiiMote connected to a spring with a sensor bar directly below it. As the WiiMote is displaced from its equilibrium position it undergoes simple harmonic oscillations.

shmexpt

The graph below illustrates data collected from the WiiMote using the experimental arrangement above. The graph shows the WiiMote’s displacement varying sinusoidally with time as it oscillates around its rest position..

Spring-Mass_SHM