TouchDRO Adapter for Glass and Magnetic DRO Scales

Tuesday, February 9, 2016
DRO adapter for glass scales

TouchDRO adapter for Glass and Magnetic DRO Scales is used to interface glass and magnetic scales that use standard quadrature encoders to the TouchDRO Android application. It supports up to four scale inputs, directional tachometer, and touch probe input. All inputs are buffered and 5V-tolerant. Scale inputs can be either single-ended, or differential (for better noise immunity).

Scale Compatibility

The TouchDRO adapter is compatible with majority of glass and magnetic DRO scales currently on the market (up to 1um resolution), as well as many optical and magnetic rotary encoders with standard 5V RS422 output. Some of the compatible brands include Ditron, Easson, DRO Pros and many others.

Refer to your specific scale's manual to ensure that it outputs either single-ended or differential quadrature signal.

Purchase Options

The adapter board can be purchased from TouchDRO Store as a "No-Soldering" kit, which includes an assembled, programmed and tested TouchDRO board, four wiring harnesses, and four D-Sub DB-9 female housings. The harnesses have a 2x4 female connector on one side, and pre-crimped D-Sub female pins on the other side. To connect the scales you will need to identify correct pin positions (from the scale's manual) and push the pins into the housing. To complete the setup you will need to provide a power supply and a plastic enclosure.

Pin Functions

TouchDRO Quadrature Adapter Pin Functions

Mechanical Dimensions

TouchDRO Quadrature Adapter Dimensions

Assembly and Installation

Power Supply

TouchDRO board uses a common 2.1mm x 5mm center-positive DC power jack, similar to the one used by the Arduino boards, therefore any power adapter that provides 7-13V and at least 200 mA will work. If possible, I recommend using an old-style linear "wall wart" adapter with a transformer, as opposed to the newer switching ones. While the board has ample power conditioning and noise should no be an issue, the transformer provides mains isolation, thus eliminating possibility of introducing a ground loop if your scales happen to have non-isolated frames.

Grounding

Proper grounding is very important for stable operation of the DRO unit. Although industrial-grade glass and magnetic scales aren't nearly as sensitive to EMF as their capacitive counterparts, electrical noise can still cause problems. The easiest way to reduce EMF issues is to ground the board to the machine's frame. Mounting holes on the board are tied to the ground fill, as are all of the ground pins.

Axis Input Pin Functions

Inputs for the scales are located along the left edge of the board, with first axis (X) on the top and last (W) at the bottom. Each connection uses a 2x4 pin header that has the following connections:

  • Vcc - +5V supply for the scale
  • A - primary input from A channel
  • A' - complementary input from A channel
  • B - primary input from B channel
  • B' - complementary input from B channel
  • Ground - 0V (connected to the chassis ground

Inputs A' and B' are optional. If left unconnected, they will be pulled down to the ground and the readout will still work as expected. If the scales support differential output, it's recommended to use all four channels for better noise immunity. Otherwise the exposed pins of the unused wires need to be isolated to prevent them from shorting something out.

Scale Connections

Majority of the scales on the market use a standard DB-9 female connector (AKA 9 pin D-Sub) but the pinout is not standardized. If you purchased a "No-Soldering Kit" or "Board + Connectors" kit, you already have the correct connectors. All that's left to do is to identify the right pin positions, push the pins into the housing, and plug the harnesses into the board.

Pins can be slipped into the connector body rather easily

To identify the correct pin positions, refer to the scale's manual. I should either provide an illustration, or a list of pin assignments. Please keep in mind, scale pinout is not standardized and might even vary between different scales from the same manufacturer, so it's important to get the information for your particular scale model.

Some scales have pin functions etched on the body

D-sub connector pin number go from left to right, top to bottom on a male connector with wider part at the top and pins facing the viewer. Since in this case we are dealing with female connector, position it with the back facing you and wider side on top, and either push the pre-crimped pins into the identified hole, or solder the wires to the pin.

Female (back) and male DB-9 Connector

Important note: once the pins are pushed in, extracting them will require a special tool, so make sure that you are pushing the pins into right positions.

Probe and Tachometer Connections

Touch probe and tachometer share the six-pin header alongside the bottom of the board. Pin functions are as shown above. Please note, the header provides 5V and 3.3V Vcc at the two left-most pins. Since 5V is lethal to the microcontroller, care should be taken not to short those pins together, otherwise the controller will be permanently damaged.

Tachometer

The board is setup to accept a directional tachometer that has either push-pull or line driver quadrature output. For directional input connect Vcc to either 3.3V or 5V (depending on your particular sensor), A and B output, and Ground. If B is not connected the tachometer will be non-directional.

Note: there are some rotary encoders that provide open-collector (also called NPN) output that need additional parts to adapt to the board. Namely, the pins need to be pulled up to Vcc via 5K resistors.

Touch Probe

Inexpensive touch probes and tool height setters work similar to a simple electrical switch. Depending on the configuration, when the probe touches the workpiece it either opens the circuit, or closes it (normally-closed or normally-open, respectively). TouchDRO board supports (and automatically detects) both flavors.

Connecting a probe should be pretty straight-forward: connect one side of the switch to Vcc (5v or 3.3V) and the other to the probe pin. There is one nuance: some probes have an LED. If that is the case, it has to be reverse-biased (backwards), or the input won't work. To test this, connect the probe to Vcc and Ground. If the LED lights up (either when the probe is touching, or not touching), reverse the leads.

Reset Button (optional)

A useful feature of the Quadrature Adapter is the ability to reset machine origin without powering off the board. This is done by resetting the microcontroller. To add this feature you will need to connect a normally-open momentary switch between the reset pin on the programming header and the ground.

Status LEDs

The board is equipped with four status LEDs, as shown in the picture.

  • Green - power
  • Amber - 1Hz heart-beat
  • Read - touch probe (on when probe is engaged; off otherwise)
  • Blue - bluetooth

Initial Setup

Once all connections are complete, it's time to power up the board. If things go well, green LED will light up almost immediately (there might be a faction of a second delay while the capacitors are charging). A few milliseconds later amber LED will start blinking at a steady 1HZ rate (once per second), indicating that the microcontroller is working.

At the same time, depending on the state of BlueTooth transceiver, blue LED will be blinking in one of three following patterns:

  • Board not paired - two pulses per second
  • Board paired but disconnected - short pulse every 2 seconds
  • Board connected - two short pulses every 2 seconds

At this point the board can be paired to be paired with the tablet and TouchDRO will be ready for the initial setup and calibration. Please refer to this post for details on how this is done see the post "DRO Scale Calibration". Additionally, TouchDRO YouTube channel has some videos on this subject.

39 comments :

  1. Hi Yuri
    Will both of these encoders work with this board and/or the mixed scale board?
    http://www.cui.com/product/resource/amt10-v.pdf
    Ken

    ReplyDelete
    Replies
    1. Ken,
      They will. They output quadrature signal, so you will need to use quadrature firmware.
      You will also need to add pull-up resistors to the Quadrature board (or use a jumper setting on the Mixed scale kit).
      Yuriy

      Delete
    2. Hi Yuri
      Thank you for the reply.
      What is the position with the the mixed scale kit?
      I would prefer to use it as I would like to connect a caliper as well.
      Ken

      Delete
    3. Ken,
      I'm waiting for the updated set of PCBs. Once they come, I will start shipping the kits.
      With that said, you won't be able to mix these encoders with anything else. There are two options: mix of capacitive scales, or quadrature encoders only. I haven't figured out how to do both at the same time reliably.
      Thank you
      Yuriy

      Delete
    4. Hi Yuri
      My electronics theory leaves a lot to be desired so if I seem to be asking silly questions please bear with me.
      With a the mixed scale kit I could
      Fit modified calipers to all axis it would work, then at a later date I could remove all the calipers and fit the encoders if I wanted
      Ken.

      Delete
    5. Ken,
      Yes. You will need to upload a different firmware to the microcontroller, though.

      Delete
    6. Hi Yuri
      Thank you.
      I will keep looking for the mixed scale kit to be available.
      Best regards
      Ken

      Delete
  2. Hi Yuri
    Another silly question.
    Having looked at this again and thought about it the mixed scale reading calipers would cover my needs.
    But I have one axis (top slide) that would read with a amt10X encoder.
    Your blog talks about building a Quadrature encoder adapter but gives no details.
    I have a Launchpad and would like the details to build a one channel adapter.
    Can you help?
    Ken

    ReplyDelete
    Replies
    1. Ken,
      Adapter is to shift the voltage from 5V to 3.3V. It doesn't change the data format.
      You can find relevant links on this page: http://www.yuriystoys.com/p/msp430-launchpad-quadrature-dro.html.
      Yuriy

      Delete
  3. Hi Yuri
    Thank you for the link.
    One more question.
    I have worked through your "Connecting Glass DRO Scales to The Controller".
    From this I produced a circuit with a "Simple resistor voltage divider" for each A and B line to reduce the output from 5v to 3.3v.
    You talk about fitting 20Kohm and a 33Kohm resistor.
    Which goes first or does it not matter?
    This is certainly making my 71 year old brain work overtime.
    Thanks
    Ken

    ReplyDelete
    Replies
    1. Ken,
      20KOhm should be connected to Vcc (5V) and 33KOhm should be connected to the ground. In the middle voltage will be around 3V.
      Thank you
      Yuriy

      Delete
    2. Hi Yuri
      Thank you for the info, got it all worked out now.
      Just placed an order for the mixed scale kit, to wing its way to the U.K.
      Hope the sales of kits are a success. after all the time and effort you put in (dealing with my silly questions) you deserve all the reward you can get.
      Keep up the good work
      Best regards
      Ken

      Delete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Hello Yuriy, really amazed here with your work, the thing is I'm planning to add your DRO system to my CNC router, but I need to measure pieces like lengths (2 points) and diameters (3 points and calculate distance to center), I noticed that a touch probe can be added to the system but how? I downloaded the software in my cellphone but can't find the option for the probe, already have a 2mm espherical touch probe that I'm using with mach3 to digitize, thanks in advance

    ReplyDelete
  6. Yuriy, how can I communicate via USB this card? I'm planning to use VB to make some measurements

    thanks

    ReplyDelete
  7. When is the next batch of the assembled boards coming in? I'm getting my glass scales next week and wanted to try your board and software.
    This is just what I'm looking for!
    Thanks,

    ReplyDelete
    Replies
    1. The ETA I have from the assembly house is August 5th. It will take a few days for me to upload the firmware, test them etc., so Monday, August 8th is a good bet for them being ready for ordering.

      Delete
  8. Thank you! I'll put it on my calendar and check back.

    ReplyDelete
    Replies
    1. I feel like a little kid....did they come in? Are they going to be ready to ship on Monday??
      Let me know if you get them ready early!
      Thank you,

      Delete
    2. Sorry, missed your post. I have the boards (got them today in the morning). I have a few flashed and tested, ready to ship.
      Regards
      Yuriy

      Delete
  9. Hello Yuriy! I have Sony Magnascales (SR50) on my milling machine but no display, what are my options? Best regards, John

    ReplyDelete
    Replies
    1. I'm also interested in options for Sony Magnescales. Thanks

      Delete
    2. Jason (& John),
      I have no clue what protocol Sony Magnescales use. If it's standard quardature, then it's an easy connection. Otherwise they are not supported.
      Thank you
      Yuriy

      Delete
  10. Hi Yuriy,
    Do I need to purchase the mixed scale kit and add the quadrature adaptor or is the 'adaptor' a complete solution?

    ReplyDelete
    Replies
    1. Robert,
      Quadrature adapter is a complete solution.
      Thank you
      Yuriy

      Delete
  11. Hi Yuriy,

    With all the choices available for enclosures out there, can you recommend one for this PCB? Trying to find one that had the mounting bosses inside that line up with the dimensions of the mounting holes as shown in the diagram above, but the search has been frustrating...

    ReplyDelete
    Replies
    1. There isn't one that will fit the hole pattern that I know of. You can get one that is larger and use standoffs.
      That said, I'm working on a "turn-key" version that will ship almost fully assembled and in an enclosure, but that's still a few months down the road.
      Regards
      Yuriy

      Delete
    2. Thanks for the quick reply! Thought I would ask before going with the bigger box & standoffs... Looking forward to getting this up and running!!

      Delete
  12. Hi Yuriy,

    I bought the quadrature plain board, and intended to interface it to a tablet with USB, however it looks like there's no USB header on the board? Is it possible to interface with USB? The entire assembly is going in an all metal enclosure, so bluetooth reliability is going to be an issue.

    Cheers,

    Pete

    ReplyDelete
    Replies
    1. Pete,
      UART Tx/Rx pins are available on the 6 pin header next to the BT module. You will need to [at lest] remove the resistor on the reset pin of the BT module, or better yet, the whole module.
      Regards
      Yuriy

      Delete
  13. Hi Yuriy,

    I have received the Quadrature adaptor and connected successfully with a Pine64 SBC.

    Question, is there any way to simulate the RS422 signals to prove the inputs are all functional?

    I am awaiting delivery of my scales in a couple weeks.

    Thank you.
    Andy

    ReplyDelete
  14. Yuri,
    I have successfully connected 2 GCS898 Scales from HXX to my interface board. I already have an iGaging scale on my mill for the Z-axis. How can I connect it to the TouchDRO Quadrature Adapter? Thanks for an excellent product.

    ReplyDelete
  15. Hi Yuriy,

    Do you have available two TouchDRO Quadrature no-soldering kit for delivery next friday (march 09) ? Thank you. Paulo

    ReplyDelete
    Replies
    1. Paulo,
      I have the boards in stock, but I'm not sure I can get them to you by Friday.
      Thank you
      Yuriy

      Delete
  16. Yuriy-

    First of all, I love touchDRO. Installed it on my mill with iGaging scales. I initially used the scales on my lathe, using the absolute models, which worked great. I tried the cheAper ones on my mill and haven’t been thrilled by the results. They arnt nearly as well made as the absolute and seen to have issues on my setup. I am seriously considering using Ditron magnetic scales, I just got a quote and they aren’t that much more than I’d spend to buy the iGaging absolute dros. I’m currently using a bluDRO, so I’m going to need a new board to make it work- I assume I’d want a quadurature board for these scales? Do you know of anyone using them?

    Any plans for further additions to the app? I love it so far. Really cool running it on an 11” tablet, I can actually SEE the display.

    ReplyDelete
  17. Yuriy, i plan to buy your dro (quadrature encoders version for glass scales). I have a guestion as it is for my bridgeport style milling machine and i'm going to have two encoders for Z axis: one on the knee (5um resolution glass scale) and angnetic strip encoder on the quill. Unfortunately magnetic scale has a greater resolution. Is it ppossible to connect both these encoders to your DRO and combine the reading so no matter if i use quill or knee i get the right relative distance measurement between the spindle nose and the table??? Please repla asap.

    ReplyDelete
  18. Yuriy, I am a current user of touchdro android system on my mill. Love it very much.
    On my big lathe I wish to use rotary encoders by US digital model H3. The units have five wires so am perplexed by the missing wire? Please advise if this unit will use these encoders?
    Thank you
    Walter

    ReplyDelete
  19. Is this project still active? Do you leave the programming capability intact on this board? WHY? I would like to repurpose one of the inputs myself to support a load cell..

    ReplyDelete