Spinel SC50MPB User manual

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
0
5 Mega Pixels Serial JPEG Camera
SC50MPB User Manual, Rev. A (May, 2023)
For latest user manual, please visit: www.spinelelectronics.com
Ta b l e o f C o n t e n t s
Command Protocol (HEX format) ........................................................................................................ 2
1. GET VERSION ..................................................................................................................................................... 3
2. RESET ................................................................................................................................................................. 3
3. CAPTURE AN IMAGE ........................................................................................................................................... 3
4. READ IMAGE DATA LENGTH ................................................................................................................................ 3
5. READ IMAGE DATA ............................................................................................................................................. 3
6. STOP CAPTURE ................................................................................................................................................... 4
7. SET IMAGE COMPRESSION RATIO ....................................................................................................................... 4
8. SET IMAGE RESOLUTION .................................................................................................................................... 4
11. LED CONTROL ................................................................................................................................................... 6
12. OSD CONTROL .................................................................................................................................................. 6
13. SMART DETECTION: ......................................................................................................................................... 9
14. SET MOTION/FACIAL/VEHILE DETECTION: ...................................................................................................... 11
15. DETECTION ALERT REPORT: ............................................................................................................................ 11
16. SET MOTION DETECTION SENSITIVITY: ............................................................................................................ 11
17. MOTION DETECTION CONTINOUS CAPTURE: .................................................................................................. 11
18. MULTI IMAGES CONTINOUS CAPTURE: ........................................................................................................... 12
19. AUTO-SNAP AT STARTUP/REBOOT .................................................................................................................. 12
20. SET AREA CROPPING COMMAND ................................................................................................................... 13
21. SET COLOR OR B/W SWITCHING ..................................................................................................................... 14
22. CHECK THE BRIGHTNESS ON PHOTOSENSOR ................................................................................................... 15
23. SET POWER SAVE: .......................................................................................................................................... 15
24. CHECK DEFAULT PARAMETERS: ....................................................................................................................... 15
25. ISP IMAGE SETTING/READ/RESET ................................................................................................................... 15
26. GET CAMERA ID: ............................................................................................................................................ 17
27. ABNORMAL RETURN ...................................................................................................................................... 17

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
1
28. INITIAL OPERATION PROCESS: ........................................................................................................................ 17
29. CONTINUOUS CAPTURING IN MOTION DETECTION PROCESS: ........................................................................ 17
30. SMART DETECTION OPERATION PROCESS: ...................................................................................................... 18
31. TEST THE CAMERA WITH A PC ........................................................................................................................ 19
32. HOW TO ORDER: ............................................................................................................................................ 20
Introduction
The SC50MPb serial camera is a 5 MP serial JPEG color camera module that performs as a JPEG
compressed still camera and can be attached to a wireless or PDA host. Users can send out a
snapshot command from the host in order to capture a full resolution single-frame still image. The
image is then compressed by the DSP and transferred to the host.
It can snap pictures at 2560*1920(default); 2560*1440; 2304*1296; 1920*1080; 1600*1200;
1280*960; 1280*720; 1024*768; 640*480 and they're pre-compressed JPEG images which makes
them nice and small and easy to store or transfer. Perfect for a data-logging, security, or
photography project. Startup time is 3.5 seconds.
Features
• Module dimension: 32(W) x 32(L) x 25(H)mm (the height may vary for different lens options)
• Image size: 2560*1920(default); 2560*1440; 2304*1296; 1920*1080; 1600*1200;
1280*960; 1280*720; 1024*768; 640*480
• Wide voltage and low power: Typical: 160mA@5V, Max: 400mA (when LED's are on)
• [email protected], 100mA@9V, 80mA@12V, 70mA@15V, 60mA@18V
• UART/TTL interface support up to 921600 bps, RS232 interface up to 230400bps (default
115200bps)
• WDR: 85DB
• Built-in JPEG CODEC
• Built-in lens, default 3.6mm lens, multi options
• VC0706 protocol compatible
Pin Definition
Pin
Description
TX
Data Transmit (RS232/TTL level)
RX
Data Receive (RS232/TTL level)
GND
Power Ground
VCC
Power 5V DC

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
2
Electrical Specification:
Parameter
Min
Typical
Max
Unit
DC supply voltage
4.2
5.0
18
V
Operation Current
185
160
60
mA
Operating temperature range
-30
20
75
℃
DSP and Lens Specification:
Description
Parameter
DSP
Hi3518
Image Sensor
SC5238
Imager Format
1/2.8"
F/#
2.0
Focal Length
3.6mm default (optional: 2.1, 2.4, 2.8, 6, 8, 12,16, 25mm and fisheye lens)
Field of View Diagonal
90 degree and other
Mechanical Specification (unit in mm):
Command Protocol (HEX format)
Once camera is powered up, it takes around 3.5 seconds to be ready for any commands, when
camera is initialized after the 3.5S delay, the camera outputs the following data, which means the
camera is ready for capturing images:
Version:PTC5M0 1.00
MEID_Num:00
ImageWidth:2560,ImageHeight:1920

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
3
Qp:0x54,WDT:1,Alg:0
Init end
1. GET VERSION:56 00 11 00
RETURN:76 00 11 00 0B 50 54 43 32 4D 30 20 31 2E 30 30
0B is the version data length 11.
50 54 43 32 4D 30 20 31 2E 30 30converts to character strings “PTC3M0 1.00”
Once the version is read, the camera is ready for communications. Version number might be different
due to regular upgrades.
2. RESET:56 00 26 00
RETURN:76 00 26 00
3. CAPTURE AN IMAGE:56 00 36 01 00
RETURN:76 00 36 00 00
Notes: when getting unclear images right after power-up, resetting or exiting power save mode,
please wait for 4s till the camera is ready for stable images.
4. READ IMAGE DATA LENGTH:56 00 34 01 II
RETURN:76 00 34 00 04 XX XX XX XX
II ----- 1 byte represents reading different image buffer, value ranges from 0 to 5, “0” represents the
current single image buffer, “1-5” represents continuous images triggered by motion detection or
capturing multi images command.
XX XX XX XX ----- image length
For example, send: 56 00 34 01 00 return: 76 00 34 00 04 00 01 4B C6
0x00014BC6 / 1024 means image data length is around 82.9K.
5. READ IMAGE DATA:56 00 32 0C II 0A SS SS SS SS LL LL LL LL 00 FF
RETURN:76 00 32 00 00 FF D8 。。。。。。 FF D9 76 00 32 00 00
II ---- 1 byte read different image buffer, value ranges from 0 to 5, “0” represents the current single
image buffer, “1-5” represents continuous images triggered by motion detection or capturing multi

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
4
images command.
SS SS SS SS ---- start address(the address must be times of 8,for example 00 00)
LL LL LL LL ---- the length of image data(high byte,low byte)
Notes: JPEG IMAGE DATA must start with FF D8 and end with FF D9.
If read all the image data at once, the start address shall be: “00 00 00 00”, the length to read is the
same as what data length item 3 above has read; the data read starts with “FF D8”, and ends with
“FF D9”.
If read the image data in multi attempts, the first start address shall be: “00 00 00 00”, each time after
the start address shall be the last frame’s end address.
Example:
Send: 56 00 32 0C 00 0A 00 00 00 00 00 01 4B C6 00 FF
Return: 76 00 32 00 00 FF D8 ... FF D9 76 00 32 00 00
56 00 32 0C 00 0A 00 00 00 00 00 01 4B C6 00 FF
It means read the image data from the address 0x00000000 with data length 0x00014BC6.
6. STOP CAPTURE:56 00 36 01 03
RETURN:76 00 36 00 00
7. SET IMAGE COMPRESSION RATIO:56 00 31 05 01 01 12 04 XX
RETURN:76 00 31 00 00
XX is default at value of 54, valid value ranges from 0x36 to 0x8f, the greater value the poorer image
quality and less image file size. Recommended values: 0x36 --- high image quality; 0x54 ---- good
image quality; 0x72 ---- low image quality. The changed value can get saved after power-off.
8. SET IMAGE RESOLUTION: (default: 1920 * 1080)
56 00 31 05 04 01 00 19 22 (160*120) RETURN:76 00 31 00 00 // image size is around 5kb
56 00 31 05 04 01 00 19 11 (320*240) RETURN:76 00 31 00 00 // image size is around 13kb
56 00 31 05 04 01 00 19 00 (640*480) RETURN:76 00 31 00 00 // image size is around 37kb
56 00 31 05 05 01 00 19 33 (1024*768)RETURN:76 00 31 00 00 // image size is around 82kb

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
5
56 00 31 05 05 01 00 19 44 (1280*720) RETURN:76 00 31 00 00 // image size is around
105kb
56 00 31 05 05 01 00 19 55 (1280*960) RETURN:76 00 31 00 00 // image size is around
127kb
56 00 31 05 05 01 00 19 77 (1600*1200)RETURN:76 00 31 00 00 // image size is around
176kb
56 00 31 05 05 01 00 19 66 (1920*1080)RETURN:76 00 31 00 00 // image size is around
192kb
56 00 31 05 05 01 00 19 88 (2304*1296)RETURN:76 00 31 00 00 // image size is around
256kb
56 00 31 05 05 01 00 19 99 (2560*1440)RETURN:76 00 31 00 00 // image size is around
297kb
56 00 31 05 05 01 00 19 AA (2560*1920)RETURN:76 00 31 00 00 // image size is around
339kb
Note: after setting the desired image size, wait for 3 seconds and then the new setting would be
saved in flash. The actual file size is subject to the field complexity and depth of field.
9. CHANGE DEFAULT BAUD RATE: 56 00 31 06 04 02 00 08 XX YY
RETURN:76 00 31 00 00
XX YY ----- BAUD RATE
56 00 31 06 04 02 00 08 AE C8 AE C8 9600
56 00 31 06 04 02 00 08 AE C8 56 E4 19200
56 00 31 06 04 02 00 08 AE C8 2A F2 38400
56 00 31 06 04 02 00 08 AE C8 1C 4C 57600
56 00 31 06 04 02 00 08 AE C8 0D A6 115200 (default & Max for RS485)
56 00 31 06 05 02 00 08 EE A1 EE A1 230400 (Max for RS232)
56 00 31 06 05 02 00 08 EE A1 EE A2 460800 (for TTL only)
56 00 31 06 05 02 00 08 EE A1 EE A3 921600 (for TTL only and Max)
Note: After any change, it’s not required to reset the camera, the new change will be valid and saved

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
6
in flash after power-off.
Warning: Please do not try to issue the commands on RS485 interfaced cameras for baud rates
over 115200bps, it will damage the camera immediately and the camera needs to be returned
to Spinel for repair at client’s cost.
10. CHANGE CAMERA ID ADDRESS: 56 YY 31 05 04 01 00 06 ZZ
RETURN:76 YY 31 00 00
YY ---- the current ID.
ZZ ---- the new ID you want to change to, range from 00 to FF.
For example, the current ID is 00 (also the default ID), in order to change it to 02, the host can issue
the command: 56 00 31 05 04 01 00 06 02
Return: 56 00 31 00 00
// once the ID has been successfully changed, the 2nd byte of each command therefore shall be 02.
// the reset command would be: 56 02 26 00
11. LED CONTROL (supported only when the LED’s is equipped on board):
11.1 Turn LED on:56 00 85 01 01 Return: 76 00 85 00
11.2 Turn LED off:56 00 85 01 00 Return: 76 00 85 00
12. OSD CONTROL: 56 00 86 B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC DD DD...DD
RETURN: 76 00 86 01 ZZ
The last byte represents the number of OSD rows, total can be 4 rows, value ranges from 0-3,
represents which row.
Command description:
56 //1 byte frame header
00 //1byte camera ID (0-255), default is 0
86 //1byte OSD command
B0 //1byte the length of command, it changes based on the characters content, fixed 12 bytes + total
length of the characters content
B1 //1byte OSD status, 1: enabled; 2: disabled
B2 //1byte row number(0-3), max allowed to display is 4 rows
B3 //1byte font size 0: 16x16; font size 1: 24x24; font size 2:32x32
B4 B5 //2bytes X axis, 0-1279 (Decimal) for SC13MPA, 0-1918 (Decimal) for SC20MPB, it needs to
be even numbers
B6 B7 //2bytes Y axis, 0-959 (Decimal) for SC13MPA, 0-1078 (Decimal) for SC20MPB, it needs to be
even numbers
B8 B9 //2 bytes font color, follow RGB555 code

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
7
BA BB //2bytes background color, follow RGB555 code
BC //1byte length of content, max allowed 160 characters
DD…DD //N bytes, character content, please use ASCII table.
Example:
Send: 56 00 86 16 01 00 01 00 00 00 00 00 7C FF FF 0A 30 31 32 33 34 35 36 37 38 39
Return: 76 00 86 01 00
Command description:
Send command:
0x56 // frame header
0x00 // camera ID
0x86 // OSD command
0x16// length of command, it changes based on the characters content, fixed 12 bytes + total length
of the characters content
0x01 //OSD status, 1: enabled; 2: disabled
0x00 //the first row
0x00 // font size 16x16
0x00, 0x00 // X axis, 0-1279 (Decimal) for SC13MPA, 0-1918 (Decimal) for SC20MPB, it needs to be
even numbers
0x00, 0x00 // Y axis, 0-959 (Decimal) for SC13MPA, 0-1078 (Decimal) for SC20MPB, it needs to be
even numbers
0x00, 0x7C // font color blue
0xff, 0xff //background color white
0x0A //length of content
0x30, 0x31, 0x32,0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39 // character content ASCII “0123456789”
Return:
0x76 // fixed return frame header
0x00 // camera ID
0x86 // command
0x01 // fixed data length 1
0x00 // setting number of rows
Common ASCII Table:
Character
ASCII Value
Character
ASCII Value
Decimal
Binary
HEX
Decimal
Binary
HEX
NUL
Line Feed
Space
!
”
0
10
32
33
34
0000000
0001010
0100000
0100001
0100010
00
A
20
21
22
M
N
O
P
Q
77
78
79
80
81
1001101
1001110
1001111
1010000
1010001
4D
4E
4F
50
51

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
8
#
$
%
&
`
(
)
*
+
,
-()
.
/
0
1
2
3
4
5
6
7
8
9
:
;
<
=
>
?
@
A
B
C
D
E
F
G
H
I
J
K
L
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
0100011
0100100
0100101
0100110
0100111
0101000
0101001
0101010
0101011
0101100
0101101
0101110
0101111
0110000
0110001
0110010
0110011
0110100
0110101
0110110
0110111
0111000
0111001
0111010
0111011
0111100
0111101
0111110
0111111
1000000
1000001
1000010
1000011
1000100
1000101
1000110
1000111
1001000
1001001
1001010
1001011
1001100
23
24
25
26
27
28
29
2A
2B
2C
2D
2E
2F
30
31
32
33
34
35
36
37
38
39
3A
3B
3C
3D
3E
3F
40
41
42
43
44
45
46
47
48
49
4A
4B
4C
R
S
T
U
V
W
X
Y
Z
[
\
]
^
-
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
{
}
82
83
84
85
86
87
88
89
90
91
92
93
94
95
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
125
1010010
1010011
1010100
1010101
1010110
1010111
1011000
1011001
1011010
1011011
1011100
1011101
1011110
1011111
1100001
1100010
1100011
1100100
1100101
1100110
1100111
1101000
1101001
1101010
1101011
1101100
1101101
1101110
1101111
1110000
1110001
1110010
1110011
1110100
1110101
1110110
1110111
1111000
1111001
1111010
1111011
1111101
52
53
54
55
56
57
58
59
5A
5B
5C
5D
5E
5F
61
62
63
64
65
66
67
68
69
6A
6B
6C
6D
6E
6F
70
71
72
73
74
75
76
77
78
79
7A
7B
7D
Character
ASCII Value
Character
ASCII Value

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
9
Decimal
Binary
HEX
Decimal
Binary
HEX
13. SMART DETECTION:
13.1 Set smart detection: 56 00 91 0C 02 B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 B10
Return: 76 00 91 02 02 ZZ
B0 ----1 byte enable the detection at startup: 00—disabled(default), 01-enable,
Once enabled, the camera will start the detection automatically at startup.
B1 ----1 byte detection type: 00—motion detection(default), 01—facial detection,
02—vehicle detection
B2 ----1 byte detection sensitivity: range (0-4), 4 is most sensitive, default is 3
B3 ----1 byte detection mode:00—detection only(default), 01—detection + snap
B4 ----1 byte detection alert value: valid only in facial/vehicle detection mode, trigger alert when detect
the number of people (range 1-19)/vehicle (range 1-5)
B5 ---1byte detect distance: valid only in facial/vehicle detection mode,0x02 means 10Meters(default)
B6 ----1 byte target area: 00—turn on, 01—turn off, valid only in facial/vehicle detection mode
B7 ----1byte number of images captured after detection trigger: the detection mode needs to be set
0x01, range (0x01-0x05)
B8 B9 ---2 bytes snap intervals: valid in detection mode=0x01 only, unit in ms
B10 ----1byte next detection time: delay for snapping, valid in detection mode=0x01 only, unit is
second, range (0x01-0xff decimal 1-255)
ZZ ---- 1byte setting results:
0x00 setting success
0x01 wrong setting, please double check the values
0x02 setting not supported
Example:
Send: 56 00 91 0C 02 00 00 03 00 01 02 01 01 00 64 0A
Return: 76 00 91 02 02 00
Command description:
0x56 // fixed frame header
0x00 // ID
0x91 //configuration command
0x0C //Data length
0x02 //subcommand: set smart detection command
0x00 //startup detection: 00-Disable (default),01-Enable
0x00 //Detection mode: 00-motion detection (default),01-facial detection,02-vehicle detection
0x03//Detection sensitivity: range(0x00~0x04), 4 is most sensitive, default is 3
0x00 //Detection mode: 00 – detection only (default) , 01 – detection + snap
0x01 //Detection alert value: valid only in facial/vehicle detection mode, trigger alert when detect the
number of people (range 1-19)/vehicle (range 1-5)
0x02 //Detection distance: reserved, valid only in facial/vehicle detection mode,0x02 means
10Meters(default)

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
10
0x01 //Target area: 00 – turn off, 01 – turn on (default)
0x01 // number of images captured after detection trigger: the detection mode needs to be set 0x01,
range (0x01-0x05)
0x00,0x64 // snap intervals: valid in detection mode=0x01 only, unit in ms
0x0A //Next detection time.
13.2 READ SMART DETECTION: 76 00 91 02 02 ZZ
RETURN: 56 00 91 0C 02 B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 B10
B0…B10 ---- please refer to 14.1 set smart detection for detailed descriptions
Example:
Send: 56 00 90 01 02
Return: 76 00 90 0C 02 00 00 03 00 01 02 01 01 00 64 0A
Send command description:
56 // fixed frame header
00 //ID
90 //configuration command
01 //data length
02 //sub-command: detection parameters
Return description:
0x56 //fixed frame header
0x00 //ID
0x91 //configuration command
0x0C //Data length
0x02 //subcommand: set smart detection command
0x00 //startup detection: 00-Disable (default),01-Enable
0x00 //Detection mode: 00-motion detection (default),01-facial detection,02-vehicle detection
0x03//Detection sensitivity: range(0x00~0x04), 4 is most sensitive, default is 3
0x00 //Detection mode: 00 – detection only (default), 01 – detection + snap
0x01 //Detection alert value: valid only in facial/vehicle detection mode, trigger alert when detect the
number of people (range 1-19)/vehicle (range 1-5)
0x02 //Detection distance: reserved, valid only in facial/vehicle detection mode,0x02 means
10Meters(default)
0x01 //Target area: 00 – turn off, 01 – turn on (default)
0x01 // number of images captured after detection trigger: the detection mode needs to be set 0x01,
range (0x01-0x05)
0x00,0x64 // snap intervals: valid in detection mode=0x01 only, unit in ms
0x0A //Next detection time.
Notes: all the settings get saved after powered off.

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
11
14. SET MOTION/FACIAL/VEHILE DETECTION: 56 00 37 01 XX
RETURN: 76 00 37 00 00
XX –-- 00 means disable detection; 01 means enable detection.
15. DETECTION ALERT REPORT: 76 00 39 00 U1
U1 ----1byte when the mode is detection only, it’s 0x00, when the mode is detection + snap, it will be
the number of image snapped, max 5 images, range (0x01-0x05).
When the camera detects facial/vehicles, report: 76 00 39 00 U1 U2 U3
U1 ----1byte, detection type, 0x01-facial detection, 0x02—vehicle detection
U2 ----1byte detection mode, 0x00 – detection only, 0x01 – detection + snap
U3 ----1byte detection target, when detection type=0x00, it means the number of facial/vehicles
detected, when detection type=0x01, it means the number of image snapped, max 5 images, range
(0x01-0x05).
16. SET MOTION DETECTION SENSITIVITY: 56 00 31 05 01 01 1A 6E XX
RETURN: 76 00 31 00 00
XX ---- the sensitivity of motion detection, ranges from 00 to FF.
If XX is 00, most sensitive, might alert wrong detection.
If XX is FF, least sensitive, might not be able to alert.
XX = 03 is recommended.
Therefore, the recommended procedures to use motion detection in the field would be:
Step 1: set right motion detection sensitivity by issuing command: 56 00 31 05 01 01 1A 6E 03
Step 2: enable motion detection by issuing command: 56 00 37 01 01
17. MOTION DETECTION CONTINOUS CAPTURE: 56 00 87 04 B0 B1 B2 B3
RETURN: 76 00 87 01 ZZ
B1 ---- 1byte, number of images captured, range 0-5
B2 ---- 1byte, next detection time, unit is second, range 0-255
B2 B3 ---- 2byte, continuous capturing intervals, unit is ms, range 0-65535
ZZ ---- 1byte setting validity, 0x00 – valid, 0x01 –invalid
Example:
Send: 56 00 87 04 03 0A 00 64
Return: 76 00 87 01 00
Send command description:
0x56 //fixed frame header
0x00 //ID
0x87 //motion detection continuous capture command
0x04 //data length fixed at 4bytes
0x03 //3 continuous captured images, range 0-5
0x0A //next detection time is in 10 seconds
0x00 0x64 // 2bytes means the intervals for continuous capturing is 100ms

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
12
Return description:
0x76 // fixed frame header
0x00 //ID
0x87 //command
0x01 //fixed data length 1byte
0x00 //setting succeed
Notes:
1. It’s only valid when the motion detection is enabled.
2. If only issue the command to enable the motion detection, the camera will report alert when
detects motion: 76 00 39 00 00, but no image buffer, the host needs to issue image capture
command. Once the motion detection continuous capturing is set, the camera will capture
images automatically and save them in the buffer once detects motion, and report: 76 00 39
00 +the number of the images captured (for instance 76 00 39 00 05 means the camera auto
captured 5 continuous images after motion is detected)
3. Issuing the read image data length and read image dada can get the 1-5 buffered images out.
4. If the buffered images are not transferred out, once next motion is detected, the old images will
be overlayed by the new images.
18. MULTI IMAGES CONTINOUS CAPTURE: 56 00 88 03 B0 B1 B2
RETURN: 76 00 88 01 ZZ
B0 ---- 1byte number of images captured, range 0-5
B1 B2 ---- 2bytes the intervals between each image captures, unit in ms, range: 0x0000~0xFFFF
ZZ ----- 1byte the validation on the setting, 0x00--valid, 0x01—invalid.
Example:
Send: 56 00 88 03 03 00 64
Return: 76 00 88 01 00
Notes:
1. Multi images continuous capture command (Cmd=0x88) and motion detection continuous
capture command (cmd=0x87) share the same 1-5th images buffer, they can not be issued at
the same time.
2. The delay for the command (cmd=0x88) to return is subject to the intervals for each image, the
interval is not recommended to be too long, as the camera can not respond to any other new
command till it responds to the cmd=0x88.
19. AUTO-SNAP AT STARTUP/REBOOT (SUB-COMMAND:0x01): 56 00 91 04 01 B0 B1 B2
RETURN: 76 00 91 01 ZZ
B0 ---- 1byte, number of images snapped, range from 0 to 5, 0x00 – disable the auto-snap
B1 B2 ----2bytes intervals for each image captured, unit in ms, range 0~65535ms
ZZ ---- 1byte the validation on the setting, 0x00--valid, 0x01—invalid.

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
13
Example:
Send: 56 00 91 04 01 03 00 64
Return: 76 00 91 01 00
Once the auto-snapping is complete, the camera outputs: 76 00 92 02 01 B0
B0 ---- 1byte the number of images captured, range 1-5, 0xEE – error
Please issue 1-5th image buffer to read the image length and data, for instance, to read the 1st image
length please issue” 56 00 34 01 01”, and to read 1st image data please issue “56 00 32 0C 01 0A +
4 bytes start address + 4bytes the image data length 00 FF
Example:
The camera outputs: 76 00 92 02 01 03
Description:
0x76 //fixed return header
0x00 //ID
0x92 //configuration command at startup
0x02 //fixed data length 2
0x01 //auto snap command at startup
0x03 //complete 3 image snapping
Check the snap command at startup: 56 00 90 01 01
Return: 76 00 90 04 01 B0 B1 B2
B0 ---- 1byte the number of the images captured, range 0-5
B1 B2 ---- 2bytes intervals for each continuous snapping, unit in ms, range 0~65535 (00 ~ 0xFF 0XFF)
Example:
Send: 56 00 90 01 01
Return: 76 00 90 04 01 03 00 64
20. SET AREA CROPPING COMMAND
20.1 SET CROPPING AREA: 56 00 8B 0A 01 B0 B1 B2 B3 B4 B5 B6 B7 B8
RETURN: 76 00 8B 02 01 ZZ
B0 ---- cropping status: 0x01—enabled, 0x00 – disabled
B1 B2 ---- cropping start X axis, must be multiple of 16
B3 B4 ---- cropping start Y axis, must be multiple of 2
B5 B6 ---- cropping width, must be multiple of 4, and can not exceed horizontal pixels
B7 B8 ---- cropping height, must be multiple of 4, and can not exceed vertical pixels
ZZ ---- results: 0x00 setting succeed
0x01 X axis error, must be multiple of 16
0x02 Y axis error, must be multiple of 2

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
14
0x03 cropping width error, must be multiple of 4, and can not exceed horizontal pixels
0x04 cropping height error, must be multiple of 4, and can not exceed horizontal pixels
0x05 exceed resolution error, X + width/Y + height exceed the H/V pixels
0x06 other error
Example:
Send: 56 00 8B 0A 01 01 00 A0 00 78 01 40 00 F0
Return: 76 00 8B 02 01 00
Send command description:
0x56 //fixed frame header
0x00 //ID
0x8B //area cropping command
0x0A //data length 10bytes
0x01 //sub-command: set cropping area
0x01 //cropping status: enabled
0x00 0xA0 // X axis 160 (Decimal)
0x00 0x78 //Y axis 120 (Decimal)
0x01 0x40 //cropping width 320 pixels
0x00 0xF0 //cropping height 240 pixels
Return description:
0x76 //fixed return header
0x00 //ID
0x8B //cropping command
0x02 // data length 2bytes
0x01 //sub-command: set cropping area
0x00 //results, setting succeed
21.2 READ CROPPING AREA PARAMETERS: 56 00 8B 01 02
RETURN: 76 00 8B 0E 02 B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12
B0 ---- cropping status
B1 B2 --- cropping start X axis
B3 B4 ---- cropping start Y axis
B5 B6 ---- cropping width
B7 B8 ---- cropping height
B9 B10 ---- cropped image horizontal pixels
B11 B12 ---- cropped image vertical pixels
Example:
Send: 56 00 8B 01 02
Return: 76 00 8B 0E 02 01 00 A0 00 78 01 40 00 F0 02 80 01 E0
21. SET COLOR OR B/W SWITCHING: 56 00 8C 01 B1

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
15
RETURN: 76 00 8C 01 00
B1 ---- 1byte the image color switched 00 – color, 01 – B/W
Warning: must be set prior to image capturing, can’t be saved after power-off, it also switch the IR-
cut filter when switching the color.
22. CHECK THE BRIGHTNESS ON PHOTOSENSOR: 56 00 8D 01 00
RETURN: 76 00 8D 02 00 ZZ
ZZ ---- 1byte 0x01 – dark, 0x00 – bright
23. SET POWER SAVE MODE: 56 00 3E 03 00 01 B1
RETURN: 76 00 3E 00 ZZ
B1 ---- 1byte power save mode status: 0x01—enter power save mode, 0x00—exit power save mode
ZZ ---- 1byte setting results: 0x00 setting succeed, 0x0E—already in power save mode
Notes:
After issuing the command, the delay for response takes about 800ms, and it can save around 50%
power. Once the camera is set in power save mode, the host must issue “exit power save mode” first
to wake up the camera, as when the camera is still in power save mode, it only responds to check
version/reset/set power save commands, and outputs “76 00 3E 00 0E” for any other command. If the
motion detection is enabled, the host must disable the motion detection before setting the camera
into power save mode.
24. CHECK DEFAULT PARAMETERS: 56 00 90 01 00
RETURN: 76 00 90 07 00 B0 B1 B2 B3 B4 B5
B0 ----1byte camera ID
B1 ----1byte image resolution, it matches the set image size command, 0x88 – 2304x1296
B2 B3 ---- 2bytes baud rate, Hex format, it matches the setting baud rate command: 0xAEC8:9600;
0x56E4:19200; 0x2AF2:38400; 0x1c4c:57600; 0xda6:115200; 0xeea1:230400; 0xeea2:460800;
0xeea3:921600
B4 ---- 1byte compression ratio, range 0x36-ox8F
B5 ---- 1byte start detection type: 0x00—motion detection, 0x01—facial detection, 0x02—vehicle
detection
Example:
Send: 56 00 90 01 00
Return: 76 00 90 07 00 66 0D A6 36 01
25. ISP IMAGE SETTING/READ/RESET
25.1 ISP IMAGE SETTING: 56 00 91 0C 04 B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 B10
RETURN: 76 00 91 02 04 ZZ

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
16
B0 ---- 1byte, set different time periods, 0x00 – daytime, 0x01 -- night time.
B1 ----1byte brightness, range:0x00~0xFF (decimal 0-255), default 0x80=128.
B2 ---- 1byte contrast, range:0x00~0xFF, daytime default 0x80=128; nighttime default 0xAA =170
B3 ---- 1byte sharpness ange:0x00~0xFF, day time default 0x80 and night time default 0x0A . when
there is noise at night time, recommend to use 0x00~x0A to reduce the noise.
B4 ---- 1byte saturation, range:0x00~0xFF, default 0x80.
B5 ----- 1byte tone, range:0x00~0xFF, default 0x80.
B6 --- 1byte white balance mode, 0x00: auto (default), 0x01: manual mode
B7 B8 ---- 2byte white balance parameter, range 0x12C ~0x258 (decimal 300-600), default
0x155=341, only valid in manual mode.
B9 ----1byte exposure compensation, range:0x00~0xFF (decimal 0-255), default 0x80=128, its to
adjust the brightness around the bright background area, not the overall brightness of the image.
B10 -- 1byte backlight compensation, range:0x00~0x0A (decimal 0-10), default 0x04.
ZZ ---- results: 0x00 setting succeed
0x01 wrong white balance parameters
0x02 wrong white balance mode
0x03 wrong backlight compensation
Note: all ISP image settings get saved after reboot.
Example:
Send: 56 00 91 0C 04 00 80 80 80 80 00 01 55 80 04
Return: 76 00 91 02 04 00
25.2 READ ISP IMAGE PARAMETER: 56 00 90 02 04 XX
RETURN: 76 00 90 0C 04 B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 B10
XX ---- 1byte check the parameters for specific time period, 0x00 – day time, 0x01 – night time
B0…..B10 10 bytes, please refer to 26.1 ISP image setting
Example:
Send: 56 00 90 02 04 00
Return: 76 00 90 0C 04 00 80 80 80 80 00 01 55 80 04
25.3 RESET ISP IMAGE SETTINGS TO DEFAULT: 56 00 91 02 04 XX
RETURN: 76 00 91 0C 04 B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 B10
XX ---- 1byte reset the settings for different time period, 0x00 – day time, 0x01 – night time
B0…..B10 10 bytes, please refer to 26.1 ISP image setting
Example:
Send: 56 00 91 02 04 00

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
17
Return: 76 00 91 0C 04 00 80 80 80 80 00 01 55 80 04
Notes: the reset on all ISP image settings gets saved after reboot.
26. GET CAMERA ID: 56 FF 90 01 21
RETURN: 76 FF 90 02 21 ZZ
ZZ ---- the current ID
Example:
Send: 56 FF 90 01 21
Return: 76 FF 90 02 21 04
Notes: when setting the ID for RS485 cameras, if the camera ID is unknown, there are two methods
to find out, one is from the “MEID_Num” outputs when the camera gets powered up, another is to
issue “get camera ID” command, 0xff from command is the broadcasting ID, which is only valid for
checking/getting ID.
27. ABNORMAL RETURN: 65 72 72 6F 72 (65 72 72 6F 72 means “error” in hex format)
28. INITIAL OPERATION PROCESS:
(1)power up with the matching voltage, delay 3.5s
(2)camera outputs: “MEID_Num:” + camera ID, and “Init end”
(3)set image resolution command (optional, if it’s already set once and no need to change, then
skip this step)
(4)set area cropping command (optional, doesn’t get saved after reboot, set once only after power-
up and prior to set image resolution)
(5)set image compression ratio command (optional, doesn’t get saved after reboot)
(6)set color or B/W command (optional, doesn’t get saved after reboot)
(7)capture an image command
(8)read image data length command
(9)read image data command
(10)stop capture command (it can be skipped, but available to be compatible with SC03MPD/E)
(11)for the next image, repeat from step (7)
29. CONTINUOUS CAPTURING IN MOTION DETECTION PROCESS:
(1)set motion detection continuous capturing command, such as: 56 00 88 04 05 0A 00 64

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
18
(2)set the sensitivity in motion detection command, such as 56 00 31 05 01 01 1A 6E 03
(3)enable the motion detection command, such as 56 00 37 01 01
(4)when the camera outputs/reports: 76 00 39 00 05, meaning motion detected and captured 5
images in the buffer
(5)disable the motion detection: 76 00 37 01 00, optional, when the next detection time is set, the
camera needs to wait for all buffered images to read out or host to issue disable motion detection
command, or pass the time to enter new motion detection.
(6)issue read image length command to read 1-5th images each time, such as 56 00 34 01 01
(7)issue read image data command to read out 1-5th images, such as: 56 00 32 0C 01 0A + 4-bytes
starting address + 4bytes image length 00 FF
(8)once all images are transferred out, re-enable the motion detection: 76 00 37 01 01, optional,
its related to step (5), if the step (5) is executed, step (8) is also required.
30. SMART DETECTION OPERATION PROCESS:
Smart detection is extended from the motion detection continuous capturing, it follows the similar
process.
(1)set smart detection command, such as: 56 00 91 0C 02 00 01 03 01 01 02 01 05 00 64 0A
(2)enable smart detection command, such as 56 00 31 05 01 01 1A 6E 03
(3)when the camera outputs/reports:
(4)when the camera outputs/reports: 76 00 39 03 01 01 05, meaning people detected and captured
5 images in the buffer
(5)disable the motion detection: 76 00 37 01 00, optional, when the next detection time is set, the
camera needs to wait for all buffered images to read out or host to issue disable motion detection
command, or pass the time to enter new motion detection.
(6)issue read image length command to read 1-5th images each time, such as 56 00 34 01 01
(7)issue read image data command to read out 1-5th images, such as: 56 00 32 0C 01 0A + 4-bytes
starting address + 4bytes image length 00 FF
(8)once all images are transferred out, re-enable the motion detection: 76 00 37 01 01, optional,
its related to step (5), if the step (5) is executed, step (8) is also required.

SC50MPB: 5 Mega Pixels Serial JPEG Camera User Manual
Spinel USA LLC
www.spinelelectronics.com
19
31. TEST THE CAMERA WITH A PC
31.1 Test with Spinel PC test tool
The PC Test Tool can be downloaded from our website: www.spinelelectronics.com.The camera
needs to have RS232 output or TTL to RS232 converter to connect to the serial port of the PC, or
please use an USB to TTL/RS232/RS485 converter if connecting the camera to the USB port from a
windows computer, please make sure select the default baud rate to ensure proper running.
The following image illustrates the interface of the test tool software.
Step 1: After the camera is connected, run the test tool, select the right COM port and default baud
rate, open the port.
Step 2: once the camera reads the version info as “PTC5M0 1.00”, the camera is ready to take
commands, before capture an image, please make sure set the right path for the images to get
saved to once taken, otherwise error might occur on the test tool.
Table of contents