Light sensing robot using Raspberry Pi and OpenCV


Light sensing robot? – The light the 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 the 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 cars 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 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 their 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
  • The accuracy of output is less
  • Not a user-friendly system


In this proposed system, a Camera is used to sense light in the environment, Image processing technique is implemented in the 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
  • The above block diagram shows that the robotic car is connected to the Raspberry Pi through GPIO pins, the camera is also connected to the Raspberry Pi
  • A camera that is connected with Raspberry Pi looks for the brightness of the 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,?? The 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 resulted 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”

This site uses Akismet to reduce spam. Learn how your comment data is processed.