0% found this document useful (0 votes)
24 views25 pages

HUST PPT Template Color-Sensor

template

Uploaded by

vutran1022004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views25 pages

HUST PPT Template Color-Sensor

template

Uploaded by

vutran1022004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Sensors and signal processing

COLOR SENSORS TCS320


Lecturer: Tran Van Huong

Class : 152378

Student:

Nguyen Tien Khai – ID: 20226810

Dang Nhat Minh – ID: 20226813

Chu Anh Quan – ID: 20226869


1 : Introduction
TABLE
2 : Design
OF
CONTE 3 : Interpreting sensor data
NTS
4 : Circuit diagram

3
01
Introduction

4
COLOR
SENSORS
TCS320
•- A color sensor is an electronic
device used to detect and identify
colors.
•- It works by measuring the
wavelengths of light reflected from
an object, determining its color
based on the intensity of red,
green, and blue (RGB)
components.
•- Color sensors are widely used in
various applications, including
industrial automation, robotics,
and consumer electronics.
•- By converting the light
information into electrical signals,
these sensors allow machines to
"see" and differentiate colors with 5
Sensor Package and Pinouts of
Sensor

Name Pin I/O Description

GND 4 Power Supply Ground. All Voltages are referenced to this ground

VDD 5 Supply Voltage (2.7-5.5V)


/OE 3 I Enable fO (active low). When OE is high the OUT becomes high
impedance, allowing multiple sensors to share the same OUT line

OUT 6 O Output frequency fO


S0, S1 1, 2 I Output frequency scale selection inputs (see 0 0)
S2, S3 7, 8 I Photodiode (color filter) selection inputs (see 0 0)

6
Sensor Package and Pinouts of Sensor

 Light go through photodiode array and convert to current


 Then it go to current-to-frequency coveter that make processor can
read the digital out put
 The output enable(/OE) for multiple-unit sharing
 The sensitive of sensor can be preset or off by 2 input pin: S0 and S1
 Four types of photodiodes- Red, green, blue and clear(no filters) are
the color detected

7
Photodiodes

• The TCS3200 has an array of photodiodes with 4 different filters. A photodiode is


simply a semiconductor device that converts light into current.
• The sensor has:
- 16 photodiodes with red filter – sensitive to red wavelength
- 16 photodiodes with green filter – sensitive to green wavelength
- 16 photodiodes with blue filter – sensitive to blue wavelength 16 photodiodes
without filter

8
Photodiodes

1.Definition of Photodiodes
- Photodiode is a form of light sensor that
converts light energy into electrical
energy (voltage or current). Photodiode
is a type of semi conducting device with
PN junction. Between the p (positive)
and n (negative) layers, an intrinsic layer
is present.
- The photo diode accepts light energy as
input to generate electric current
- Typical photodiode materials are Silicon,
Germanium, Indium Gallium Arsenide
Phosphide and Indium gallium arsenide.

9
Photodiodes

2. Working
• In general, an electron will
have a negative charge,
and holes will have a
positive charge. The
depletion of energy will
have built-in electric field.
• Due to that electric field,
electron-hole pairs move
away from the junction.
Hence, holes move to
anode and electrons move
to the cathode to produce
photocurrent.

10
Application

Color sensor technology has a wide range of applications across various industries,
including :
- Industrial Automation: Color sensors are used in manufacturing processes for quality
control, product sorting, and color-based object detection.
- Scientific Research: Color sensors are used in spectroscopy, colorimetry, and other
scientific applications for precise color measurement and analysis.

11
02
Design

12
Design

TCS 3200 sensor colors

Lcd 1602A And I2C Lcd

Arduino Uno R3

13
LCD
• An LCD 16x2 with Arduino
refers to using a Liquid
Crystal Display (LCD) in
conjunction with an Arduino
microcontroller to display
information such as text,
numbers, or even simple
• graphics.
RS (Register Select): Controls
command or data mode.
• E (Enable): Tells the LCD when
data is being sent.
• D4-D7: Four data pins (used in
4-bit mode).
• VSS: Ground.
• VDD: Power (typically 5V from
the Arduino).
• RW (Read/Write): Usually tied
to ground (write mode).
• V0: Contrast adjustment pin
(connected to a potentiometer).
• A (Anode) & K (Cathode): LED
backlight pins for illuminatio

14
I2C LCD

1.Definition
An I2C LCD (Liquid Crystal Display)
refers to an LCD module that
communicates with a microcontroller
or a computer using the I2C (Inter-
Integrated Circuit) communication
protocol.

2. Pinout
LCD I2C uses I2C interfacce, so it
has 4 pin
 GND pin: needs to be connected
to GND
 VCC pin: the power supply for
the LCD, needs to be connected
to VCC (5V)
 SDA pin: I2C data signal
 SCL pin: I2C clock signal

15
I2C LCD

3. Advantanges for using


I2C

- Pin Efficiency: Only requires two


pins (SDA, SCL) instead of 6 or
more for standard LCDs.
- Simplified Wiring: Reduces the
complexity of wiring in projects.
- Multiple Devices: Multiple I2C
devices (sensors, displays, etc.)
can be connected on the same bus,
saving space on microcontroller
boards.

16
Arduino

17
Arduino

Information of adrunio UNO R3:


· Microcontroller: ATmega328P, an 8-bit microcontroller from Atmel with
32KB of flash memory for storing code.
· Operating Voltage: 5V, which powers the board and its components.
· Input Voltage (recommended): 7-12V, when using an external power
supply.
· Digital I/O Pins: 14 pins (0-13), out of which 6 can be used as PWM (Pulse
Width Modulation) outputs.
· Analog Input Pins: 6 pins (A0-A5) for reading analog signals from sensors.
· Clock Speed: 16 MHz, which defines the speed at which the
microcontroller executes instructions.
· Flash Memory: 32KB, with 0.5KB used for the bootloader.
· SRAM: 2KB for storing variables during program execution.
· EEPROM: 1KB for storing data that persists even after the board is
powered off.
· USB Connection: A USB-B port allows for programming the board and
providing power.
· Power Jack: A barrel jack for powering the board with an external power
supply.
· Reset Button: Allows the board to be reset manually. 18
Arduino

Application

• Prototyping and Development:


Arduino is often used to prototype
and test electronic projects before
moving to more complex
hardware

• Robotics: It can control motors,


sensors, and other components,
making it suitable for building
robots, drones, and automated
vehicles.

19
03
Interpreting
Sensor Data

20
Interpreting Sensor Data

The output is a square wave (50% duty cycle) with frequency (fO) directly
proportional to light intensity
where
- fO is the output frequency;
- fD is the output frequency for dark condition (when Ee = 0);
- Re is the device responsivity for a given wavelength of light in
kHz/(mW/cm2);
- Ee is the incident irradiance in mW/cm2.
- fD is an output frequency resulting from leakage currents.
As shown in the equation above, this frequency represents a light-
independent term in the total output frequency fO.
At very low light levels (dark colors), this dark frequency can be a
significant portion of fO. The dark frequency is also temperature
dependent.

21
Interpreting Sensor Data
As fO is directly proportional to frequency, it is possible to map between the
frequency and RGB color value (0-255 for each of R, G and B) using linear
interpolation.
Two points on the RGB line are well determined – pure Black (RGB 0, 0, 0)
and pure White (255, 255, 255).
The proportional relationship is expressed by the standard straight line
equation y = mx + b where
•y is the reading obtained (in our case fO)
•x is the normalized RGB value
•b is the value of y when x is 0 (in our case fD)
•m is the slope, or proportionality constant, of the line
(in our case [fW - fD]/255).
The resulting equation is
or, rearranging to give us the desired RGB value

22
04
Circuit
diagram

23
Circuit diagram

24
THANK
YOU !

25

You might also like