Difference between revisions of "Sensor-Color Detector"

From Microduino Wiki
Jump to: navigation, search
(Created page with "{{Language|Microduino-Color detector}} {| style="width: 800px;" |- | 400px|thumb|right| Microduino-ColorDetector Microduino-Color dete...")
 
Line 29: Line 29:
 
**Size of the board: 20mm*20mm
 
**Size of the board: 20mm*20mm
 
**1.27mm-ptich 4Pin interface
 
**1.27mm-ptich 4Pin interface
 
 
*Connection method  
 
*Connection method  
 
**Interface: IIC
 
**Interface: IIC

Revision as of 02:04, 6 November 2015

Language: English  • 中文
Microduino-ColorDetector

Microduino-Color detector is a color detection senor.

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.



Features

  • High accuracy and sensitivity;
  • Low-consumption, long product life and high-stability;
  • Small and easy to install.


Specification

  • Electrical specification
    • Operation voltage: 3.3 ~6.0 V
    • Input device
  • Tech parameters
    • ROHS authentication: YES
    • Operation 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.
MCookie-sensorhub rule.JPG


Document


Development

Preparation

Program

[MicroduinoColorSensor]


  • Define variable values; RGB reading range.
  #define redMax 32767
  #define greenMax 32767
  #define blueMax 32767
  int redValue,greenValue,blueValue;
  • readRGB(); Read RGB color function
  • Reflect RGB value (0~32767) to (0.225);
 redValue=map(red, 0, redMax, 0, 255);
 greenValue=map(green, 0, greenMax, 0, 255);
 blueValue=map(blue, 0, blueMax, 0, 255);

Hardware Buildup

  • Connect the sensor to the IIC interface of the Sensorhub with a wire.

Microduino-Sensorhub

Microduino-sensorhub I2C.PNG

mCookie-Hub

MCookie-sensorhub I2C.PNG
  • 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
Upload.JPG
  • 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

Microduino-Color detector is suitable for environment color detection.


Project


Purchase

History

Pictures

  • Front
Microduino-Temp&Hum Front
  • Back
Microduino-Temp&Hum Back