Shahe 5403 and 5204 Digital Linear DRO Scales Overview

Sunday, January 6, 2019

For several years the so-called "remote DRO" capacitive scales, manufactured by Wenzhou Sanhe Measuring Instrument Co.,Ltd. have been the mainstay of budget do-it-yourself DRO setups. These scales first appeared in the USA around 2011 under iGaging brand as "DigiMag Remote DRO" or "DigiMag" but then started showing up all over the internet under various brand names, including AccuRemote, Shars and unbranded generic version. A few years ago iGaging has redesigned the display of the scales and rebranded them as EZ-View DRO. Around the same time Shanhe introduced two new models of the Remote DRO scales that look rather similar to the original model but have several key differences.

A few months ago I ordered a couple different lengths of each scale in order to test and reverse engineer the communication protocol, and finally was able to get to it over the holiday break. In short, these scales would work very well for a budget DRO build, but require different firmware to decode the position. As I'm working on adding the support to the firmware, let's take a closer look at the data format these scales use and other important characteristics.

Overview

New DRO Scales Next to Original iGaging DigiMag

The new scales are listed on Shanhe's website under the "Digital Linear Scales" category and have model numbers 5403-xxx and 5204-xxx. The digits after the hyphen denote the measurement capacity in millimeters. At the time of this writing there are six available lengths for each scale: 150, 200, 300, 500. 600, and 1000mm. Shanhe calls these scales "Digital Linear Scale with Remote Display" and "Digital Linear Scale with Remote Square Display" respectively, but other sellers use a variety of difference names.

The main differences between the two models lay in the display units. The 5204 series scales come with a round display head, whereas 5403 use a rectangular display that is similar to the classic iGaging scales. Other than that, the two models are functionally identical. There also appear to be at least two different revisions of the round head scale: a version with the cable hard-wired on both ends and a version with Mini-B USB connector on the reading head. Internally the hard-wired version uses the same transducer PCB as the "Square Display" version, whereas the one with a USB connector uses a PCB that seems to have been repurposed from the "Vertical Type Digital Linear Scale" (5401) model.

"Round Head" scale has two styles - with and without USB connector

Regrettably, for some reason Shanhe chose to use two different wiring schemes. Not only is the wiring different from the classic DigiMag scales, it's also completely different between round and square head models. Furthermore, the new scales use USB Mini-B connectors rather than Micro-B that has been used by iGaging for at least 3 years. Fortunately, though, both models use 3V supply voltage with grounded frames, just like the other "Remote DRO" scales, so mixing and matching scale models will not pose any problems.

Shahe went back to USB Mini-B connector
Older version of the PCB (right) seems to be repurposed from 5401 scale

Data Format

You might recall from this post that the classic iGaging scales use a scheme where the display provides clock signal and the scale sends the data as an integer in 21-bit "complement of two" representation. The new scales use a different approach - the reading head provides its own clock and sends the data in a 24-bit stream using a BCD protocol with a stream consisting of six 4-bit niblets. This is in fact the same protocol as the one used by the inexpensive Chinese calipers sold by Harbor Freight, Princess Auto and alike. You can find more about this particular protocol in my "Harbor Freight Caliper Data Format" post from a few years ago in the post detailing Harbor Freight Caliper Data Format.

There are a few important differences, though. First and foremost, the reading head doesn't stop sending the data when the display is turned off. Second, the new scales don't switch between inches and mm, and always send the position in hundredths of a millimeter. Finally, and most importantly, the data stream is a mirror image of the one sent by the calipers.

Besides being incompatible with the current TouchDRO firmware, this protocol is problematic due to the fact that there is no easy way to distinguish it from the one used by the calipers, so having support for both in the same firmware version is unlikely.

Scale Specs

The scales have native resolution of 10 micron, which is much better than the arbitrary resolution used by the iGaging scales (technically it's about 1% lower, but being natively aligned to microns will eliminate all sorts of rounding and interpolation problems). One area where these scales fall behind is the refresh rate. Igaging scales can easily be pushed to update 50 times per second; in contrast the new scales refresh the position only about 10 times per second (at 9.6Hz to be precise).

As far as accuracy goes, the information is pretty sparse to non-existent for these scales and there seems to be a lot of misinformation. The table below (lifted from the Shahe site) list "accuracy" for various lengths, but the information looks very suspect for a few reasons. First, in my experience the error on these scales is usually linear, so error at 1000mm would generally be 10x more than error at 100mm. Second, 0.008" over almost 40" is a bit too good for capacitive scales with aluminum frame. For comparison iGaging lists 0.002" per 6" and 0.013 for 36". Based on my rather rudimentary testing of three samples, the scales seem to pretty consistent and don't exhibit discernible non-linear error. Over the 500 mm length I got 0.008" discrepancy between my micron-resolution glass scale. Fortunately the error I was seeing was very linear, which can easily be corrected in TouchDRO.

Image courtesy of http://www.shahemeasuring.com

As a side-note, I noticed that many sellers advertise these as "Absolute" scales, which is wrong and misleading. While the scale display has "absolute" mode, the encoder is not an absolute encoder. This can be easily confirmed by moving the scale to an arbitrary position and briefly unplugging the USB cable. You will see that the position jumps to 0, which an absolute scale would not do. Similarly I've seen these sold as "magnetic" or "magnetic design". This is incorrect as well. There is a magnet in the display to make it easier to mount on the machine, but the scales are capacitive, not magnetic.

Consideration for DIY DRO Use

Although incompatible data format is definitely a bad news, there is some silver lining. First and foremost, the fact that the new scales use 3V supply voltage will make it much easier to interface them to the MSP430 controller without the need for voltage translation. Moreover, the frames of these scales are grounded just like the iGaging variants, so mixing and matching those scales will not pose the risk of shorting Vcc to ground.

Therefore, ignoring the protocol incompatibility, which I will have to address with a firmware update, these scales look very promising for DIY digital readout usage. Below is the short list of pros and cons for these scales. Please keep in mind that we are not comparing them to glass scales, since they are in a completely different price and performance range. These are pros and cons are in comparison to the capacitive scales, particularly iGaging DigiMag and EZ-View.

Pros

  • Inexpensive and readily available in most parts of the world; a set of these scales can be ordered from Amazon, eBay or AliExpress for around $100 for most machines.
  • Grounded frames and 3V power supply, means that they a compatible with other 3V scales and are less noise/interference prone than 1.5V scales
  • Native 10 micron resolution will likely reduce [or eliminate] the flickering of the last digit and any interpolation/rounding errors
  • Always on data stream and no unit switching (compared to digital calipers and some other Chinese scales) eliminates the need for various hacks to keep the scales from timing out and turning off

Cons

  • Low refresh rate of 9.5 Hz; anything below 20 Hz can feel laggy with faster traversal speeds*
  • Use Mini-B USB connectors and arbitrary pinout means that connecting them to the TouchDRO controller will require some soldering
  • Unshielded USB cables might need to be replaced and properly shielded to avoid interference

* This is somewhat mitigated by not needing a digital flicker filter, so perceived refresh rate will be similar or even better than iGaging scales with filter enabled.

Summary

To recap, even though the scales share some similarities with the older iGaging DigiMag scales, such as the aluminum frame with plastic head, remote DRO display and 3V power supply. On the other hand they are very different, and use a completely different data format and communication protocol, making them incompatible with the existing TouchDRO firmware.

It's also important to note that these are not absolute scales, contrary to how many sellers advertise them. By being always on they don't loose position when the display is turned off, but when the battery is removed they reset to zero.

Nevertheless, they have some properties that make them a great candidate for a low cost do-it-yourself DRO, such as stable readout with 10 micron resolution, always on data stream and lack of unit switching. On the other hand they have only one serious drawback - the sluggish 9.5Hz refresh rate that might feel laggy during fast movements.

12 comments :

  1. Hi Yuriy!
    When will a SHAHE 5403-300 scale firmware be available?

    ReplyDelete
    Replies
    1. Hi Yuriy!
      When will a SHAHE 5403-300 scale arduino firmware be available?

      Delete
    2. Hi,
      I'm not maintaining the Arduino version anymore. Rysiu. M took over it a few years ago, so I'm leaving it up to him. I will have it in the iGaging board firmware in a week or two (testing right now) and when the new version of the App is ready, in the "Mixed Scale" firmware (V2)

      Delete
  2. Hi Yuriy,
    thank you very much for your articles. I have one question:
    How to recognize the first bit in data trasmittion. I am not able to find this information (not only in your articles, but also on internet in general), an i do not have enough knowledge and equipement to do reverse engineering.
    Than you very much in advance.
    Mat

    ReplyDelete
  3. Hi Yuri,

    First of all thanks for this great project! What's the cpi of these scales?

    ReplyDelete
  4. Hi Yuriy
    Firstly, thank you for all your efforts.
    I have purchased from the Shahe store a set of their Model 5403 - xxx scales with the rectangular read out and Mini USB connectors. I have also purchased a TI Launchpad and HC06 module.
    The launchpad and module connect to your app. However, when I plug in the scales there is zero in the way of indication. I have tried loading both the Basic and the Universal versions and get the same result. I have also tried switching the clock and data feeds but still zero read out. The scales work fine wioth their own displays but I note they use a different protocol for the USB pin out with VCC and Gnd on the two center pins. Any ideas how I might get the scales to provide data please.
    Cheers
    Peter R

    ReplyDelete
    Replies
    1. Peter,
      Support for these scales is not in free firmware yet. Universal firmware "might" work if some scales (it depends on the revision), but it might have issues handling negative positions.
      Thank you
      Yuriy

      Delete
  5. Hi Yuriy
    Thanks for the quick response. I will try again with the Universal firmware.
    If that doesn't work can you advise when firmware might be available. Alternatively can I use one of your Touch DRO Adapter boards if I provide my own USB Mini breakout boards? Noting that I am in New Zealand, I need to know if the last option will work.
    Thanks
    Peter

    ReplyDelete
  6. Hi Yuriy
    Universal didn't work. Do you have a response to my two other questions above please.
    Thanks
    Peter

    ReplyDelete
    Replies
    1. Peter,
      Didn't work in what way? No readout or incorrect readout? The scales use [almost] BIN6 protocol. With correct connection you should be getting a reading but negative number handling would be incorrect. If you got no readout at all, please double-check the wiring.
      I don't have a timeline for making the firmware free yet. I am trying to recoup my time and expenses before it will be available, and given that my sales are very unpredictable, I can't say when it will be.
      The board "should" work with your scales. I tested the firmware with several different revisions and they all work. So far I haven't heard of any issues, but that said, Shahe is known for changing things around, so your mileage will vary.
      You can use your own Mini-B breakouts with the board.
      Regards
      Yuriy

      Delete
  7. Hi Yuriy.

    Thanks for going into such detail on these scales. Unfortunately I seem to have ended up with a set of them, there was no information on the listing.

    They seem to repeat very consistently though I'm not sure if this is different from the standard igaging type scales.

    I will likely be ordering a set of the correct type to interface with my Arduino adapter, do you know of any reliable way of making sure the ones I get are the 21bit type rather than the BIN6 protocol?

    Thanks for your hard work on this project!

    ATB, James.

    ReplyDelete
    Replies
    1. James,
      They look different. I don't know if anyone still sells old-style 21-bit scales. iGaging switched to EZ-View (larger display), and the oder DigiMag style displays seem to have disappeared. (at least in the US).
      Regards
      Yuriy

      Delete