This paper presents a flexible prototyping platform that can be efficiently used for vision systems of small mobile robots. The vision module has been integrated into the mini-robot “Khepera”. The module is utilized to realize optical flow algorithm for obstacle avoidance. The obstacles are detected from abrupt change of the normal flow vectors during operation. This technique is also inspired by visual perception of insects, which alert when an object suddenly appears nearby them. The optical flow algorithm implemented for this approach is Sum of Absolute Differences (SAD) algorithm. The SAD is programmed using the hardware description language (VHDL) efficiently utilizing the FPGA device that is the central processing device of the module. The 30x16 pixels used in SAD for block matching are computed in parallel by 16 pairs of pixels in each operation, which allows in real-time operation. Therefore, the mini-robot being equipped with our 2D vision module for the real-time image processing is able to drive autonomously without collision with obstacles, called ego-motion. The result also shows that the implementation can reduce the execution time compared to serial implementation and helps to reduce energy consumption.