Reference

This article delves into the gray-scale sensor's ability to detect color depth through light reflection and resistance changes, highlighting its practical use in robotics and compatibility with Arduino and micro:bit.

Principle

The gray-scale sensor detects the color depth based the principle that different colors performs different light reflection ability and the photoresitor resistance changes with respect to the receving light on the componnent's sensitive surface.

It is used to distinguish black from other colors when the ambient light interference is not very serious. The sensor has relatively wide range of operating voltage so it can work normally even in the case of large fluctuations in supply voltage. It outputs a continuous analog signal, so the reflectivity of object can be easily determined by ADC or simple comparator. It can be used as a practical robotic line-tracking sensor.

Other Supplementary Information

This smart greyscale sensor works with maincontrollers like Arduino and micro:bit. Users can choose to output analog and digital signal by pressing the onboard button.

(1) Analog mode

The greyscale sensor can recognize different colors and return varied voltage values, which shows linear changes in multimeter, and the LED brightness also varies with voltages.

(2) Digital Mode

The sensor can sense any two recorded colors and then output the corresponding voltage values. Follow the steps below:

  1. Collect Two Colors To Be Detected: Press And Hold The Onboard Button Until Led Flashes, Release It, Then The Sensor Starts To Collect The First Color Voltage. Short Press To End Collection, And The Led Turns Off. Short Press Again To Acquire The Second Color Voltage, This Time The Led Blinks Rapidly, Then Short Press To End Collecting And Return Back To The Normal Output Mode.

  2. Test The Returned Voltage Of Two Colors: When A Dark Color Is Detected, The Output Voltage Is Approximately Equal To 0 And The Led Goes Off; When A Light Color Is Detected, The Output Voltage Value Is Close To 5v And Led Lights Up.

This gray-scale sensor allows users to sample once and use the data for several times or sample at any time when necessary. The sensor configs are saved and won't be reset after powering off.

Note:
(1) The returned value varies with the material of the detected surface.
(2) The external light will have an influence on the sensor, which may affect the detection result. Please cover the sensor when detecting a specific object to avoid interference from external light.
(3) The detetion accuracy is directly related to the distance from the sensor to the detected surface. And it also will be affected by the vibration of robots in moving.

Was this article helpful?

TOP