Author Topic: Decoding DER EE LCR Meter DE-5000 serial bitstream  (Read 7921 times)

0 Members and 2 Guests are viewing this topic.

Offline AlfBazTopic starter

  • Super Contributor
  • ***
  • Posts: 2187
  • Country: au
Decoding DER EE LCR Meter DE-5000 serial bitstream
« on: November 30, 2014, 10:06:00 am »
So, a bit annoyed by the fact that this LCR meter has serial data ouput whos bitstream can only be understood by the proprietry software, therby making it diffuclut to use in a mixed ATE environment and getting no responce from DER EE I decided to have a go at deciphering it

Here's what I have so far and encorouge any and all who are into this sort of thing to add any further information they find.

17 bytes are sent per reading.

Please bare in mind that the info below is what the LCR software shows as a result of me sending data that the meter may not produce

B0   B1   B2   B3   B4   B5   B6   B7   B8   B9   B10   B11   B12   B13   B14   B15   B16
                                                
B1..0   First 2 bytes indicate start of packet and are always B0=0x00 and B1=0x0D                                             
B2   BIT7   Parrallel/Series Measurement                                          
      1 = Parallel                                          
      0 = Series                                          
   BIT6   Auto                                          
      1 = Auto on                                          
      0 = Auto off                                          
   BIT5   AutoLCR mode (device determines L, C or R mode)                                          
      1 = Auto LCR on                                          
      0 = Auto LCR off                                          
   BIT4   SORT mode                                          
      1 = SORT on                                          
      0 = SORT off                                          
   BIT3..0   NOT USED?? ALWAYS ZERO                                          
                                                
B3   BIT7..5   Frequency                                          
      0 = 100Hz                                          
      1 = 120Hz                                          
      2 = 1kHz                                          
      3 = 10kHz                                          
      4 = 100kHz                                          
   BIT4   UNKNOWN always 1?                                          
   BIT3   Auto Power Off (APO)                                          
      1 = OFF                                          
      0 = ON                                          
   BIT2-0   NOT USED?? ALWAYS ZERO                                          
                                                
B4      USED FOR SORT? NORMALLY ZERO                                          
                                                
B5   BIT7..0   MODE                                          
      1 = Ls                                          
      2 = Cs                                          
      3 = Rs                                          
      4 = DCR                                          
                                                
B6-7      Reading                                          
                                                
B8   BIT7   When set, any changes to bits 6 to 3 (units) are ignored and the last Units are locked in                                          
   BIT6..3   UNITS                                          
      0 = none                                          
      1 = ohm                                          
      2 = Kohm                                          
      3 = Mohm                                          
      4 = none                                          
      5 = uH                                          
      6 = mH                                          
      7 = H                                          
      8 = KH                                          
      9 = pF                                          
      A = nF                                          
      B = uF                                          
      C = mF                                          
                                                
   BIT2..0   Decimal point                                          
      0 = reading / 1                                          
      1 = reading / 10                                          
      2 = reading / 100                                          
      3 = reading / 1000                                          
      4 = reading / 10 000                                          
      5 = 5 digit mode?                                          
                                                
B9   BIT7..0   NOT USED?? ALWAYS ZERO                                          
                                                
B10   BIT7..4   NOT USED?? ALWAYS ZERO                                          
   BIT3..0   Secondary reading mode                                          
      0 = No mode (not used?)                                          
      1 = D                                          
      2 = Q                                          
      3 = ESR                                          
      4 = Theta                                          
                                                
B11..12      Secondary reading value                                          
                                                
B13      Secondary Decimal point                                          
      0 = reading / 1 (no decimal point eg 4566)                                          
      1 = reading / 10                                          
      2 = reading / 100                                          
      3 = reading / 1000                                          
      4 = reading / 10 000                                          
      5 = reading / 1 (decimal point at end eg 4566. )                                          
                                                
B14      UNKNOWN always shows 0x80                                          
                                                
B15..16      Packet terminators always B15=0x0D B16=0x0A                                          


For those that are interested in snooping here's my setup

Inititally I used PortMon  to look at the data going from the meter to the program. The meter simply dumps 17 bytes to the Virtual Com Port. It becomes visible when you hit play in the PC application.

I then decided to send my own data to PC so I could enumerate the various values
You can use your own method here but a quick search gave me the following programs to use
http://www.virtual-null-modem.com/download.htm
Create two virtual com ports that are null-modem connected

Feed data to one of the virtual ports with this
http://www.aggsoft.com/com-port-emulator/download.htm
and set the LCR program to listen to the other port

The second program needs a text file with a line of data to send to the meter
Here's an example (copied coming from the meter)
#00#0D#40#58#00#02#25#D8#52#00#01#00#D6#04#80#0D#0A
Simply paste the above line into a text file and then use it with the com port emulator

It yields the following on the LCR's PC program
Auto
Cs
1KHz
96.88nF
In the Grid
D = 0.021
Theta value -88.7741
Q value 46.729
D value 0.0214
Z value 1642.8049


 
The following users thanked this post: Trader

Offline Muttley Snickers

  • Supporter
  • ****
  • Posts: 2372
  • Country: au
  • Cursed: 679 times
Re: Decoding DER EE LCR Meter DE-5000 serial bitstream
« Reply #1 on: November 30, 2014, 10:24:19 am »
G'Day AlfBaz,

Were you using the optional USB to IR, or have you managed to find the onboard  serial pin outs .

Regards and Nice Work.

Muttley
« Last Edit: February 28, 2016, 12:44:22 am by Muttley Snickers »
 

Offline AlfBazTopic starter

  • Super Contributor
  • ***
  • Posts: 2187
  • Country: au
Re: Decoding DER EE LCR Meter DE-5000 serial bitstream
« Reply #2 on: November 30, 2014, 10:32:01 am »
Using the IR to usb adaptor here also.
It has an FTDI232RL chip in it. Simply sniffed the appropriate VCP
 

Offline biot

  • Regular Contributor
  • *
  • Posts: 70
Re: Decoding DER EE LCR Meter DE-5000 serial bitstream
« Reply #3 on: November 30, 2014, 03:44:47 pm »
So, a bit annoyed by the fact that this LCR meter has serial data ouput whos bitstream can only be understood by the proprietry software, therby making it diffuclut to use in a mixed ATE environment and getting no responce from DER EE I decided to have a go at deciphering it
We've actually got a fully reverse-engineered driver for this in sigrok, so consider the job done. Unfortunately we're running behind on getting docs up for it in the wiki, but the code contains everything needed, and quite a few comments on the protocol:

http://sigrok.org/gitweb/?p=libsigrok.git;a=blob;f=src/lcr/es51919.c;hb=HEAD

In this case the device is based on the Cyrustek ES51919 LCR chip, and the DER EE DE-5000 driver is just a little wrapper around the code for this chip.
 

Offline AlfBazTopic starter

  • Super Contributor
  • ***
  • Posts: 2187
  • Country: au
Re: Decoding DER EE LCR Meter DE-5000 serial bitstream
« Reply #4 on: November 30, 2014, 03:55:55 pm »
We've actually got a fully reverse-engineered driver for this in sigrok, so consider the job done.
Damn it :palm:
There's a day wasted. I searched and searched (including Cyrustek ES51919) and found nothing. I knew I should of asked here first

PS I needed the data to drive it from labview, so thanks for the complete spec
 

Offline 4x1md

  • Regular Contributor
  • *
  • Posts: 73
  • Country: il
    • 4X1MD on Github
Re: Decoding DER EE LCR Meter DE-5000 serial bitstream
« Reply #5 on: September 16, 2017, 09:35:22 pm »
We've actually got a fully reverse-engineered driver for this in sigrok, so consider the job done. Unfortunately we're running behind on getting docs up for it in the wiki, but the code contains everything needed, and quite a few comments on the protocol:

http://sigrok.org/gitweb/?p=libsigrok.git;a=blob;f=src/lcr/es51919.c;hb=HEAD

Thanks for doing it. Today I used this information for creating my own Python library for this meter.

The repository is here:
https://github.com/4x1md/de5000_lcr_py
 
The following users thanked this post: kripton2035

Offline mendip_discovery

  • Frequent Contributor
  • **
  • Posts: 984
  • Country: gb
Re: Decoding DER EE LCR Meter DE-5000 serial bitstream
« Reply #6 on: January 01, 2023, 08:30:10 pm »
So I refused to pay the £100 for the IR to USB accessory so for £15 I bought a RS232 to usb sparkfun board and a Vishay IR sensor.

I plugged it into my Pi and tried the above script but it is giving me errors about the syntax first it was the print function now it doesn't like the part which is lcr.pretty so still not got it working but on my way.
Motorcyclist, Nerd, and I work in a Calibration Lab :-)
--
So everyone is clear, Calibration = Taking Measurement against a known source, Verification = Checking Calibration against Specification, Adjustment = Adjusting the unit to be within specifications.
 
The following users thanked this post: Trader


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf