Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CPI is suspiciously high
#1
Over the weekend I built up one of Yuriy's mixed-scale kits (nicely done, by the way) and connected a "cheap" digital scale.

In order to get TouchDRO to agree with the scale I wound up with a CPI setting of 400,000.  That seems a bit ridiculous, and in addition it displays an "absolute" value.  That is, it never goes negative from zero.

That indicates to me that I have an offset in the way the (BCD?) data is being interpreted that multiplies the reading and truncates the sign.

So has anyone else seen this kind of behavior, or would someone with a similar scale be so kind as to try setting their CGI to 400,000 and see if they can duplicate it (and then tell me the value that works!)?

I intend to hook up the oscilloscope to determine the protocol and see what the data looks like, but I didn't quite get to it yesterday.

Anyway, is this a great little community or what?  I'm having a lot of fun.
Reply
#2
Well.

I may have discovered a new protocol, going by what I've found online and comparing it to what I'm seeing on the oscilloscope.

The scales that I bought output six 4-bit nybbles per reading, least-significant first. Both clock and data idle high, with data clocked on the rising edge. Each nibble takes 1ms, with 350us between nibbles, or about 8ms total to output a reading. The sign is the first bit of the sixth nybble. The very last bit is the Inch/MM mode, low for MM mode. When in Inch mode the output is the display reading scaled to 0.0005" per bit, or 2000 counts per inch. When in MM mode the output is scaled to 0.01mm per bit, so 100 counts per millimeter.

I'm still pondering how 400,000cpi falls out of that.
Reply
#3
I finally found Yuriy's write-up from four years ago that describes this format.

Setting CPI to 400,000 gives me the correct reading in Inch mode.  I'm still pondering how that scaling works out.

I hadn't tried MM mode until this morning, and it's off.  I didn't have time to check it, but I assume that it will be off by the ratio of the difference between counts-per-inch in the Inch vs MM modes, or 2000/2540.

Since TouchDRO only asks for counts-per-inch, I'm assuming Yuriy isn't supporting this protocol.
Reply
#4
As I expected, to get the right value in millimeters I have to set CPI to 508,000, which is 2540/2000*400,000.

So BIN6 protocol does not appear to be supported, or not recognized anyway, at least not on the multi-scale board that I have.
Reply
#5
(02-01-2017, 01:01 AM)Briney Eye Wrote: As I expected, to get the right value in millimeters I have to set CPI to 508,000, which is 2540/2000*400,000.

So BIN6 protocol does not appear to be supported, or not recognized anyway, at least not on the multi-scale board that I have.

Yuriy, I found two references to the BIN6 scaling on the web site in which you say the scale factor is 254000.

I installed BlueTerm and took a look at the data stream, and it's clear that the polarity isn't recognized by the MSP430.

Must be a PITA to support the different protocols.  You're a better man than I.  Must be twenty years since I first played with an MSP430.  Feels like it, anyway.  Cool little micro.
Reply
#6
Has this been resolved yet, I just hooked up an Arc Euro scale, and trying to find a solution to plus and minus values not being signed.

Joules
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)