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 ...")
 
Line 1: Line 1:
{{Infobox sound level meter
{{Infobox sound level meter
| image              = [[File:Tondaj sl-814.png|180px]]
| image              = [[File:Extech_407760.jpg|180px]]
| name                = Tondaj SL-814
| name                = EXTECH 407760
| status              = supported
| status              = planned
| source_code_dir    = tondaj-sl814
| source_code_dir    = tondaj-sl814
| connectivity        = [[Device_cables#Tondaj_SL-814_cable|USB/serial]]
| connectivity        = tbd
| frequency_range    = 31.5Hz - 8.5kHz
| frequency_range    = tbd
| measurement_range  = 40dB - 130dB
| measurement_range  = tbd
| resolution          = 0.1dB
| resolution          = tbd
| accuracy            = 2dB
| accuracy            = tbd
| frequency_weighting = A, C
| frequency_weighting = tbd
| time_weighting      = F, S
| time_weighting      = tbd
| 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]
| website            = [http://www.extech.com/instruments/product.asp?catid=18&prodid=551 extech407760.cn]
}}
}}


The '''Tondaj SL-814''' (also referred to as '''TDJ SL814''' sometimes) is a sound level meter with USB connectivity.
The EXTECH 407760 is a sound level meter with USB connectivity.


See [[Tondaj SL-814/Info]] for more details (such as '''lsusb -vvv''' output) about the device.
See [[EXTECH 407760/Info]] for more details (such as '''lsusb -vvv''' output) about the device.


== Hardware ==
== Hardware ==


'''Device''':
'''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])
* '''Main CPU''': TBD
* '''8MHz crystal''': 8.00ECSXR
* TBD
* '''?''': 324 GZ15129
* TBD
* '''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])
* TBD
* '''Trim potentiometer''': Bochen 3296
* TBD


'''USB cable''':
'''USB cable''':
* See [[Device_cables#Tondaj_SL-814_cable]].
* TBD


== Photos ==
== Photos ==
Line 35: Line 35:


<gallery>
<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>
</gallery>


'''USB cable''':
'''USB cable''':


See [[Device_cables#Tondaj_SL-814_cable]].
TBD


== Protocol ==
== 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 has a usb connector.
The device accepts bulk transfer commands on a usb bus.
 
=== Commands / replies ===
 
<pre>
407760(EXTECH) Communication Protocol
Basic setup (64 byte in all, latter is 0)
0        1        2        3          4          5    6    7      8    9    10    11
LED STATUS Samprate Alarm HI Alarm Low y m d H M S Samp points
10
20
30
0
U8 U8 U8 U8 U8 U8 U8 U8 U8 U8 3U8


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).
STATUS:
7 6 5 4 3
2
  1        0


=== Commands / replies ===
Auto:0
Manual:1 RT  1
STOR 0 1dBA
0dBC 1fast
0slow S:01 
M:10
H:11
Samprate 
  0x01 represent  50ms
  0x02          500ms
  0x03          1s
  0x04          2s
  0x05          5s
  0x06          10s
  0x07          60s
 
 
Download the data
PC transmits the read-command 00,00,0D in read Mode.
 
If the first byte of reply is 0XFF , then it is STOR MODE
 
{STOR MODE
2
HI   1
M 0
LOW
Transmit the read-command 00,00,0f READ data


Commands and replies can consist of multiple bytes, and always end with '''0x0d'''.
READ INFO
11 10 9 8 7 6 5 4 3
2
  1
0


{| border="0" style="font-size: smaller" class="alternategrey sortable sigroktable"
|- bgcolor="#6699ff"
!Name
!Command
!Reply
!Comments


|- bgcolor="#eeeeee" style="vertical-align: top"
Alam
| Init
H
| 0x10&nbsp;0x04&nbsp;0x0d
| 0x05&nbsp;0x0d
Alam
| It's unclear what exactly this command does. Data transfers also seem to work fine when it is omitted.
L
fs
unit
S
M
H
d m m
y Samprate


|- 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).


|}
BLOCKBUF  512
Except the last time, It is sent BLOCKBUF real data
2
hi   1
lo 0
0x0f
Hi*256+lo is the times of reading data
                      //STOR MODE


=== Data reply ===


The first two bytes of the reply to the "get measurement" command (''0xAA 0xBB'') have the following format:
}
If it not 0XFF, then it is REAL MODE


{| border="0" width="95%" style="font-size: smaller" class="alternategrey sortable sigroktable"
STATUS
|-
7 6 5 4 3
! style="width: 3em;" | Byte
2      1        0
! style="width: 3em;" | Bit
 
! Value


|-
Auto:0
| 0
Manual:1 RT/STOR check
|
1dBA
|
0dBC 11fast
0slow Samprate


|-
SAMPRATE =0 this means EMS memory is empty
|
| 7
| ''A/C measurement type''. 0: '''A''', 1: '''C'''.


|-
“serial parameters”
|
| 6
| ''Unknown/unused''.


|-
To connect to the device via USB, you will need to know the following for development..
|
| 5-4
| ''Level''. 00: '''40''', 01: '''60''', 10: '''80''', 11: '''100'''


|-
|
| 3
| ''Slow/Fast measurement mode''. 0: '''Fast''', 1: '''Slow'''.


|-
VID : VID_10C4
|
PID : PID_0003
| 2-0
Baud rate : (9600)
| ''Value[10..8]''.
Bit value : 8


|-
| 1
|
|


|-
|
| 7-0
| ''Value[7..0]''.


|}
</pre>


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 ===
=== 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.
TBD


== Python script ==
== Python script ==


Here's a quick Python script for getting the values out of the Tondaj SL-814. A sigrok driver will follow soon.
Here's a quick Python script for getting the values out of the EXTECH 407760. A sigrok driver will follow soon.


<small>
<small>
  #!/usr/bin/python3
  #!/bin/python
# Tondaj SL-814 sound level meter Python script
 
# Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
import usb.core
# Released under the terms of the GNU GPL, version 2 or later.
import sys
dev = usb.core.find(idVendor=0x10c4, idProduct=0xea61)
import time
#dev.baudrate=9600
import serial
dev.set_configuration()
dev.reset()
s = serial.Serial('/dev/ttyUSB0', baudrate=9600, parity=serial.PARITY_EVEN)
 
bytes_written = dev.write(0x02, [0x00,0x00,0x0D], 0)
while 1:
print "_dbg bytes_written: ", bytes_written
    # Query
 
    s.write(bytes([0x30, 0x01, 0x0d]))
for x in xrange(0,100):
    result = s.read(4)
  print "_dbg attempting read for the %d time\n" % x
    print('%02x %02x %02x %02x' % tuple(result), end='  -  ')
  try:
    data = dev.read(0x82, 1,0,1000)
    # A/C
    if data:
    ac = (result[0] & (1 << 7)) >> 7
      print "Data found!\n"
    print('A' if ac == 0 else 'C', end=', ')
      sys.exit()
    else:
    # Slow/Fast
      print "Data not found!\n"
    sl = (result[0] & (1 << 3)) >> 3
  except:
    print('Fast' if sl == 0 else 'Slow', end=', ')
    pass
 
    # 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>
</small>


Line 201: Line 198:


<small>
<small>
  09 af 02 0d  -  A, Slow, Level: 40, 43.1 dB
  TBD
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>
</small>


Line 227: Line 207:
[[Category:Device]]
[[Category:Device]]
[[Category:Sound level meter]]
[[Category:Sound level meter]]
[[Category:Supported]]
[[Category:Planned]]

Revision as of 00:04, 5 May 2013

EXTECH 407760
File:Extech 407760.jpg
Status planned
Source code tondaj-sl814
Connectivity tbd
Frequency range tbd
Measurement range (A) tbd
Resolution tbd
Accuracy (94dB@1kHz) tbd
Frequency weighting tbd
Time weighting tbd
Website extech407760.cn

The EXTECH 407760 is a sound level meter with USB connectivity.

See EXTECH 407760/Info for more details (such as lsusb -vvv output) about the device.

Hardware

Device:

  • Main CPU: TBD
  • TBD
  • TBD
  • TBD
  • TBD

USB cable:

  • TBD

Photos

Device:

USB cable:

TBD

Protocol

The device has a usb connector. The device accepts bulk transfer commands on a usb bus.

Commands / replies

407760(EXTECH) Communication Protocol 
Basic setup (64 byte in all, latter is 0)
0        1        2         3          4          5    6    7      8     9    10    11
LED	STATUS	Samprate	Alarm HI	Alarm Low	y	m	d	H	M	S	Samp points
10
20
30
0
	U8	U8	U8	U8	U8	U8	U8	U8	U8	U8	3U8

STATUS:
7	6	5	4	3
	2
 	  1         0

Auto:0
Manual:1			RT   1
STOR 0	1dBA
0dBC	1fast
0slow	S:01  
M:10
H:11
Samprate   
   0x01 represent  50ms
   0x02          500ms
   0x03          1s
   0x04          2s
   0x05          5s
   0x06          10s
   0x07          60s


Download the data
PC transmits the read-command 00,00,0D in read Mode. 

If the first byte of reply is 0XFF , then it is STOR MODE

{STOR MODE
2
 HI	  1
M	0
LOW
Transmit the read-command 00,00,0f READ data

READ INFO
11	10	9	8	7	6	5	4	3
	2
 	  1
	0


Alam
H
	
Alam
L
		
fs
	
unit
	
S
	
M	
H	
d	m m	
y	Samprate 


BLOCKBUF   512
Except the last time, It is sent BLOCKBUF real data 
2
 hi	  1
lo	0
0x0f
Hi*256+lo is the times of reading data
                      //STOR MODE


}
If it not 0XFF, then it is REAL MODE

STATUS
7	6	5	4	3
	2       1        0
  

Auto:0
Manual:1	RT/STOR	check	
1dBA
0dBC	11fast
0slow	Samprate

SAMPRATE =0 this means EMS memory is empty

“serial parameters”

To connect to the device via USB, you will need to know the following for development..


VID : 			VID_10C4
PID :			PID_0003
Baud rate :		(9600)
Bit value :		8




Notes

TBD

Python script

Here's a quick Python script for getting the values out of the EXTECH 407760. A sigrok driver will follow soon.

#!/bin/python

import usb.core import sys dev = usb.core.find(idVendor=0x10c4, idProduct=0xea61)

  1. dev.baudrate=9600

dev.set_configuration() dev.reset()

bytes_written = dev.write(0x02, [0x00,0x00,0x0D], 0) print "_dbg bytes_written: ", bytes_written

for x in xrange(0,100):

 print "_dbg attempting read for the %d time\n" % x
 try:
   data = dev.read(0x82, 1,0,1000)
   if data:
     print "Data found!\n"
     sys.exit()
   else:
     print "Data not found!\n"
 except:
   pass

Example output:

TBD

Resources

TODO.