Warning: Table './david/watchdog' is marked as crashed and last (automatic?) repair failed query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:229:\"Table './david/cache_filter' is marked as crashed and last (automatic?) repair failed\nquery: SELECT data, created, headers, expire, serialized FROM cache_filter WHERE cid = '2:fbabd45f4004dfc53149a2bd7da44bed'\";s:5:\"%file\";s:62:\"/home/web/SERVERS/www.daveansell.co.uk/docs/includes/cache.inc\";s:5:\"%line\";i:25;}', 3, '', 'http://www.daveansell.co.uk/?q=node/44', '', '54.204.249.184', 1414787331) in /home/web/SERVERS/www.daveansell.co.uk/docs/includes/database.mysql.inc on line 135

Warning: Table './david/watchdog' is marked as crashed and last (automatic?) repair failed query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:12414:\"Table './david/cache_filter' is marked as crashed and last (automatic?) repair failed\nquery: UPDATE cache_filter SET data = '<p>Recently I bought a couple of Victor 86C multimeters, they seem like nice multimeters and have the huge feature that you can plug them into a computer via a rather nifty USB cable. I run linux so I was hoping that someone had written some kind of driver for them, but it turns out they haven\\'t so I have gone about reverse engineering the \\'protocol\\' myself</p>\\n<p>It turns out that it is in /home/web/SERVERS/www.daveansell.co.uk/docs/includes/database.mysql.inc on line 135
Victor 86C multimeter USB encoding for linux | Dave Ansell Science Communication

Victor 86C multimeter USB encoding for linux

  • user warning: Table './david/cache_filter' is marked as crashed and last (automatic?) repair failed query: SELECT data, created, headers, expire, serialized FROM cache_filter WHERE cid = '2:fbabd45f4004dfc53149a2bd7da44bed' in /home/web/SERVERS/www.daveansell.co.uk/docs/includes/cache.inc on line 25.
  • user warning: Table './david/cache_filter' is marked as crashed and last (automatic?) repair failed query: UPDATE cache_filter SET data = '<p>Recently I bought a couple of Victor 86C multimeters, they seem like nice multimeters and have the huge feature that you can plug them into a computer via a rather nifty USB cable. I run linux so I was hoping that someone had written some kind of driver for them, but it turns out they haven\'t so I have gone about reverse engineering the \'protocol\' myself</p>\n<p>It turns out that it is a slightly odd protocol, I think it is essentially in some sense dumping its video state down the USB cable. Which means that this will only work for the 86C, anything with a different LCD screen won\'t work.</p>\n<p>The cable (which is actually the USB device that reads a flashing IR LED in the case) appears as an input device under linux with an id something like:</p>\n<p>/dev/input/by-id/usb-Shenzhen_VICTOR_HI-_TECH_CO._LTD._VICTOR_Multimeter-event-if00</p>\n<p>If you look at the data coming out of this it seems to be coming in lines of 24 bytes each, not thinking in hex here they are in decimal</p>\n<p><span style=\"text-decoration: underline;\">117</span>&nbsp;&nbsp;&nbsp;&nbsp; 193&nbsp;&nbsp;&nbsp;&nbsp; 178&nbsp;&nbsp;&nbsp;&nbsp; 77&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 88&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 14&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style=\"text-decoration: underline;\">51</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style=\"text-decoration: underline;\">200</span>&nbsp;&nbsp;&nbsp;&nbsp; 255&nbsp;&nbsp;&nbsp;&nbsp; 255&nbsp;&nbsp;&nbsp;&nbsp; 255</p>\n<p>The first underlined number seems to be a reading number, you get groups of lines with the same value.</p>\n<p>The second and third underlined number seems to be where the data is.</p>\n<p>The second underlined number seems to be a variable name, and the third seems to be its value.</p>\n<p>The system seems to be that the multimeter occasionally sends all the values, but mostly it only sends changes to all the variables.</p>\n<p><strong>These variables and their values:</strong></p>\n<p>Variable #46 - last digit<br />$digit1=array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 129=&gt;0,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 17=&gt;9,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 145=&gt;8,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 97=&gt;7,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 225=&gt;6,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 33=&gt;5,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 161=&gt;4,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 65=&gt;3,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 193=&gt;2,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1=&gt;1,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 88=&gt;\'?\',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 113=&gt;\' \',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 46=&gt;\' \',<br />);<br /><br />Variable #49 - second lowest digit<br />$digit2=array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 239=&gt;1,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 175=&gt;2,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 47=&gt;3,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 143=&gt;4,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15=&gt;5,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 207=&gt;6,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 79=&gt;7,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 127=&gt;8,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 255=&gt;9,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 191=&gt;\'L\',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 111=&gt;0,<br />);<br /><br />variable #43 - second highest digit<br />$digit3=array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 113=&gt;0,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 241=&gt;1,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 177=&gt;2,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 49=&gt;3,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 145=&gt;4,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 17=&gt;5,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 209=&gt;6,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 43=&gt;6,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 81=&gt;7,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 129=&gt;8,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1=&gt;9,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 43=&gt;\' \',<br />);</p>\n<p>variable #50 highest digit<br />$digit4=array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 119=&gt;0,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 247=&gt;1,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 183=&gt;2,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 55=&gt;3,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 50=&gt;4, #???<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 103=&gt;\' \',<br />);<br /><br />variable #45 where the decimal point is<br />$decimal=array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 132=&gt;1,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 164=&gt;0.1,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 196=&gt;0.01,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4=&gt;0.001,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 129=&gt;0.001,<br />);<br /><br />variable #52 the unit multiplier k,M etc<br />$unitmult=array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 107=&gt;0.001,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 105=&gt;1,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 106=&gt;0.000001,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 109=&gt;1000,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 113=&gt;1000000,<br />);<br /><br />variable #48 the unit<br />$unit=array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 145=&gt;\'V\',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 106=&gt;\'V\',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 121=&gt;\'Hz\',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 105=&gt;\'%\',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 169=&gt;\'celcius\',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 233=&gt;\'farenheit\',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 107=&gt;\'A\',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 238=&gt;\'Ohm\',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 109=&gt;\'Ohm\',<br />);<br /><br />variable #40 AC/DC<br />$type=array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 246=&gt;\'DC\',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 254=&gt;\'AC\',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 114=&gt;\'DC MAX/MIN\', <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 122=&gt;\'AC MAX/MIN\',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 234=&gt;\'Continuity\',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 106=&gt;\'Diode Test\',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 147=&gt;\' \',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 238=&gt;\' \', # resistance <br />);<br /><br />variable #42 left hand stuff<br />$maxmin=array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 104=&gt;\'MAX\',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 108=&gt;\'MIN\',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100=&gt;\'AUTO\',<br />);<br /><br />variable #41 sign of value<br />$sign=array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 35=&gt;-1,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 67=&gt;1,<br />);</p>\n<p>Attached is a very badly written php script which takes the device path of your multimeter and should output what it is reading. make sure the RS232 button is pressed otherwise it won\'t output anything useful. It has to be run as root normally.</p>\n<p>I will try and write something in a more serious language that does something more useful with the data soon.</p>\n', created = 1414787331, expire = 1414873731, headers = '', serialized = 0 WHERE cid = '2:fbabd45f4004dfc53149a2bd7da44bed' in /home/web/SERVERS/www.daveansell.co.uk/docs/includes/cache.inc on line 108.

Recently I bought a couple of Victor 86C multimeters, they seem like nice multimeters and have the huge feature that you can plug them into a computer via a rather nifty USB cable. I run linux so I was hoping that someone had written some kind of driver for them, but it turns out they haven't so I have gone about reverse engineering the 'protocol' myself

It turns out that it is a slightly odd protocol, I think it is essentially in some sense dumping its video state down the USB cable. Which means that this will only work for the 86C, anything with a different LCD screen won't work.

The cable (which is actually the USB device that reads a flashing IR LED in the case) appears as an input device under linux with an id something like:

/dev/input/by-id/usb-Shenzhen_VICTOR_HI-_TECH_CO._LTD._VICTOR_Multimeter-event-if00

If you look at the data coming out of this it seems to be coming in lines of 24 bytes each, not thinking in hex here they are in decimal

117     193     178     77      0       0       0       0       88      25      14      0       0       0       0       0       3       0       51      0       200     255     255     255

The first underlined number seems to be a reading number, you get groups of lines with the same value.

The second and third underlined number seems to be where the data is.

The second underlined number seems to be a variable name, and the third seems to be its value.

The system seems to be that the multimeter occasionally sends all the values, but mostly it only sends changes to all the variables.

These variables and their values:

Variable #46 - last digit
$digit1=array(
        129=>0,
        17=>9,
        145=>8,
        97=>7,
        225=>6,
        33=>5,
        161=>4,
        65=>3,
        193=>2,
        1=>1,
        88=>'?',
        113=>' ',
        46=>' ',
);

Variable #49 - second lowest digit
$digit2=array(
        239=>1,
        175=>2,
        47=>3,
        143=>4,
        15=>5,
        207=>6,
        79=>7,
        127=>8,
        255=>9,
        191=>'L',
        111=>0,
);

variable #43 - second highest digit
$digit3=array(
        113=>0,
        241=>1,
        177=>2,
        49=>3,
        145=>4,
        17=>5,
        209=>6,
        43=>6,
        81=>7,
        129=>8,
        1=>9,
        43=>' ',
);

variable #50 highest digit
$digit4=array(
        119=>0,
        247=>1,
        183=>2,
        55=>3,
        50=>4, #???
        103=>' ',
);

variable #45 where the decimal point is
$decimal=array(
        132=>1,
        164=>0.1,
        196=>0.01,
        4=>0.001,
        129=>0.001,
);

variable #52 the unit multiplier k,M etc
$unitmult=array(
        107=>0.001,
        105=>1,
        106=>0.000001,
        109=>1000,
        113=>1000000,
);

variable #48 the unit
$unit=array(
        145=>'V',
        106=>'V',
        121=>'Hz',
        105=>'%',
        169=>'celcius',
        233=>'farenheit',
        107=>'A',
        238=>'Ohm',
        109=>'Ohm',
);

variable #40 AC/DC
$type=array(
        246=>'DC',
        254=>'AC',
        114=>'DC MAX/MIN',
        122=>'AC MAX/MIN',
        234=>'Continuity',
        106=>'Diode Test',
        147=>' ',
        238=>' ', # resistance
);

variable #42 left hand stuff
$maxmin=array(
        104=>'MAX',
        108=>'MIN',
        100=>'AUTO',
);

variable #41 sign of value
$sign=array(
        35=>-1,
        67=>1,
);

Attached is a very badly written php script which takes the device path of your multimeter and should output what it is reading. make sure the RS232 button is pressed otherwise it won't output anything useful. It has to be run as root normally.

I will try and write something in a more serious language that does something more useful with the data soon.

AttachmentSize
victor86C.php_.txt2.19 KB
victor86C-csv.php_.txt2.24 KB