Difference between revisions of "EXTECH 407760"

From sigrok
Jump to navigation Jump to search
(Created page with "{{Infobox sound level meter | image = 180px | name = Tondaj SL-814 | status = supported | source_code_dir ...")
 
(Blanked the page)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Infobox sound level meter
| image              = [[File:Tondaj sl-814.png|180px]]
| name                = Tondaj SL-814
| status              = supported
| source_code_dir    = tondaj-sl814
| connectivity        = [[Device_cables#Tondaj_SL-814_cable|USB/serial]]
| frequency_range    = 31.5Hz - 8.5kHz
| measurement_range  = 40dB - 130dB
| resolution          = 0.1dB
| accuracy            = 2dB
| frequency_weighting = A, C
| time_weighting      = F, S
| website            = [http://www.tondaj.cn/ce040_Eng/productshow.asp?id=43&mnid=1039&classname=DIGITAL%20SOUND%20LEVEL%20METER&uppage=/ce040_Eng/product.asp tondaj.cn]
}}


The '''Tondaj SL-814''' (also referred to as '''TDJ SL814''' sometimes) is a sound level meter with USB connectivity.
See [[Tondaj SL-814/Info]] for more details (such as '''lsusb -vvv''' output) about the device.
== Hardware ==
'''Device''':
* '''Main CPU''': [http://www.atmel.com/devices/ATMEGA8.aspx Atmel ATmega8/L] (marking: "Atmel ATmega8L 8AU 1113D"), ([http://www.atmel.com/Images/doc2486.pdf datasheet])
* '''8MHz crystal''': 8.00ECSXR
* '''?''': 324 GZ15129
* '''5V (100mA) low-dropout voltage regulator''': [http://www.holtek.com/english/docum/consumer/75xx_1.htm Holtek HT7550-1#] ([http://www.holtek.com/pdf/consumer/ht75xx_1v200.pdf datasheet])
* '''Trim potentiometer''': Bochen 3296
'''USB cable''':
* See [[Device_cables#Tondaj_SL-814_cable]].
== Photos ==
'''Device''':
<gallery>
File:Tondaj sl-814 package.jpg
File:Tondaj sl-814 package contents.jpg
File:Tondaj sl-814 device front.jpg
File:Tondaj sl-814 device back.jpg
File:Tondaj sl-814 device front nofoam.jpg
File:Tondaj sl-814 probe tip.jpg
File:Tondaj sl-814 prolific usb cable.jpg
File:Tondaj sl-814 lcd segments.jpg
File:Tondaj sl-814 jacks.jpg
File:Tondaj sl-814 decapitated.jpg
File:Tondaj sl-814 device open.jpg
File:Tondaj sl-814 cover.jpg
File:Tondaj sl-814 pcb top.jpg
File:Tondaj sl-814 pcb bottom.jpg
File:Tondaj sl-814 bochen.jpg
File:Tondaj sl-814 connectors.jpg
File:Tondaj sl-814 atmega8l.jpg
File:Tondaj sl-814 crystal.jpg
File:Tondaj sl-814 gz15129.jpg
File:Tondaj sl-814 gz15129 2.jpg
File:Tondaj sl-814 holtek 7550.jpg
File:Tondaj sl-814 holtek ht1621b.jpg
File:Tondaj sl-814 nxp hef4053bt.jpg
File:Tondaj sl-814 ti tl062c.jpg
</gallery>
'''USB cable''':
See [[Device_cables#Tondaj_SL-814_cable]].
== Protocol ==
The device has a mini-USB connector for PC connectivity. It ships with a Prolific USB-to-serial cable (i.e. the Prolific chip is ''inside the cable'') which can be attached to that connector.
The device accepts a simple command-based protocol over the (virtual) serial port, using a baudrate of '''9600 baud''', with '''8e1''' settings (8 data bits, even parity, one stop bit).
=== Commands / replies ===
Commands and replies can consist of multiple bytes, and always end with '''0x0d'''.
{| border="0" style="font-size: smaller" class="alternategrey sortable sigroktable"
|- bgcolor="#6699ff"
!Name
!Command
!Reply
!Comments
|- bgcolor="#eeeeee" style="vertical-align: top"
| Init
| 0x10&nbsp;0x04&nbsp;0x0d
| 0x05&nbsp;0x0d
| It's unclear what exactly this command does. Data transfers also seem to work fine when it is omitted.
|- bgcolor="#eeeeee" style="vertical-align: top"
| Get&nbsp;measurement
| 0x30&nbsp;'''0xZZ'''&nbsp;0x0d
| ''0xAA&nbsp;0xBB''&nbsp;'''0xZZ+1'''&nbsp;0x0d
| For a given command with '''0xZZ''' value (0-255), the device returns '''0xZZ + 1''' as part of the reply (a simple "sequence number" mechanism which is apparently meant for the host as error-checking mechanism).
|}
=== Data reply ===
The first two bytes of the reply to the "get measurement" command (''0xAA 0xBB'') have the following format:
{| border="0" width="95%" style="font-size: smaller" class="alternategrey sortable sigroktable"
|-
! style="width: 3em;" | Byte
! style="width: 3em;" | Bit
! Value
|-
| 0
|
|
|-
|
| 7
| ''A/C measurement type''. 0: '''A''', 1: '''C'''.
|-
|
| 6
| ''Unknown/unused''.
|-
|
| 5-4
| ''Level''. 00: '''40''', 01: '''60''', 10: '''80''', 11: '''100'''
|-
|
| 3
| ''Slow/Fast measurement mode''. 0: '''Fast''', 1: '''Slow'''.
|-
|
| 2-0
| ''Value[10..8]''.
|-
| 1
|
|
|-
|
| 7-0
| ''Value[7..0]''.
|}
The actual measurement value seems to span 11 bits, and is encoded in BCD format. Example: If ''Value[10..0]'' is '''436''' (decimal), the corresponding measurement value is '''43.6 dB'''.
=== Notes ===
The "MAX" mode on the device (which always keeps showing the highest measured value since the "MAX" button was pressed) only affects the value shown on the display. The values returned via USB upon the "get measurement" command, always show the current value, not the "MAX" one shown on the display.
== Python script ==
Here's a quick Python script for getting the values out of the Tondaj SL-814. A sigrok driver will follow soon.
<small>
#!/usr/bin/python3
# Tondaj SL-814 sound level meter Python script
# Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
# Released under the terms of the GNU GPL, version 2 or later.
import time
import serial
s = serial.Serial('/dev/ttyUSB0', baudrate=9600, parity=serial.PARITY_EVEN)
while 1:
    # Query
    s.write(bytes([0x30, 0x01, 0x0d]))
    result = s.read(4)
    print('%02x %02x %02x %02x' % tuple(result), end='  -  ')
    # A/C
    ac = (result[0] & (1 << 7)) >> 7
    print('A' if ac == 0 else 'C', end=', ')
    # Slow/Fast
    sl = (result[0] & (1 << 3)) >> 3
    print('Fast' if sl == 0 else 'Slow', end=', ')
    # Level
    factor = (result[0] & ((1 << 5) | (1 << 4))) >> 4
    print('Level: %d' % (40 + (int(bin(factor), 2) * 20)), end=', ')
    # Value
    val = ((result[0] & 0x7) << 8) | result[1]
    tmp_str = '%d' % val
    val_str = tmp_str[:-1] + '.' + tmp_str[-1:]
    print(val_str + ' dB')
    time.sleep(0.5)
s.close()
</small>
'''Example output:'''
<small>
09 af 02 0d  -  A, Slow, Level: 40, 43.1 dB
09 b9 02 0d  -  A, Slow, Level: 40, 44.1 dB
09 e9 02 0d  -  A, Slow, Level: 40, 48.9 dB
89 cb 02 0d  -  C, Slow, Level: 40, 45.9 dB
89 eb 02 0d  -  C, Slow, Level: 40, 49.1 dB
8a 6c 02 0d  -  C, Slow, Level: 40, 62.0 dB
82 99 02 0d  -  C, Fast, Level: 40, 66.5 dB
82 3c 02 0d  -  C, Fast, Level: 40, 57.2 dB
82 72 02 0d  -  C, Fast, Level: 40, 62.6 dB
92 85 02 0d  -  C, Fast, Level: 60, 64.5 dB
93 05 02 0d  -  C, Fast, Level: 60, 77.3 dB
92 68 02 0d  -  C, Fast, Level: 60, 61.6 dB
a3 93 02 0d  -  C, Fast, Level: 80, 91.5 dB
a3 93 02 0d  -  C, Fast, Level: 80, 91.5 dB
a3 93 02 0d  -  C, Fast, Level: 80, 91.5 dB
b3 f2 02 0d  -  C, Fast, Level: 100, 101.0 dB
b3 f2 02 0d  -  C, Fast, Level: 100, 101.0 dB
b3 f2 02 0d  -  C, Fast, Level: 100, 101.0 dB
</small>
== Resources ==
TODO.
[[Category:Device]]
[[Category:Sound level meter]]
[[Category:Supported]]

Latest revision as of 01:33, 5 May 2013