Introduction
This smart gray-scale sensor has integrated both digital and analog output features. In digital mode, users can have two colors recorded through simple button operation to achieve two color detections with high/low outputs, and it requires no more configuration after being set. In analog mode, the output value reacts precisely to the color grayscale detected.
Apart from being a stable and adaptative sensor in various environments, the Smart Grayscale Sensor also demonstrates a great potential in color-interactive projects, or line-tracking Robot cars.
Specification
- Operating Voltage: 3V-5V
- Interface Mode: PH2.0-3P
- Dimension: 26mm×39mm/1.02×1.54"
- Signal Type: analog signal
Pin Description
Number | Name | Description |
---|---|---|
1 | GND | Power - |
2 | VCC | Power + |
3 | A | Analog Signal Line |
Use Description:
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:
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.
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.
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.
Application:
1. Grayscale Indicator
Description:
The gray-scale sensor outputs different voltage for different colors, so it can be used to detect the brightness of a LED in different colors.
Components:
BOS0010 Smart Grayscale Sensor | BOS0016 Bright Light LED | BOS0035 Mainboard-3IO |
Connection Diagram:
Demo Videos:
Non-programming |
---|
2. Item Sorting System
Description: Use the smart grayscale sensor to recognize the color of the items on the conveyor belt, and when the item of designated color is recognized, the system will make prompt sound to remind workers to sort it.
Components:
BOS0010 Smart Grayscale Sensor | BOS0020 Buzzer module | BOS0040 Micro:bit BOSON Expansion Board |
MBT0039 Micro:bit |
Connection diagram:
Flowchart:
Tips: The value should be adjusted according to the height and brightness.
Mind+ Sample Program:
Makecode Sample Program:
3. DJ Bandstand
Description:
Performs various musical notes according the detected gray scales and controls the RGB LED strips to light up in different colors.
Components:
BOS0010 Smart Grey-scale sensor | M011.00184 RGB LED strip | BOS0040 micro:bit Expansion board |
MBT0039 micro:bit |
Connection Diagram:
Flowchart:
Mind+ Sample Program:
MakeCode Sample Program:
Demo Videos:
Programming |
---|
FAQ
For any questions, advice or cool ideas to share, please visit the DFRobot Forum
Turn to the Boson Kit Page