The development of implantable peroneal nerve stimulators has increased interest in sensors which can detect the different phases of walking (stance and swing). Accelerometers, having a potential for implantation, are studied as detectors for the swing phase of walking to replace footswitches. Theoretically, we could show that accelerometers can be used to distinguish between stance and swing phase. Attaching accelerometers between ankle and knee joint the equivalent acceleration of the ankle joint was calculated. This resulted in a typical and reproducible signal in which the different walking phases were identified. Automatic detection algorithms, based on cross correlation calculation were developed and tested. Measurements from four healthy and four hemiplegic subjects resulted in a total of 317 and 272 steps, respectively. One of the hemiplegic subjects was considered to be a failure due to large disturbances in the acceleration signal during the swing phase of walking, which may be related to the use of crutches. Taking part of the data as a learning set and the other part as an evaluation set we found two errors in the push-off detection for both the healthy subjects and the remaining three hemiplegic subjects, out of 152 and 106 steps, respectively. In addition, we showed that when using one accelerometer closely below the knee joint almost identical results can be achieved. This could lead to a combination of sensor and stimulator into one implantable device.