Colorectal cancer is one of the commonly occurring types of cancer and individuals above 50 years of age are considered at a high risk. Everyone is suggested to undergo full colonoscopy every 10 years. Training medical students by operating on patients directly is not safe and not comfortable for the patients. Hence, a training model is being developed to train medical students. In the training sessions, if student gets information regarding the distal end of colonoscope, he can prepare and plan his future moves and he also gets the information concerning the diseased part of the colon. This information also helps the student if he requires inserting a surgical tool along with the colonoscope. In the present study, the distal end of colonoscope is localized using photocells. The colonoscope has a light source for the camera at its distal end. These photocells are connected in basic comparator circuit. The photocells are fitted at specific locations on rubber colon, whose voltage changes on reception of light beam. The photocells are interfaced with a data acquisition system, using which data are acquired. While tracking the distal end, noise created in some photocells at particular instant yields misleading information. In order to avert such occurrence, an algorithm is written separately for advancement and retraction. Using these data, distal end is accurately localized and also specific time required during the test, to pass the colonoscope through specific parts of colon for further analysis.