TouchDRO Quadrature Adapter Details

Tuesday, February 9, 2016

TouchDRO Quadrature board is designed to interface standard quadrature scales to 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 controller is compatible with majority of glass and magnetic 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

TouchDRO Quadrature adapter can be purchased in three different packages from the "Pre-Made Boards" page.

Assembled board

As the name suggests, this package consists of the assembled, programmed and tested board. In order to complete the setup you will need to provide power supply, plastic enclosure, and optionally scale connectors and hook up wire.

Board with Connectors

In addition to the assembled board, the kit includes four female D-Sub (DB-9) connector and 6 ft. of hookup wire (six colors, 1ft each). To finish the setup you will need to provide a DC power supply and a plastic enclosure.

No-Soldering Kit

The kit 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.

The kit is a good option for someone who isn't comfortable with soldering, or simply doesn't have the required tool. It is also more convenient in general, since the wires aren't soldered to the board and can be plugged/unplugged for easier mechanical assembly.

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 round 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. The transformer provides mains isolation, thus eliminating a noisy ground loop.

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). If you purchased a "No-Soldering Kit" or "Board + Connectors" kit, you already have the correct connectors. In the former case 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. Otherwise you will need to solder the wires to the connector and to the board. Alternatively, you can skip the connectors all together and solder the scale cabled directly to 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.

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.

34 comments :

  1. This comment has been removed by the author.

    ReplyDelete
  2. 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
  3. 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
  4. 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
  5. This comment has been removed by the author.

    ReplyDelete
  6. 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
  7. Yuriy, how can I communicate via USB this card? I'm planning to use VB to make some measurements

    thanks

    ReplyDelete
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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