Micro Measurement Display 0 (µMD0)

Minimal System for Homodyne Interferometers using Single Frequency Lasers,
Linear and Rotary Encoders, and Ring Laser Gyros

Installation and Operation Manual

Version 1.11 (28-Jun-21)

Copyright © 1994-2021
Sam Goldwasser and Jan Beck
--- All Rights Reserved ---

For contact info, please see the Sci.Electronics.Repair FAQ Email Links Page.

Reproduction of this document in whole or in part is permitted if both of the following conditions are satisfied:
  1. This notice is included in its entirety at the beginning.
  2. There is no charge except to cover the costs of copying.


Table of Contents


Preface

Author and Copyright

Author: Samuel M. Goldwasser

For contact info, please see the Sci.Electronics.Repair FAQ Email Links Page.

Copyright © 1994-2021
All Rights Reserved

Reproduction of this document in whole or in part is permitted if both of the following conditions are satisfied:

1. This notice is included in its entirety at the beginning.
2. There is no charge except to cover the costs of copying.

DISCLAIMER

µMD0 is intended as in "intro level" system for use in hobbyist, experimental, research, and other applications where a bug in the hardware, firmware, or software, will not have a significant impact on the future of the Universe or anything else. While every effort has been made to avoid this possibility, µMD0 is an on-going development effort. We will not be responsible for any consequences of such bugs including but not limited to damage to the construction crane you picked up on eBay for $1.98 + shipping, financial loss from ending up in the Antarctic when the compass orientation provided by your home-built ring laser gyro was off by 1,536 degrees, or bruising to your pet's ego from any number of causes directly or indirectly related to µMD0. ;-)

Acknowledgment

Thanks to Jan Beck for providing support for enhancements and bug fixes and tolerating my silly C coding questions. He was also instrumental in developing the initial µMD1 firmware and GUI. And for getting me interested in actually getting involved in that project. If anyone had told me six months ago that I'd be writing code in C, MIPS assembly language, and Visual Basic - and enjoying it (sort of) - I would have suggested they were certifiably nuts. ;-) Jan maintains the master GUI source code as well as slightly different versions of both the µMD1 and µMD2 firmware and a development blog on these and other projects.


Introduction

Note: Links to Web pages external to this document will open in a single separate tab or window depending on your browser's settings.

µMD0 is a very inexpensive system for precision readout of displacement (change in position), angle, straightness, and more in metrology applications using (homodyne) interferometry with single frequency lasers, as well as devices like linear and rotary encoders which produce Quad-A/B signals.

While targeted for experimenters, hobbyists, and researchers, there is no reason why µMD0 can not also be of value in science and industry. The hardware platform is a readily available very inexpensive microcontroller development board which communicates via USB to a Windows PC, laptop, netbook, or tablet.

The graphics below show a rotary optical encoder which uses a pair of LEDs and photodiodes physically offset by 90 degrees to generate Quad-Sin-Cos analog signals which are then thresholded to yield Quad-A-B digital signals. The specific type of sequence is called a "Gray" code (not based on color but attibutable to someone named Frank Gray) and has the property that any possible allowable change in value is a change in only a single bit. This eliminates the ambiguity with sensors using the normal binary order where two bits can change at not quite the same time.


Rotary Encoder Digital Signals as a Function of Orientation

(The animated encoder graphic seems to be all over the Web. If anyone knows who the original copyright holder is, I will acknowledge them.)

Many other types of encoders produce similar signals. They may use optical, mechanical, or magnetic sensing, among others.

The input to µMD0 are the digital signals which can have change rates of up to 100 kHz ore more. There is no support for analog inputs (other to convert them to digital form by thresholding) now and never will be. However, there are hardware quadrature interpolators available that go in-line with the analog signals to multiply the effective resolution by anywhere from 2 to 1,000 or more, so they are a possible option were higher resolution is required. Those made by Renishaw are relatively inexpensive on eBay. There are also ICs available that perform this function. But if you're willing to that much effect, it would probably be worth using µMD2 instead of µMD0 since it has no practical upper limit on the input change rate.

For use with interferometers, the only difference is that the origin of the analog signals are from a different type of detector:


Typical Homodyne Interferometer Setup with Stabilized Single Frequency HeNe Laser using µMD0

This also applies to devices like Ring Laser Gyros (RLGs) which have similar types of detection schemes.

Where the Path Length Difference (PLD) between REF and MEAS is less than a few cm, the HeNe laser doesn't even need to be stabilized or single frequency:


Typical Homodyne Interferometer Setup with Unstabilized Multi-Longitudinal Mode HeNe Laser using µMD0

This can be either a linearly polarized HeNe with its polarization axis at 45 degrees (no LP required), or a random polarized HeNe oriented so that its orthogonal polarization axes are at 0/90 degrees with the external LP at 45 degrees. In the latter case, it may be necessary to assure that the laser is well behaved - not a flipper; such a laser may be noisy around the flip points.

The interferometer produces (ideally) sinusoidal analog signals in quadrature that are thresholded to produce the Quad-A-B digital signals used by µMD0.


Typical Quad Decoder Signals as a Function of Time and Displacement Direction
(Scope Triggered on Rising Edge of Channel A Signal)

The appearance of the actual waveforms as the remote reflector is moved with the scope triggered on Channel A. The relative phase of Channel A and Channel B would be close to plus or minus 90 degrees depending on the direction of movement.

For homodyne, the native resolution of single-pass interferometers is 1/8th wavelength, usually 633/8 or ~80 nm. But depending on the optics, this may be doubled or quadrupled without requiring interpolation. Specifically, the Linear Interferometer (LI, shown above) and Single Beam Interferometer (SBI) have a native resolution of ~80 nm; the Plane Mirror Interferometer (PMI) and High Stability Plane Mirror Interferometer (HSPMI) have a native resolution of ~40 nm, and the High Resolution Plane Mirror Interferometer (HRPMI) has a native resolution of ~20 nm. It is theoretically possible to convert a PMI or HSPMI into an HRPMI with the addition of a cube corner but the alignment could be quite hairy.

Note that µMD0 refers specifically to the combination of the Atmega-based hardware and firmware. µMD1 and µMD2 use much higher performance hardware (see references). It's possible there could be µMD3, .... µMDn in the future using the same GUI. :)

This document provides assembly, installation, and operating instructions for the µMD0 hardware and software. The simplest way to do this is using a solderless breadboard or prototyping board. The entire parts cost excluding an antique PC is well under $10. (Probably $25 if purchased from me, which includes friendly tech support). There is a custom SG-µMD0 PCB available which makes the resuilt more professional. Around $35 including that. ;-) There is a link later in this manual to "Heathkit™-type" step-by-step assembly instructions for the PCB version.

It is assumed the reader is familiar with homodyne interferometry. Linear and rotary encoders generate signals similar to those from homodyne interferometers. If not, back up and start with Sam's Laser FAQ: Interferometers for Precision Measurement in Metrology Applications.

Mote: Throughout this document, "µMD0" to the Atmega-based hardware. "µMD" refers to the Windows Graphical User Interface (GUI), which is identical to that for µMD1 and µMD2.


Specifications

Specifications are subject to change without absolutely any notice even to the developers. :-)


Computer and Operating System Requirements

Everything that follows assumes the use of Windows. If you're really smart and run Linux instead, sorry. ;-) (However, the GUI may run on Linux under something called "wine" so there may be hope.) The µMD GUI is known to work under Win XP, Vista, 7, and 10, and should be fine on Win 8 as well. Microsoft Net Framework 4.0 or higher is required to run the µMD GUI. Net 4.0 or a more recent version is probably on your computer already but is available free from the Microsoft Web site.


Wiring Diagram and Parts List using Solderless Breadboard

Since the Nano does most of the work, the only additional parts needed are to interface to the encoder or laser. And some very simple circuitry will suffice to get started - or forever. If higher performance is needed, consider using µMD2 instead. Some typical basic circuits are shown below:


Minimal Parts Count Input Circuits

A slightly more detailed schematic may be found at µMD0 Sin-Cos Analog and RS422 Digital Interfaces. (This is the one used for the SG-µMD0 PCB.)

The LM393 is an 8 pin DIP so it, along with the Nano and other parts, will easily fit on the typical 250 column 2-1/4 x 3-1/4 inch solderless breadboard with room to spare, but a custom PCB is also available for the interface as well as one for a Quad-Sin-Cos Decoder. For a distance of up to a foot or so, simple wires will suffice at the modest speed of µMD0.

                 

Quad-Decoder on Custom PCB (Left), µMD0 on Solderless Breadboard (Left-Center), µMD0 on Custom PCB (Right-Center), Screenshot of Linear Stage Movement (Right)

The Quad-A-B Differential version (RS422) is even simpler. The input cables can be long and also be twisted with a single 100 ohm resistor between the two inputs for termination, but there needs to be a common ground connection somewhere. While the UA9637 is essentially a voltage comparator with built-in hysteresis, it CANNOT be used with photodiode inputs because its bias current is too high. The difference in resistor values for the red and green LEDs balances their brightnesses, mostly. Of course, the LEDs aren't *really* essential. ;-)

Tne value of 100K for the photodiode load resistors has been selected as suitable for the typical ~1 mW SLM laser to result in the signal going from near 0 to around 3 V. It's not necessary to have them be adjustable since the threshold settings are adjustable. But you can if you wish, and of course change their value to reflect the real world situation of your laser power and losses in the Quad decoder. If the source is differential analog (typically each 1 V p-p), the signals can go directly to the comparator inputs dispensing with the load resistors and trim-pot.

It is not anticipated that later versions will differ in any major way. This is supposed to be bare bones after all. ;-)

Parts List

Here are the very long detailed parts lists. :) The numbering refers to schematic above:

Analog version:

 Prt#  Description                 Comments
----------------------------------------------------------------------------
 MPB1  Atmega 328 NANO             Arduino board with pins already soldered

  SB1  Solderless breadboard       3-1/4 x 2-1/4 inch, 250 columns

 PCB1  SG-µMD0 V1.0 PCB            Custom PCB
 PCB2  Quad Decoder V1.0  PCB      Custom PCB

  U1   LM393P, 8 pin DIP           Dual voltage comparator

 LED1  LED, red                    Thresholded Sin, A
 LED2  LED, green                  Thresholded Sin, B

  R1  Resistor, 100K,              Sin (Channel A) load resistor
  R2  Trim-pot, 10K                Sin (Channel A) threshold
  R3  Resistor, 100K,              Sin (Channel A) trim-pot isolation
  R4  Resistor, 470K,              Sin (Channel A) hysteresis
  R5  Resistor, 2-3K,              Red LED current limiting

  R6  Resistor, 100K,              Cos (Channel B) load resistor
  R7  Trim-pot, 10K                Cos (Channel B) threshold
  R8  Resistor, 100K,              Cos (Channel B) trim-pot isolation
  R9  Resistor, 470K,              Cos (Channel B ) hysteresis
 R10  Resistor, 30-50K,            Green LED current limiting

 PD1  Silicon photodiode           Sin (Channel A) of Quad-A-B detector
 PD2  Silicon photodiode           Cos (Channel B) of Quad-A-B detector

 SKT1 30 pin 0.6" DIP socket       For Nano (PCB version only)
 SKT2 8 pin 0.3" DIP socket        For LM393 (PCB version only)

 STB1 4 pole screw terminal block  Photodiode bias and inputs

RS422 version:

 MPB1  Atmega 328 NANO             Arduino board with pins

  SB1  Solderless breadboard       3-1/4 x 2-1/4 inch, 250 columns

 PCB1  SG-µMD0 V1.0 PCB            Custom PCB*

  U1   UA9637 or UA9639, 8 pin DIP Dual RS422 line receiver

 LED1  LED, red                    Channel A
 LED2  LED, green                  Channel B

  R1  Resistor, 100,               Channel A termination resistor
  R2  Resistor, 100,               Channel B Termination resistor
  R3  Resistor, 2-3K,              Red LED current limiting
  R4  Resistor, 30-50K,            Green LED current limiting

 SKT1 30 pin 0.6" DIP socket       For Nano (PCB version only)
 SKT2 8 pin 0.3" DIP socket        For LM393 (PCB version only)

 STB1 6 pole screw terminal block  A/B inputs, external power, and ground

* All fixed resistors are 1/8 W for PCB. A kit with no PCB may ship with 1/4W resistors which are easier to use.

For this simple setup, a wireless breadboard with 25 columns (400 tie points) should be adequate. The Nano with soldered pins can plug in at the right side with the USB connector facing out, and the LM393 and associated components can be placed next to it. Those connections that cannot be made with component leads should use pieces of #22-#24 AWG solid wire.

The "cables" for the photodiodes can simply be twisted pairs. Keep them short but a foot or so should be fine. If the source is something else like a commercial optical detector or signals from a self-contained laser/interferometer, a different type of termination than the load resistors may be needed.

For more information on the Quad decoder and interface, see Construction Guidelines for Basic Quadrature-Sin-Cos Decoder and Quad-A-B Interface Kits. Some of it is redundant but there are more detailed instructions on mounting the optical parts and the actual circuits and wiring.


Detailed Heathkit™-Style Assembly Manual for PCB Version

With so few parts to install, this may seem silly for anyone with basic experience in electronics assembly, but for everyone else it won't hurt. ;-) Go to Assembly Instructions for the SG-µMD0 - RS422 and Analog Inputs.


The µMD0 Firmware

Latest Versions of the Firmware

The (non-Alpha) versions of the firmware are absolutely guaranteed to be new and improved in terms of features, capabilities, and performance. This probably means there will be some new and improved bugs as well. The Alpha versions are even more likely to have some juicy bugs. However, the µMD0 firmware is so simple that bugs would have difficulty hiding. ;-) Please contact us via the link at the top of this page should any dare to appear (or for any other legitimate reason). ;-)

Firmware Hardware Assignments and Communications Format

Pins are labeled on the Atmega PCB. Here are the main signals for homodyne:

   Input    Interrupt  Arduino Pin  Nano Pin
 --------------------------------------------
    1A          0          D2          5
    1B          1          D3          6

The LED on D13 is used as the heartbeat/status indicator for homodyne depending on firmware version. Currently it blinks at between a 1 and 2 Hz rate, more or less.

There's probably little need to know the following unless something goes wrong. Only marginally relevant ones are shown here:

   Pin   Arduino Labeling     Homodyne
 --------------------------------------
  U1-1         TX0              TX0
  U1-2         RX0              RX0
  U1-3         RST              RST
  U1-4         GND              GND

  U1-5         D2               1A
  U1-6         D3               1B

  U1-16        D13          Stutus LED

  U1-17        3.3V             3.3V
  U1-27        5V               5V
  U1-28        RST              RST
  U1-29        GND              GND
  U1-30      VIN (5V)         VIN (5V)

Most of these details are really only relevant if there is a desire to modify the firmware. For the firmware provided, only the pin assignments matter.

Here is the communications format between the firmware and GUI. This information is of little relevance if using the GUI, but will be useful if writing your own application software or for data analysis. Each of the values is sent as an ASCII string representing a signed (if needed) decimal number separated by spaces at the sampling rate. The firmware maintains a FIFO buffer so that if the USB data is delayed for some reason, no data should be lost (hopefully):

The same format is used for both homodyne and Heterodyne modes but not all fields will be filled in or relevant for homodyne.

 Standard (Single Axis) Data (8 values):

   0: Axis 1 Count/REF Frequency Count* = REF frequency/Sample Frequency
   1: MEAS Frequency Count 1* = MEAS 1 frequency/Sample Frequency
   2: Displacement 1 (in 1/2, 1/4, or 1/8 wavelength)
   3: Velocity Count 1 = (Displacement 1 - Previous Displacement 1)/Sample Frequency
   4: Phase 1 = Signed fractional offset between Displacement increments.  The
      typical range is -128 to +127 (8 bit 2's complement).

      If Phase is not valid, then an error code is sent instead (heterodyne
      only):

        0x200 = no counter 1st REF
        0x400 = no counter 2nd REF
        0x800 = no counter MEAS 1
        0x1000 = no PORTB 1st REF
        0x2000 = no PORTB 2nd REF
        0x4000 = no PORTB MEAS 1

   5: Sequence Number (Unique serial number for each sample)
   6: LowSpeedCode (See below)
   7: LowSpeedData (see below)
 
   The following 8 values will also be sent when Multiple Axis Mode is active:

   8: Axis 2 Count/MEAS Frequency Count 2*
   9: Displacement 2
  10: Velocity Count 2
  11: 0/Phase 2
  12: Axis 3 Count/MEAS Frequency Count 3*
  13: Displacement 3
  14: Velocity Count 3
  15: 0/Phase 3

  LowSpeedCode (specifies contents of LowSpeedData):

     0-99: GUI Data/Control:

      0: No Data
      1: Laser Power
      2: Signal Strength
      3: Temperature 1 (XXX.YY, °C, 0 to 70.00)
      4: Temperature 2 (XXX.YY, °C, 0 to 70.00)
      5: Pressure (XXX.YY mBar, 500.00 to 2000.00)
      6: Humidity (XXX.Y percent, 0 to 100.0)

      8: Sample Frequency (XXX.YY Hz)

     10: Firmware Version (XXX.YY)

     20: Homodyne Interferometer (if non-zero)
          Low byte: # homodyne axes
          Next byte: counts/cycle (4 for quadpulse)

     (Not all of these are currently implemented.)

   100-199: Diagnostics

   200-255: Reserved

* The REF and MEAS Counts are the incremental change since the last sample, NOT the total value.


Loading the Arduino IDE

If you purchased the from me directly, or via eBay, the latest released version of the firmware has been preloaded. However, this step also installs the USB serial driver which is NOT the same as the one used with µMD1 or µMD2. It's worthwhile to load the Arduino IDE anyhow just in case the firmware needs to be updated or you would like to hack it (which which remarkably, for µMD0 is encouraged. Support may or may not exist depending on what you are attempting to do.

The Arduino IDE will work with all versions of the firmware. It can be downloaded free from the Arduino Web site and saved to your Downloads directory any other convenient location. Then unzip the executable and run Setup. There is no actually installation, it will just unpack and copy files to the selected Arduino program directory. (Usually something like "Program Files"). Name it the version number. Currently the latest version is 1.8.13.

Plug the board into any available USB port.

Before the Atmega board can be used, a Windows device driver must be installed to enable upload of firmware and communications with the µSLC1 GUI.

There are many ways of doing this - some which may be overly complex, but what I've done for the Atmega 328 Nano 3.0 board is to go to Arduino Software and install the current version of the Arduino IDE (V1.6.9 as of May 2016). (I'm not sure if the board needs to be plugged in to a USB port during this process, but mine was. During the install process, it will ask to install the drivers. Reply "Yes" to all its requests. When the Arduino IDE is started for the first time, go to "Tools", "Board", and select "Arduino Nano". If the Nano is plugged in, its COM port should appear under "Tools", "Port". If you received the Nano from me, it will have µMD0 firmware. Go to "Tools", "Serial Monitor". The Serial Monitor windows should appear and after a few seconds start pumping out data from the board. Select a baud rate of 115200 (assuming firmware Version 2.09) to turn it into something meaningful. With no laser, the data should look something like:

  0 0 0 0 0 18016 0 0
  0 0 0 0 0 18017 10 124
  0 0 0 0 0 18018 8 100000
  0 0 0 0 0 18019 0 0
  0 0 0 0 0 18020 0 0

(The 6th value is a sequence number which should be incrementing by 1. The other values are, well, you don't want to know what they are.)

More info on software, drivers, and more at Getting Started with Arduino and Genuino on Windows.

The more complex installations may be required if you bought the Nano from eBay (or me) or off the back of a truck, depending on whether it has the genuine FTDI USB communications chip. And even more complex if it doesn't have the bootloader installed. Links for driver installation may be found under References under "Arduino". Instructions for burning the bootloader may be found in the section: Burning Bootloaders into the Nano or Pro Micro. Nearly all have the bootloaded, but also nearly all require the CH340 driver.

The Arduino IDE is probably best for compiling and uploading. UECIDE can also be used and is an order of magnitude or more faster for compilation and uploading, but for the simple µMD0 sketch, it doesn't much matter. And UECIDE is more complex to set up, slower for everything else including startup and simply loading or saving files, has been buggier in the past, and doesn't appear to support the "New Bootloader", found on many Nanos. Most eBay Nanos have the Old Bootloader but Nanos from other sources like Amazon may have the New Bootloader (simply called "Bootloader" in the Arduino IDE). If from me, it could be either depending on my supplier. The only easy way to know which one is present in your Nano is to attempt to upload a sketch. The wrong one will hang or abort.

Uploading the µMD0 Firmware

If you purchased the from me directly, or via eBay, the latest released version of the firmware has been preloaded, so the following step should not be necessary unless a later release is available or you would like to hack the firmware - which is not really recommended.

The firmware (via the links, above) is provided as a source file which probably has an extension of ".pde" or ".ino" (though the specific name doesn't matter - it's just a text file). However, the name may NOT contain any dashes "-" due to the peculiar restrictions of Java or something. Make a directory with the name of the firmware (without the extension) and put the firmware file there. For example, if the file is named umd0_FW_v123.ino, make a directory called umd0_fw_v123. and put umd0_fw_v123.ino in it. Note that case matters so the name of the directory and name of the firmware file (without the extension) must match case character-by-character exactly. Thus Interferometer.pde is not the same as interferometer.pde

  1. Plug the board into a USB port. I've occasionally seen problems using a USB port replicator though these generally are acceptable. But if the board doesn't come up or behavior is more erratic than usual, go to a direct USB port.

  2. Use Ctrl-O to open the firmware file. Select the directory, double click on it, and then open the firmware file itself. The source code should appear in the same window unless a file is already open, in which case a new window will appear.

    (Or for testing, just go to Files->Examples->01.Basics->Blink and upload that. It's easy to make changes and then see immediately that thay are taking effect without risking the rest of the Universe.)

  3. Use Ctrl-U to compile and upload the firmware to the board. This typically takes a minute or two, unlike UECIDE which may finish almost before the command is issued. :( :) Once complete, status lines will appear at the bottom of the Arduino window, the board will be automatically reset and start running the firmware. No other status messages will appear unless there are errors.

    Windows should recognize that the COM port dropped out momentarily and reappeared. The µMD0 firmware will be spitting out sequences of numbers at the sampling rate. These may be viewed by going to: Tools->Serial Monitor. With no interferometer hardware, they will be rather boring with only the sixth value incrementing sequentially (Sequence Number) and the 7th and 8th values cycling among some obscure numbers (Low Speed Code and Low Speed Data). To Windows, the board appears as a COM port. Thus any application that processes COM port data can be used in place of the µMD GUI, should this be desired.

    If the firmware crashed somehow, Windows may display a message saying something about the USB port not working. But that shouldn't happen with any firmware downloaded from here. :) And on rare occasions a cosmic ray or hardware glitch may result in the upload failing with a checksum or other error. Just try again. If the selected COM port is incorrect, cancel and retry.

    Sometimes the Arduino IDE decides to change the COM port for no good reason I can fathom. Go to Tools->Port, and make sure it has selected the COM Port.

Once loaded, the firmware is retained in non-volatile memory so this only needs to be done at most once - or until a firmware update is available!

The firmware may also be compiled without uploading by using Ctrl-R. Since you haven't messed with the code, it should compile without errors. This is slightly faster for testing and doesn't use the board at all so it can be off doing whatever it pleases. :)

Important: Terminate any instances of the µMD GUI before uploading the firmware and put the board into program mode (again if necessary) AFTER doing this even if LED1 is flashing.

Testing the Board and Firmware

With µMD0 firmware loaded, the simplest way to test that the board is working without running the GUI is to use the "Serial Monitor" (under "Tools" in the Arduino IDE.) With the board reset, then open the Serial Monitor. For a one axis setup, the terminal window should begin spewing forth data similar to the following:

  0 0 0 0 0 18016 0 0
  0 0 0 0 0 18017 10 124
  0 0 0 0 0 18018 8 100000
  0 0 0 0 0 18019 0 0
  0 0 0 0 0 18020 0 0
  0 0 0 0 0 18021 0 0
  0 0 0 0 0 18022 0 0
  0 0 0 0 0 18023 0 0
  0 0 0 0 0 18024 0 0
  0 0 0 0 0 18025 0 0
  0 0 0 0 0 18026 0 0
  0 0 0 0 0 18027 0 0
  0 0 0 0 0 18028 0 0
  0 0 0 0 0 18029 20 1095
  0 0 0 0 0 18030 0 0

If there is a display like this with the 6th number incrementing by 1, the board is probably working.

(Should you care, the 7th and 8th values are the "Low Speed Code" and "Low Speed Data", respectively. 10,209 is the firmware version 2.09; 8,24414 is the sample rate of 244.14 s/s, and 20,1095 specifies 1 homodyne axis and a homodyne multiplier of 4.) Refer back to the communications format for more info.


The µMD0 GUI

Latest Version of the GUI

Note: While described below, the "Velocity" and "Frequency" GUI modes will not return predictable or consistent results since the serial packet rate is not a controlled variable, but they may still be of some value. User beware. ;-)

The GUI has been stable for several years, with only a few updates mostly relating to environmental compensation. It is compatible with all versions of the firmware. The GUI for µMD0 is identical.

Save the µMD GUI .exe file into any convenient directory. (There's a small chance that the first time it's run, an error is produced since there is no configuration file associated with it. Simply continue and the GUI will come up. When it is closed using "Finish", valid settings will be saved so that the error should ot appear again.)

When started, the µMD GUI (henceforth simply called the "GUI") comes up in Displacement mode with graphing enabled. The only action required by the user is to select the USB COM port. Once selected, the readout and graph will begin displaying the interferometer data.

Even if there is no encoder or interferometer hardware attached to the board, it is possible to confirm that the Nano is talking to the GUI. Go to "USB Port" and select the same COM as used to upload the firmware. The graph should immediately start scrolling to the left indicating that it is accepting valid data, even if it is all 0s. With homodyne, there will be no error detection, but the fact that it started scrolling means the communications link is working.

Important:

For homodyne mode with µMD0, the default sample rate is 244.14 s/s. Attempting to change it is not recommended and no one at µMD Central is losing much sleep over the funny number.

The following is intended for homodyne systems; for specific aspects of the GUI screen displays for heterodyne systems, refer to the Micro Measurement Display 1 (µMD1) Installation and Operation Manual. The actual GUi is identical.

The data includes counts for each axis including displacement, and velocity; a unique sequence number to identify samples; as well as other low speed data such as environmental sensors and diagnostics. (More info can be found a few paragraphs above.) The GUI displays are updated at approximately 60 Hz.

All the screenshots below except for ring laser gyro use simulated data, which was more convenient for developing this manual! However, it also means you can play around and recreate these displays before building your interferometer.

Main Window Controls and Readouts

This graphic below shows the typical GUI main window at startup.

µMD Main Window in Displacement Mode with Graphing Enabled (Startup Settings)

Main Window Controls

The first set are the selection buttons at the top of the window. Note that except for USB Port, these require only a single click to activate:

µMD Main Window with Test Mode Function Generator Triangle Displacement Waveform

These may all be accessed via Alt-first letter.

The next set are the buttons, checkboxes, and other widgets on the main window:

The format is slightly modified when Frequency mode is selected. This graphic shows the actual DFT of the triangle waveform in the one above. Note that the DFT coefficients go as 1/N rather than 1/N-squared because it's actually using the velocity data, which is a squarewave.

µMD Main Window in Frequency Mode with Graphing Enabled

Main Window Indicators

Next are the various fields for displaying information in the Main Window:

µMD Main Window Showing Most Indicator Fields

Interferometer Configuration Window

These entries provide for selection of the type of interferometer used for displacement/velocity measurements, the measurement units to be used for the Main Readout and graph, parameters for the strightness and angular optics, and whether to enable use sub-count interpolation. All interferometer configuration parameters are saved when exiting the GUI.

µMD Interferometer Configuration Window

Linear coefficienets:

These settings only affect linear measurements.

Units (as appropriate)

Known quirk: If neither the COM Port or Test Mode is active, switching among the Units buttons will only change the Units lable and/move the decimal point/precision without affecting the readings. Just thought you should know. ;-)

Parameters (as appropriate):

Miscellaneous:

Environmental Compensation Window

This provides for entry of temperature, pressure, and humidity, or to select the use of environmental sensor data if available. All environmental compensation parameters are saved when exiting the GUI.

µMD Environmental Compensation window

Note 1: With the current GUI, the Factors for Temperature, Pressure, and Humidity will change based on the entered values However, their exact value is not guaranteed to be meningful and should only be considered for trends. This was supposed to be fixed when the environmental calculations were corrected using the NIST formulas, but the staff assigned to do the work took a couple decades off, sorry.

Note 2: With Environmental Compensation turned OFF, the vacuum wavelength is used in calculations. Therefore, Environmental Compensation should be turned ON for laser interferometers even if using standard values.

Test Mode Window

The primary use of Test Mode is to exercise the GUI without the need for a laser or actual interferometer hardware. :) The only other user function that is useful would to disable error detection suring setup and alignment of the laser and optics.

µMD Test Mode Window

Multiple Axis Support:

While the firmware only supports one axis, adding axes 2 and 3 is straightforward subject to the maximum throughput. The GUI has limited support for multiple axes due to the software complexity and lack of demand at the present time. (Though it's unlikely any amount of demand will make the slightest difference.) If interested in hacking the firmware, it's just matter of duplicating the PinA/PinB interrupt routines and expanding the serial communications to 16 values. Contact me if truly interested, though what may really be desirable is µMD. :)

Use the "#define Homodyne n" or "#define Heterodyne n" line in the firmware specify how many axes will be displayed. The value for "n" may be 1 or 3. Setting it to 2 will do the same thing as 3.

µMD Main Window with Multiple Axes Active

All GUI functions apply to the primary axis, which defaults on startup to Axis 1. The primary axis is what the Main Readout, REF/MEAS/DIFF frequency displays, frequency analysis, averaging, and graph apply to. Clicking on the Axis 1, Axis 2, or Axis 3 labels will select it to be the primary axis and change the color of the selected axis label to identify it as the primary axis. The units of the primary axis are also used for the others. Error detection (if enabled) only applies to the primary axis. Averaging is NOT applied to the Axis 1, Axis 2, or Axis 3 readouts, even the one that is the same as the primary axis.

Note that in Multiple Axis Mode, the communications format sends somewhat more data over the USB COM port and the GUI must perform more computation. Thus this may cause problems for a wimpy pre-Jurassic PC operating on the hairy edge of what's possible. Once Multiple Axis Mode is entered using the interferometer hardware, the only way to return to Single Axis Mode is to restart both the firmware and GUI. This is because neither has any way to know whether dropouts of measurement clock signals are due to a beam path being momentarily interruprted or an axis actually being shut off (whatever that might mean).

Test Mode is also capable of exercising all three axes singly or in combination but the function generator data will be the same for all. This is controlled by the Multiple Axis Mode checkbox. When enabled, Axis 1, Axis 2, and Axis 3 checkboxes will appear below it with Axis 1 being the default on startup. Turning Multiple Axis Mode off will put the GUI back in Single Axis Mode. But this will be overidden when Test Mode is turned off if the USB port is enabled and the firmware is running with multiple axes.

Multiple Axis GUI support has been under development for a semi-infinite amount of time. Specifications and behavior are subject to numerous changes without notice. ;-) However, no major features beyond what are described above are anticipated to be implemented in the GUI.

Help Menu

µMD About Window


Troubleshooting

Naturally, all is expected to go smoothly. But if it doesn't, here are some common problems. Some of these may be bugs in the firmware or GUI as hard as that is to believe. So, if you find something that cannot be solved based on what's below, contact us for a timely response:


References

These links open in a single new window or tab.

SG-µMD0

  1. Assembly Instructions
  2. SG-uMD0 V1.0 Schematic

Arduino

  1. Arduino IDE, Refernce, Tutorials, more
  2. CH340 Windows USB Driver Installer

Atmega 328 Nano 3.0

  1. Atmega 328 Nano 3.0
  2. Installing Drivers for an Arduino Nano in Windows
  3. Nano Driver - Windows 7 Instructions
  4. Arduino Nano v3.0 clones (How-to & Review)
  5. How to Burn a Bootloader to Clone Adruino Nano 3.0 - 2

Atmega ATtiny85 Digispark

  1. Learn to Use the ATtiny85 USB Mini Development Board
  2. Connecting and Programming the Digispark
  3. Digispark Basics

Pro Micro Atmega32U4

  1. Pro Micro and Fio V3 Hookup and Programming Guide
  2. Pro Micro Atmega32U4 Hardware Overview
  3. Pro Micro Atmega32U4 Windows Installation <

Jan Beck's Information

  1. Interferometer Project Pages
  2. Github µMD1 GUI Source Code Repository
  3. Short Video Describing Jan's and Sam's µMD1 Boards https://www.janbeck.com/Interferometer1/hp5508a-interferometer-replacement-hardware-2-0-heterodyne">Jan's HP5508A interferometer replacement hardware 2.0! - Heterodyne