Light sensing robot using Raspberry Pi and OpenCV


The light following robot can be done using sensors, this Raspberry Pi system for light following robot we have used technology by interfacing camera which monitors the light by monitoring the brightness to track the light and car will follow the light. This car will track the light which is used to give the way for the car to make it follow. This Raspberry Pi project is used for surveillance car as the beginners can work with the OpenCV technology by using the camera with Raspberry Pi


Light sensing plays an important or eventful role in most of the applications, such as video surveillance, human-computer interface, vehicle navigation, and robot control. Image Processing has been the talk of the e-world for some years. Its varied applications have found its uses in almost every field. Vision deals with Computer Vision and image processing. The Raspberry Pi, sometimes referred to as the Pi, is a small, low-cost computer invented in the U.K. by the Raspberry Pi Foundation. It provides an easy-to-use tool to help you learn to code in Python (the Pi part of its name came from the focus on using it to code in Python). About the size of a deck of cards, it isn?t as powerful as a laptop or desktop computer; its computing power is more similar to that of a smartphone. But what it lacks in processing power, it makes up for in its many features:

? Its readiness for programming in Python

? The many ways you can use it

? Its small size and cost


In the existing system, the light in the environment gets located using the LDR and the decision will be made to drive the car.


  • Hard to setup
  • Needs more components
  • Accuracy of output is less
  • Not a user friendly system


In this proposed system, Camera is used to sense light in environment, Image processing technique is implemented in proposed system


  • Accuracy of output is increased
  • Easy to setup compared to old methods
  • User friendly system?


Light sensing robot using Raspberry Pi and OpenCV


Light sensing robot using Raspberry Pi and OpenCV


  • In this project Raspberry pi acts as the heart of the system
  • Above block diagram shows that robotic car is connected to the Raspberry Pi through GPIO pins, the camera is also connected with the Raspberry Pi
  • A camera which is connected with Raspberry Pi looks for the brightness of light by converting the image into binary and points the centroid in the bright pixels and forms the circle with a certain radius, based on the centroid The car will move forward and will turn left/light.


  • Raspberry Pi
  • Camera
  • Power supply
  • Battery
  • Driver circuit
  • Robot car


  • Raspbian Jessie OS with libraries installed
  • Python IDE
  • SD Card Formatter
  • Etcher/Win32 Disk imager


[1] M. S. Hassan, M. W. Khan, A. F. Khan, ?Design and Development of Human? Following? Robot?,? Student? Research? Paper? Conference,? vol. 2, no. 15, July 2015. doi: 10.13140/RG.2.2.10421.73440

[2] Jianzhao? Cai,? Takafumi? Matsumaru,? ?Human? Detecting ?and Following Mobile Robot Using a? Laser Range Sensor,?? South China University of Technology. doi: 10.20965/jrm.2014.p0718

[3] ?Introduction? to? Autonomous? Robots?,? v1.7,? October? 6,? 2016, Nikolaus Correll, Magellan Scientific

[4] Bischoff R. , ?Advances in the development of the humanoid service robot HERMES,? Proceedings of the International Conference on Field and Service Robotics, pp. 156?161, 1999.

[5]Apostolopoulos D. , M. Wagner , W. Whittaker , ?Technology and field demonstration results in the robotic search for Antarctic meteorites,? Proceedings of the International Conference on Field and Service Robotics, pp. 185?190, 1999.

[6] Langer D. , Mettenleiter, F. Hartl , and C. Frohlich , ?Imaging laser radar for 3- D surveying and cad modeling of real world environments,? Proceedings of the International Conference on Field and Service Robotics, pp. 13?18, 1999.

[7] Semwal , Vijay Bhaskar , et al. ?Biologically-inspired push recovery capable bipedal locomotion modeling through hybrid automata.? Robotics and Autonomous Systems 70 (2015): 181?190.

[8] Corke P. , G. Winstanley , J. Roberts , E. Duff , and P. Sikka , ?Robotics for the mining industry: Opportunities and current research,? Proceedings of the International Conference on Field and Service Robotics, pp. 208?219, 1999.


Customer Reviews

There are no reviews yet.

Be the first to review “Light sensing robot using Raspberry Pi and OpenCV”

Your email address will not be published. Required fields are marked *