Obstacle detection is a key feature in the safe driving control of electric wheelchairs. The suggested obstacle detection algorithm was designed to provide obstacle avoidance direction and detect the existence of cliffs. By means of this information, the wheelchair can determine where to steer and whether to stop or go. A 3D depth camera (Microsoft KINECT) is used to scan the 3D point data of the scene, extract information on obstacles, and produce a steering direction for obstacle avoidance. To be specific, ground detection is applied to extract the obstacle candidates from the scanned data and the candidates are projected onto a 2D map. The 2D map provides discretized information of the extracted obstacles to decide on the avoidance direction (left or right) of the wheelchair. As an additional function, cliff detection is developed. By defining the "cliffband," the ratio of the predefined band area and the detected area within the band area, the cliff detection algorithm can decide if a cliff is in front of the wheelchair. Vehicle tests were carried out by applying the algorithm to the electric wheelchair. Additionally, detailed functions of obstacle detection, such as providing avoidance direction and detecting the existence of cliffs, were demonstrated.