Difference between revisions of "Kecheng KC-330B"

From sigrok
Jump to navigation Jump to search
 
(13 intermediate revisions by the same user not shown)
Line 2: Line 2:
| image              = [[File:Kecheng KC-330B.png|180px]]
| image              = [[File:Kecheng KC-330B.png|180px]]
| name                = Kecheng KC-330B
| name                = Kecheng KC-330B
| status              = in progress
| status              = supported
| source_code_dir    =  
| source_code_dir    = kecheng-kc-330b
| connectivity        = USB
| connectivity        = USB
| measurement_range  = 30dB - 130dB
| measurement_range  = 30dB - 130dB
Line 25: Line 25:
== Photos ==
== Photos ==
<gallery>
<gallery>
File:Kecheng KC-330B back.png|<small>Back of the device</small>
File:Kecheng KC-330B PCB LCD top.jpg|<small>PCB, top</small>
File:Kecheng KC-330B PCB bottom.jpg|<small>PCB, bottom</small>
File:Kecheng KC-330B PCB top.jpg|<small>PCB with LCD removed</small>
File:Kecheng KC-330B PCB top detail.jpg|<small>SGM8522/SGM8524</small>
File:Kecheng KC-330B F320.jpg|<small>Silicon Labs F320</small>
</gallery>
</gallery>


== Protocol ==
== Protocol ==


The host sends commands to the device via endpoint 2, and receives responses via endpoint 1. A command consists of a single byte, with the MSB (bit 7) cleared, followed by any arguments to the command. The response from the device consists of at least one byte: the command, with the MSB set.
{| border="0" width="100%" class="alternategrey sigroktable"
|-
! Command
! Response
! Description
|-
| 0x01
| 0x81
| '''Configure device''', 6 bytes payload:
|-
|
|
| style="padding: 0; font-size: smaller;" |
{| border="0" width="100%" style="margin: 0; border-collapse: collapse;" class="alternategrey"
|-
| style="width: 1em;" |
| style="width: 3em;" | 1
| Sample interval 0-6, representing 125ms, 500ms, 1s, 2s, 5s, 10s, 60s respectively.
|-
| style="width: 1em;" |
| style="width: 3em;" | 2
| Alarm low threshold
|-
| style="width: 1em;" |
| style="width: 3em;" | 3
| Alarm high threshold
|-
| style="width: 1em;" |
| style="width: 3em;" | 4
| Time weighting: 0=Fast, 1=Slow
|-
| style="width: 1em;" |
| style="width: 3em;" | 5
| Frequency weighting: 0=dBA, 1=dBC
|-
| style="width: 1em;" |
| style="width: 3em;" | 6
| Data source: 0=memory, 1=real time
|}
|-
| 0x02
| 0x82
| '''Identify''', response payload is length byte + device model (ASCII)
|-
| 0x03
| 0x83
| '''Set date and time''', 6 bytes payload:
|-
|
|
| style="padding: 0; font-size: smaller;" |
{| border="0" width="100%" style="margin: 0; border-collapse: collapse;" class="alternategrey"
|-
| style="width: 1em;" |
| style="width: 3em;" | 1
| Last two digits of year, e.g. 0x0d for 2013
|-
| style="width: 1em;" |
| style="width: 3em;" | 2
| Month, 1-12
|-
| style="width: 1em;" |
| style="width: 3em;" | 3
| Day of month, 1-31
|-
| style="width: 1em;" |
| style="width: 3em;" | 4
| Hours
|-
| style="width: 1em;" |
| style="width: 3em;" | 5
| Minutes
|-
| style="width: 1em;" |
| style="width: 3em;" | 6
| Seconds
|}
|-
| 0x04
|
| '''Check device status'''
|-
|
| 0x84
| Device is activated, i.e. logging to memory or live to PC ("log" on the display).
|-
|
| 0xa4
| Device is deactivated ("con" or "---" on the display).
|-
| 0x05
| 0x85
| '''Get stored measurement info''', response has 8 bytes payload:
|-
|
|
| style="padding: 0; font-size: smaller;" |
{| border="0" width="100%" style="margin: 0; border-collapse: collapse;" class="alternategrey"
|-
| style="width: 1em;" |
| style="width: 3em;" | 1-6
| Configuration settings of acquired data, same format as 0x01 command (except 0x11...)
|-
| style="width: 1em;" |
| style="width: 3em;" | 7-8
| Big-endian integer representing the number of stored measurements (32000 is the maximum).
|}
|-
| 0x06
| 0x86
| '''Get stored start date/time'''. Response has 6 bytes payload, same format as 0x03 command.
|-
| 0x07
| 0x87
| '''Get stored measurements''', 3 bytes payload:
|-
|
|
| style="padding: 0; font-size: smaller;" |
{| border="0" width="100%" style="margin: 0; border-collapse: collapse;" class="alternategrey"
|-
| style="width: 1em;" |
| style="width: 3em;" | 1-2
| Big-endian integer representing the sample offset, in blocks of 63 samples.
|-
| style="width: 1em;" |
| style="width: 3em;" | 3
| Number of samples to send. This is always the maximum, 0x3f, until the last chunk.
|}
|-
| 0x08
| 0x88
| '''Get live measurement''', response has 2 bytes payload: big-endian integer representing the dB value X 10
|}


[[Category:Device]]
[[Category:Device]]
[[Category:Sound level meter]]
[[Category:Sound level meter]]
[[Category:In progress]]
[[Category:Supported]]

Latest revision as of 02:49, 23 July 2014

Kecheng KC-330B
Kecheng KC-330B.png
Status supported
Source code kecheng-kc-330b
Connectivity USB
Measurement range (A) 30dB - 130dB
Resolution 0.1dB
Accuracy (94dB@1kHz) 1.5dB
Frequency weighting A, C
Time weighting F, S

The Kecheng KC-330B is a sound level meter and data logger with USB connectivity.

See Kecheng KC-330B/Info for more details (such as lsusb -vvv output) about the device.

Hardware

Photos

Protocol

The host sends commands to the device via endpoint 2, and receives responses via endpoint 1. A command consists of a single byte, with the MSB (bit 7) cleared, followed by any arguments to the command. The response from the device consists of at least one byte: the command, with the MSB set.

Command Response Description
0x01 0x81 Configure device, 6 bytes payload:
1 Sample interval 0-6, representing 125ms, 500ms, 1s, 2s, 5s, 10s, 60s respectively.
2 Alarm low threshold
3 Alarm high threshold
4 Time weighting: 0=Fast, 1=Slow
5 Frequency weighting: 0=dBA, 1=dBC
6 Data source: 0=memory, 1=real time
0x02 0x82 Identify, response payload is length byte + device model (ASCII)
0x03 0x83 Set date and time, 6 bytes payload:
1 Last two digits of year, e.g. 0x0d for 2013
2 Month, 1-12
3 Day of month, 1-31
4 Hours
5 Minutes
6 Seconds
0x04 Check device status
0x84 Device is activated, i.e. logging to memory or live to PC ("log" on the display).
0xa4 Device is deactivated ("con" or "---" on the display).
0x05 0x85 Get stored measurement info, response has 8 bytes payload:
1-6 Configuration settings of acquired data, same format as 0x01 command (except 0x11...)
7-8 Big-endian integer representing the number of stored measurements (32000 is the maximum).
0x06 0x86 Get stored start date/time. Response has 6 bytes payload, same format as 0x03 command.
0x07 0x87 Get stored measurements, 3 bytes payload:
1-2 Big-endian integer representing the sample offset, in blocks of 63 samples.
3 Number of samples to send. This is always the maximum, 0x3f, until the last chunk.
0x08 0x88 Get live measurement, response has 2 bytes payload: big-endian integer representing the dB value X 10