LinkSprite LS-Y201-Infrared User manual

www.linksprite.com
1 / 9
LinkSprite JPEG Color Camera
Serial UART Interface With Infrared
November 2010

www.linksprite.com
2 / 9
1.Introduction
LS-Y201-Infrared is LinkSprite’s new generation serial port camera
module. It can captures high resolution pictures using the serial port. LS-
Y201-infrared is a modular design that outputs JPEG images through
UART, and can be easily integrated into existing design. The infrared
feature has a built-in sensor to sense the ambient light and will
automatically turn on the infrared LED.
2.Specification
a. VGA/QVGA/160*120 resolution
b. Support capture JPEG from serial port
c. Default baud rate of serial port is 38400
d. DC 3.3V or 5V power supply
e. Size 32mm X 32mm
f. Current consumption: 80-100mA, 200mA when infrared LED is on.
3.Application
a. Different image capture systems
b. Environmental monitoring
c. Industry monitoring
d. Medical equipment
e. Video phone
f. Security
g. Vehicle based GPS

www.linksprite.com
3 / 9
4. Interface definition
Default baud rate is 38400 bps.
Name
descriptions
RED RXD (IN)
Brown TXD( OUT)
Purple GND
Gray 5V DC

www.linksprite.com
4 / 9
4.Communication Protocol
1. Reset
Command (HEX) Return (HEX)
56 00 26 00 76 00 26 00
2. Take picture
Command (HEX) Return (HEX)
56 00 36 01 00 76 00 36 00 00
3. Read JPEG file size
Command (HEX) Return (HEX)
56 00 34 01 00 76 00 34 00 04 00 00 XH XL
XH XL is the file length of JPEG file, MSB is in the front, and followed
by LSB.
4. Read JPEG file content
JPEG file starts with FF D8 and ends with FF D9.
To read the JPEG file, always starts with address 00 00,and choose a
chunk size that are an integer times of 8, and read the chunk many
times until reds FF D9 which indicates the end of the JPEG file.
Command(HEX)
56 00 32 0C 00 0A 00 00 MH ML 00 00 KH KL XX XX
Return (HEX)
76 00 32 00 00
(
Interval time
)
FF D8
。。。
……
。。。(
Interval time
)
76 00 32 00 00
(
Interval time
)
= XX XX*0.01mS XX XX are recommended to be 00 0A
00 00 MH ML: Starting address
00 00 KH KL: Length of JPEG file
MSB first, and LSB last

www.linksprite.com
5 / 9
5. Stop taking pictures
Command (HEX) Return (HEX)
56 00 36 01 03 76 0 36 00 00
6. Compression Ratio
Command (HEX) Return (HEX)
56 0 31 05 01 01 12 04 XX 76 00 31 00 00 XX (XX normally is 36)
XX: 0X00 to 0XFF
7. Image size
Command (HEX) Return (HEX)
56 00 31 05 04 01 00 19 11
(
320*240
)
76 00 31 00 00
56 00 31 05 04 01 00 19 00 (640*480
)
76 00 31 00 00
56 00 31 05 04 01 00 19 22
(
160*120
)
76 00 31 00 00
After changing the image size, it is needed to reset or power cycle.
8. Power Saving
Entering Power Saving
Command (HEX)
Return (HEX)
56 00 3E 03 00 01 01 76 00 3E 00 00
Exiting Power Saving
Command (HEX)
Return (HEX)
56 00 3E 03 00 01 00 76 0 3E 00 00
9. Chang baud rate
Command (HEX) Return (HEX)
56 00 24 03 01 XX XX 76 00 24 00 00
XX XX Data Rate
AE C8 9600
56 E4 19200
2A F2 38400
1C 4C 57600
0D A6 115200

www.linksprite.com
6 / 9
Notes:
1. The starting read address must be integer times of 8.
2. When multiple cameras are used, XX of 56 XX 36 01 00 is the device
ID.
3. If the UART is RS232 level. If want to connected to MCU, please add a
level shifter or remove MAX232IC. RS232 level is used in the module
as the communication distance of raw UART cannot be longer than 1
meter.
4. When powered on, serial port will output the following message
actively:
Ctrl infr exist
User-defined sensor
625
Init end
The host only needs to determine when “Init end”
(
36 32 35 0D 0A
49 6E 69 74 20 65 6E 64 0D 0A
)
is received. After “Init end” is
received, the host can send the take picture command after waiting
for another 2-3 seconds.
5.Program flow chart
Initialization:

www.linksprite.com
7 / 9
Capture a JPEG picture:

www.linksprite.com
8 / 9

www.linksprite.com
9 / 9
LinkSprite Technologies, Inc.
Add
:
1067 S Hover St, Unit E-186,Longmont, CO 80501
Tel
:
720-204-8599
Email
:
sales linksprite.com
Technical questions: support linksprite.com
Web
:
www.linksprite.com
Table of contents