Difference between revisions of "Sensor-Color Detector"

From Microduino Wiki
Jump to: navigation, search
(Introduction of Sensor Pins)
 
(11 intermediate revisions by one other user not shown)
Line 5: Line 5:
 
[[File: Microduino-Color_detector.jpg|400px|thumb|right| Microduino-ColorDetector]]
 
[[File: Microduino-Color_detector.jpg|400px|thumb|right| Microduino-ColorDetector]]
  
Microduino-Color detector is a color detection senor.
+
The product number of Sensor-Color Detector is: '''MSDT51'''
  
This module adopts TCS3414CS color chip and it can be connected through IIC interface. Based on 8×2 filtered photodiode and 16-bit analog-digital converter, you can measure light or light reflection on the surface of an object to acquire color value.  
+
Microduino-Color detector is a color detection sensor.
 +
 
 +
This module adopts TCS3414CS color chip. Based on 8×2 filtered photodiode and 16-bit analog-digital converter, you can measure light or light reflection on the surface of an object to acquire color value.  
 
   
 
   
  
  
 +
 +
==Introduction of Sensor Pins==
 +
{{ST_Pinout
 +
|st_name=Color Detector Sensor
 +
|pin3=IIC SDA
 +
|pin4=IIC SCL
 +
}}
  
 
==Features==
 
==Features==
*High accuracy and sensitivity;  
+
*With high accuracy and sensitivity;  
*Low-consumption, long product life and high-stability;   
+
*With low consumption, long service life and high stability;   
*Small and easy to install.  
+
*Small and easy to install.
  
 +
==Specification==
 +
*Sensor voltage
 +
**3.3V~5V working voltage
  
==Specification==
+
*Size of the sensor  
*Electrical specification
+
**Sensor of the board: 23.5mm*13mm
**Operation voltage: 3.3 ~6.0 V
+
**1.27mm-spacing 4Pin interface connected to sensorhub
**Input device
+
**The CAD drawing of the sensor: '''[[File:Sensor_CAD.zip]]'''
*Tech parameters
+
 
**ROHS authentication: YES
+
*Technical parameter
**Operation temperature: -40 ~ 85 °C
+
**Working temperature: -40 ~ 85 °C
*Size
 
**Size of the sensor: 5mm*5mm
 
**Size of the board: 20mm*20mm
 
**1.27mm-ptich 4Pin interface
 
*Connection method
 
**Interface: IIC
 
**Pin description: GND, VCC, signal 1 and signal 2. Since the output signal is IIC, you need IIC interface to receive signals, which can connect Sensorhub's IIC pin.
 
[[file:mCookie-sensorhub_rule.JPG|thumb|800px|center]]
 
[[File: Microduino-Temp&Hum_I2C.jpg|600px|thumb|center]]
 
  
 +
*Connection
 +
*This sensor can be connected to pin I2C of core.
  
 
==Document==
 
==Document==
*Schematic: '''[[File: Microduino_Color_detector.Zip]]'''
+
*Schematic diagram: '''[[File: Sensor-Color detector.Zip]]'''
 
+
*Main chip: '''[[File:TCS3414FN_datasheet.pdf ]]'''
  
 
==Development==
 
==Development==
===Preparation===
+
===Program Download===
*Make sure you build Microduino IDE or refer to: [[Microduino Getting started]]
 
*Core selection
 
**1. Adopt [[Microduino-CoreUSB]] or [[mCookie-CoreUSB]] as the core.
 
**2. Adopt [[Microduino-Core]] or [[Microduino-Core+]] as the core plus [[Microduino-USBTTL]] as the program download module.
 
 
 
===Program===
 
[[https://github.com/Microduino/Microduino_Tutorials/tree/df0a1175ef707a5c541c6cf37efa4b83dbeb6030/mCookie_sensor/MicroduinoColorSensor MicroduinoColorSensor]]
 
 
 
  
*Define variable values; RGB reading range.
+
*Download and unzip the program '''[[File:Sensor-Color Detector__Test.zip]]'''
  #define redMax 32767
 
  #define greenMax 32767
 
  #define blueMax 32767
 
  int redValue,greenValue,blueValue;
 
  
*readRGB();    Read RGB color function
+
===Programming===
 +
{{Upload
 +
|nameA=[[Microduino-Core]], [[Microduino-USBTTL]]
 +
|nameB=[[Microduino-USBTTL]]
 +
|boardName=Microduino/mCookie-Core(328p), Atmega328P@16M,5V
 +
|fileName=Sensor-Color Detector Test.ino
 +
}}
  
*Reflect RGB value (0~32767) to (0.225); 
+
===Hardware Setup===
  redValue=map(red, 0, redMax, 0, 255);
+
*Referring to the following diagram, connect the Sensor_Color_detector to IIC interface of '''[[Microduino-Sensorhub]]'''.
  greenValue=map(green, 0, greenMax, 0, 255);
+
<br>
  blueValue=map(blue, 0, blueMax, 0, 255);
+
[[file:Microduino-sensorhub_I2C.JPG|thumb|400px|left]]
 +
<br style="clear: left"/>
  
===Hardware Buildup===
+
===Result===
*Connect the sensor to the IIC interface of the Sensorhub with a wire.
+
*After download, open the serial monitor.  
[[Microduino-Sensorhub]]
+
*Putting the sensor toward different colors, the serial monitor will print out the current RGB value in cycle.
[[file:Microduino-sensorhub_I2C.PNG|thumb|400px|center]]
 
[[mCookie-Hub]]
 
[[file:mCookie-sensorhub_I2C.PNG|thumb|400px|center]]
 
* Connect the core, Sensorhub and the Color Detector to a computer with a USB cable.  
 
* Select the right board and COM port, compile and download.  You can refer to [[AVR Core:Getting started]]
 
[[file:upload.JPG|thumb|800px|center]]
 
*Download the program above.
 
*Select the right port from Tools→Serial Port in Arduino IDE and then download program.
 
*Open the serial monitor after download. The console will print current RGB value circularly.
 
  
 
==Application==
 
==Application==
Microduino-Color detector is suitable for environment color detection.  
+
Suitable for environment color detection and so on.  
  
  
 
===Project===
 
===Project===
 
* '''[[Chameleon]]'''
 
* '''[[Chameleon]]'''
 
  
 
==Purchase==
 
==Purchase==
Line 89: Line 79:
 
==History==
 
==History==
  
==Pictures==
+
==Gallery==
  
 
*Front  
 
*Front  
[[file: Microduino-Color-Detector -F.JPG|thumb|600px|center|Microduino-Temp&Hum Front]]
+
[[file: Microduino-Color-Detector1 -F.JPG|thumb|600px|center|Sensor-Temp&Hum Front]]
 
*Back  
 
*Back  
[[file: Microduino-Color-Detector -b.JPG|thumb|600px|center|Microduino-Temp&Hum Back]]
+
[[file: Microduino-Color-Detector1 -b.JPG|thumb|600px|center|Sensor-Temp&Hum Back]]
 
|}
 
|}

Latest revision as of 23:12, 30 March 2017

Language: English  • 中文
Microduino-ColorDetector

The product number of Sensor-Color Detector is: MSDT51

Microduino-Color detector is a color detection sensor.

This module adopts TCS3414CS color chip. Based on 8×2 filtered photodiode and 16-bit analog-digital converter, you can measure light or light reflection on the surface of an object to acquire color value.



Introduction of Sensor Pins

Sensor backpin.png

Color Detector Sensor
General Pin Out Sensor / Trinket's Pin Out
PIN1 (GND) GND
PIN2 (VCC) VCC
PIN3 (SIGNAL-A) IIC SDA
PIN4 (SIGNAL-B) IIC SCL
  • General Pin Out is the standard pin out of a Sensor / Trinket connector.
  • Sensor / Trinket's Pin Out is this specific Sensor / Trinket's wiring in relation to the General Pin Out.
  • SIGNAL-A / SIGNAL-B are signals that could be digital input, digital output, analog input or analog output. Or special signals such as serial communication (SoftwareSerial, IIC (I2C), etc) or other special signals.
  • Not Connected refers to the Pin not being used for this particular Sensor / Trinket.
  • Read more about the hub module.

Features

  • With high accuracy and sensitivity;
  • With low consumption, long service life and high stability;
  • Small and easy to install.

Specification

  • Sensor voltage
    • 3.3V~5V working voltage
  • Size of the sensor
    • Sensor of the board: 23.5mm*13mm
    • 1.27mm-spacing 4Pin interface connected to sensorhub
    • The CAD drawing of the sensor: File:Sensor CAD.zip
  • Technical parameter
    • Working temperature: -40 ~ 85 °C
  • Connection
  • This sensor can be connected to pin I2C of core.

Document

Development

Program Download

Programming

  • Follow the Software Getting Started Guide.
  • Select the Board, Processor and Port.
  • Click [File]->[Open], browse to the project program address, and click "Sensor-Color Detector Test.ino" to open the program.
  • After confirming all these items are correct, click "→" to download the program to the development board.

Hardware Setup

  • Referring to the following diagram, connect the Sensor_Color_detector to IIC interface of Microduino-Sensorhub.


Microduino-sensorhub I2C.JPG


Result

  • After download, open the serial monitor.
  • Putting the sensor toward different colors, the serial monitor will print out the current RGB value in cycle.

Application

Suitable for environment color detection and so on.


Project

Purchase

History

Gallery

  • Front
  • Back
Retrieved from "https://wiki.microduinoinc.com/index.php?title=Sensor-Color_Detector&oldid=12708"