Gray sensor is an analog sensor.
1. It can sense different colors on the ground or desktop and produce corresponding signals when it is combined for Arduino sensor expansion board v5.0.
2. It can realize interactive works related to colors, and it can also be used as patrol sensor of patrol trolley or field gray recognition of soccer robot.
3. The power supply needs to be consistent with the controller, usually 3.3V or 5V.
Technical Specification:
Working Voltage: 3.3V or 5V
Working current: < 20mA
Working temperature range: – 10 +70.
Detection resolution: 10%
Interface Type: Analog Signal Output
Size: 24x21mm/0.08×0.07in
Weight Size: 3G
Interface definition
OUT: Signal Output
VCC: Power Supply (VCC)
GND: Ground (GND)
Working principle:
The gray sensor consists of a white high brightness light emitting diode and a photoresistor. Because the light returned from the light emitting diode to the paper with different gray levels is different, the photoresistor receives the returned light. According to the intensity of light, the resistance value of the photoresistor is different, so the gray value test is realized.
Programming principle:
The gray-scale sensor leads out three pins, which are power positive Vcc, power source GND and signal OUT. In practical use, the sensor can be directly connected to the analog interface for Arduino controller, such as analog port A0. After power-on forArduino, the white bright LED of the sensor lights up, the sensor is buck LED on paper with different gray levels, and the AD conversion is carried by for Arduino controller. Read the data, then print out the measured analog quantity through the serial port.