Difference between revisions of "Lascar Electronics EL-USB-2"

From sigrok
Jump to navigation Jump to search
(quote example sigrok-cli use (by confuc via IRC))
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[File:EL-USB-2.png|thumb|right|EL-USB-2]]
[[File:EL-USB-2.png|thumb|right|Lascar Electronics EL-USB-2]]


The [http://www.lascarelectronics.com/ Lascar Electronics] [http://www.lascarelectronics.com/temperaturedatalogger.php?datalogger=102 EL-USB-2] is a USB-based temperature and humidity logger.
The [http://www.lascarelectronics.com/temperaturedatalogger.php?datalogger=102 Lascar Electronics EL-USB-2] is a USB-based temperature and humidity logger.


See [[Lascar Electronics EL-USB-2/Info]] for more details (such as '''lsusb -vvv''' output) about the device.
See [[Lascar Electronics EL-USB-2/Info]] for more details (such as '''lsusb -vvv''' output) about the device.
The sigrok driver for this device also supports the EL-USB-2+, EL-USB-LCD, and EL-USB-LCD+. Note that only downloading logged data is supported by sigrok; configuring the device is not currently supported.


== Hardware ==
== Hardware ==
Line 12: Line 14:


== Photos ==
== Photos ==
<gallery>
<gallery>
File:EL-USB-2 side.jpg
File:EL-USB-2.png|<small>Device, top</small>
File:EL-USB-2 uncapped.jpg
File:EL-USB-2 side.jpg|<small>Device, side</small>
File:EL-USB-2 battery.jpg
File:EL-USB-2 uncapped.jpg|<small>Device, uncapped</small>
File:EL-USB-2 sensor.jpg
File:EL-USB-2 battery.jpg|<small>Device, battery</small>
File:EL-USB-2 PCB top.jpg
File:EL-USB-2 sensor.jpg|<small>Sensirion SHT11</small>
File:EL-USB-2 PCB bottom.jpg
File:EL-USB-2 PCB top.jpg|<small>PCB, top</small>
File:EL-USB-2 F321.jpg
File:EL-USB-2 PCB bottom.jpg|<small>PCB, bottom</small>
File:EL-USB-2 24LC256.jpg
File:EL-USB-2 F321.jpg|<small>SiLabs C8051F321</small>
File:EL-USB-2 24LC256.jpg|<small>Microchip 24LC256</small>
</gallery>
</gallery>


== Protocol ==
== Protocol ==


=== Commands ===
See [[Lascar Electronics EL-USB protocol]].
 
{| border="0" width="95%" style="font-size: smaller;" class="alternategrey sigroktable"
|-
! style="width: 10em;" | Bytes
!Command
 
|-
| valign="top" style="white-space=nowrap;" | '''0x00 0xff 0xff'''
| Load device configuration structure.
 
A 3-byte header is returned first in which the first byte is 0x02, and the second and third bytes are the length of the configuration structure to follow, as a little-endian integer representing the number of bytes. Different devices in the EL-USB series have differently-sized configuration structures.
 
|-
| valign="top" style="white-space=nowrap;" | '''0x01''' ''0xnn 0xnn''
| Save device configuration structure.
 
The second and third bytes are the length of the configuration structure to follow, as a little-endian integer representing the number of bytes.
 
The device responds with a single byte with value 0xff when the configuration has been saved.
 
|-
| valign="top" style="white-space=nowrap;" | '''0x03 0xff 0xff'''
| Transfer logged data.
 
A 3-byte header is returned first in which the first byte is 0x02, and the second and third bytes are the length of the logged data to follow, as a little-endian integer representing the number of bytes.
 
The device's entire sample memory is then transferred. The number of stored samples (offset 0x2e in the configuration structure) should be checked before interpreting the data; any remaining data in the transfer should be ignored.
 
|}
 
=== Data buffer ===
 
Every sample consists of a byte representing the temperature and a byte representing relative humidity. There is no timestamp; this must be calculated using the configuration structure's start time and sample period.
 
For temperature measurements in Celcius, the value represents a point on a scale of -40C to 80C, with each point representing a half degree. Thus, to convert to Celcius:
 
temperature = value / 2 - 40
 
For Fahrenheit, the stored value also starts at -40F, but each point represents 1 degree Fahrenheit:
 
temperature = value - 40
 
The relative humidity value is represented as each point representing 0.5:
 
relative_humidity = value / 2
 
=== Device configuration structure ===
 
{| border="0" width="95%" style="font-size: smaller" class="alternategrey sigroktable"
|-
! style="width: 3em;" | Offset
! style="width: 3em;" | Size
! Value
 
|-
| valign="top" | 0x00
| valign="top" | 1
| '''Device type'''
{| border="0" width="100%" style="margin: 0;" class="alternategrey"
|-
| style="width: 3em;" | 1,2
| EL-USB-1
|-
| 3
| EL-USB-2
|-
| 4,6
| EL-USB-3
|-
| 5,7
| EL-USB-4
|-
| 8
| EL-USB-LITE
|-
| 9
| EL-USB-CO
|-
| 10
| EL-USB-TC
|-
| 11
| EL-USB-CO300
|-
| 12
| EL-USB-2-LCD
|-
| 13
| EL-USB-2+
|-
| 14
| EL-USB-1-PRO
|-
| 15
| EL-USB-TC-LCD
|-
| 16
| EL-USB-2-LCD+
|-
| 17
| EL-USB-5
|-
| 18
| EL-USB-1-RCG
|-
| 19
| EL-USB-1-LCD
|-
| 20
| EL-OEM-3
|-
| 21
| EL-USB-1-LCD
|}
 
|-
| 0x01
| 1
| Unused
 
|-
| 0x02
| 16
| NULL-terminated device name, 15 chars max
 
|-
| 0x12
| 1
| Start time, hour (0-23)
 
|-
| 0x13
| 1
| Start time, minute (0-59)
 
|-
| 0x14
| 1
| Start time, second (0-59)
 
|-
| 0x15
| 1
| Start date, day (1-31)
 
|-
| 0x16
| 1
| Start date, month (1-12)
 
|-
| 0x17
| 1
| Start date, year (year - 2000)
 
|-
| 0x18
| 4
| Unsigned little-endian, seconds remaining until logging starts
 
|-
| 0x1c
| 2
| Unsigned little-endian, samplerate (seconds between samples)
 
|-
| 0x1e
| 2
| Unsigned little-endian, number of stored samples
 
|-
| valign="top" | 0x20
| valign="top" | 1
| style="padding: 0;" |
{| border="0" width="100%" style="margin: 0;" class="alternategrey"
|-
! align="left" style="width: 3em;" | Bit
! align="left" | Alarm conditions bitfield (1=enable)
|-
| 0
| temperature high
|-
| 1
| temperature low
|-
| 2
| temperature high hold
|-
| 3
| temperature low hold
|-
| 4
| relative humidity high
|-
| 5
| relative humidity low
|-
| 6
| relative humidity high hold
|-
| 7
| relative humidity low hold
|}
 
|-
| valign="top" | 0x21
| valign="top" | 1
| style="padding: 0;" |
{| border="0" width="100%" style="margin: 0;" class="alternategrey"
|-
! align="left" style="width: 3em;" | Bit
! align="left" | bitfield
|-
| 0
|
|-
| 1
|
|-
| 2
|
|-
| 3
|
|-
| 4
|
|-
| 5
|
|-
| 6
|
|-
| 7
|
|}
 
|-
| 0x22
| 1
| Temperature alarm high (value + 40) * 2
 
|-
| 0x23
| 1
| Temperature alarm low (value + 40) * 2
 
|-
| 0x24
| 4
| unknown (00 00 00 3f, 00 00 80 3f)
 
|-
| 0x28
| 4
| unknown (00 00 20 c2)
 
|-
| 0x2c
| 2
| unknown (00 00)
 
|-
| 0x2e
| 2
| Device-specific configuration
 
|-
| 0x30
| 4
| Firmware version (ASCII, not NULL-terminated
 
|-
| 0x34
| 2
| Unsigned little-endian, serial number
 
|-
| 0x36
| 2
| unknown (00 00)
 
|-
| 0x38
| 1
| Relative humidity alarm high (value * 2)
 
|-
| 0x39
| 1
| Relative humidity alarm low (value * 2)
 
|-
| 0x3a
| 2
| unknown (00 00)
 
|-
| 0x3c
| 4
| unknown (00 00 00 00)
 
|}


=== Device-specific information ===
== Example use ==
The 16-bit field at offset 0x2e in the configuration structure has different meanings depending on the type of device. It can be either a 16-bit little-endian integer or a bitfield.


{| border="0" width="100%" style="margin: 0; font-size: smaller" class="alternategrey sigroktable"
(This use case was reported by user confuc via IRC.)
|-
! colspan="2" align="left" | EL-USB-2
|-
{| border="0" width="100%" style="margin: 0;" class="alternategrey"
|-
| style="width: 5em;" | 0x0000
| Celcius
|-
| 0x0001
| Fahrenheit
|}


|}
  $ sigrok-cli -d lascar-el-usb:conn=10c4.0002 --samples 16382 -o file.sr


== Resources ==
== Resources ==


TODO.
* [http://www.lascarelectronics.com/pdf-usb-datalogging/data-logger0765755001349354469.pdf Manual]
* [http://www.lascarelectronics.com/data-logger/easylogger-software.php Vendor software]
* [http://sourceforge.net/apps/mediawiki/eltuxusb/index.php?title=Main_Page eltuxusb project]


[[Category:Device]]
[[Category:Device]]
[[Category:Thermometer]]
[[Category:Thermometer]]
[[Category:In progress]]
[[Category:Hygrometer]]
[[Category:Supported]]

Latest revision as of 18:16, 24 February 2020

Lascar Electronics EL-USB-2

The Lascar Electronics EL-USB-2 is a USB-based temperature and humidity logger.

See Lascar Electronics EL-USB-2/Info for more details (such as lsusb -vvv output) about the device.

The sigrok driver for this device also supports the EL-USB-2+, EL-USB-LCD, and EL-USB-LCD+. Note that only downloading logged data is supported by sigrok; configuring the device is not currently supported.

Hardware

Photos

Protocol

See Lascar Electronics EL-USB protocol.

Example use

(This use case was reported by user confuc via IRC.)

 $ sigrok-cli -d lascar-el-usb:conn=10c4.0002 --samples 16382 -o file.sr

Resources