Microcontroller Designs for Atomic, Molecular, and Optical Physics Laboratories

Last updated on September 26, 2015: New lock-in and 16-bit ADC daughter boards

During the past few years, I have been designing several PCBs using 32-bit PIC32MX series microcontrollers with a USB interface to an Android tablet.  The tablet provides an inexpensive touch-screen interface with the capacity for fast high-resolution graphics.  The app available below provides a general-purpose interface, into which specific parameter values and their limits are loaded from the microcontrollers each time a connection is established.  The general approach and a description of some of the new designs is described in a recent article, Review of Scientific Instruments  84, 103101 (2013).  A brief summary was also presented as a poster at the June 2013 DAMOP meeting of the American Physical Society: download poster.

The Java code for the tablet app has been developed using a Google Nexus 7 tablet, on which it works extremely well.  It has also been tested with a Nexus 9, on which it performs well, and on an older Archos 80 G9, which performs adequately but with some degredation of the touch interface is slightly less smooth on this device.  Data plots are produced using the public-domain “AChartEngine” package for Android.

The microcontrollers are programmed entirely in C, using the free version of the Microchip XC32 compiler (V. 1.34), using the MPLAB X development environment (V. 2.30) and a legacy version of the Microchip USB drivers for Android ADK (included in the source files for each project).  An inexpensive Microchip PICKit 3 programmer (about $45) is used to transfer the resulting .hex file to the device via a six-pin header that is a part of the PCB design. You may want to change the default compiler options to make it easier to create your own new versions of the programs, as described here: MPLAB_configuration_instructions.pdf .

If you wish to duplicate one of these devices, all that is really essential is the .apk package for the Android tablet, the .hex file for the programmer, and the Gerber files for the printed circuit card, which can be sent to a PC board prototyping company such as Alberta Printed Circuits, which we have used with consistently good results. The Gerber files are a universal format that should be usable by any such company, although there may be minor issues with the availability of certain drill diameters. The diameters specified in the ".nc" files are the actual tool diameters prior to plating.

The microcontrollers, Microchip PIC32MX250F128B (28 pins), PIC32MX250F128D (44 pins), or PIC32MX270F256D (a newer upgraded version of the 250F128D), are available for about $5 and come in relatively convenient packages for manual assembly.  The circuit designs were produced using low-cost Winqcad schematic capture and autorouting software, which is no longer maintained, although my Winqcad design files are available on request.  If you want to create your own designs, there are public-domain Unix-based alternatives that might be a good choice, and the moderately priced Eagle program seems to be popular.

Most of the surface-mount components can be hand-soldered with a fine-tip soldering iron if necessary, with the exception of QFN/LFCSP packages such as the AD9102/AD9106 chip on my WVFM32 daughter board.  It’s much easier, though, to solder all of the surface-mount chips with a hot-air soldering station such as the inexpensive Aoyue 968A+,  using a very small amount of solder paste, ChipQuik SMD291AX or similar.  Accidental solder bridges between pins can be fixed by using a fine copper braid with rosin flux to remove the excess (Soder-Wick 80-2-5 or similar).  I highly recommend the hot-air method, especially it if you plan to make more than just one board or if you need to solder QFN-type packages, for which it’s almost impossible to use a soldering iron successfully.

Please provide appropriate credit to me (Edward Eyler) and to the University of Connecticut if you benefit from these designs, which were produced with partial support from the National Science Foundation and the UConn Research Foundation.  If you make significant improvements to the designs or software, I'd appreciate a copy by email to eyler@phys.uconn.edu.  Thanks!

 

1. MicroController app: a “universal” interface for 7” to 9” Android tablets.

TempCtrl32 screenshot.png

-      apk package (for installation as an ordinary tablet app)

-      Java source code (for Eclipse Indigo; uses the free AChartEngine graphics library)

 

Before installing, be sure to set the tablet security options to allow installation of apps from “Unknown sources” (i.e., not the Play Store)

The Nexus 7 screen image shows the app after connecting to a TempCtrl32 circuit board.  The parameter list at the upper left is scrollable, and the selected value can be adjusted with slider bars or with a pop-up keypad.  The plot shows the response of the output voltage (yellow) and temperature error (blue) after a setpoint change.  Full scale on the plot is about 0.5 degrees C.  Horizontal data points are plotted at 0.533 second intervals (every eighth sample).

 

 

2. TempCtrl32: Precision temperature controller or dual high-voltage PZT driver (depending on output op amp choice).

-      Microcontroller software, updated 8/1/14 (for temperature control, with units now displayed in units of millidegrees C)

-      Schematics, parts list, and drawings of the main printed circuit board

-      Gerber files for the main printed circuit card

-      Schematics, parts list, and drawings of the USB32 daughter board

-      Gerber files for the USB32 PCB

-      Schematics, parts list, and drawings of the DAC32 daughter board, updated 8/1/14 to Version 2.0, using the new AD5689R DAC.

-      Gerber files for the DAC32 PCB

-      Photo. Actual size is 4” x 2.85”.  This is a test setup using the on-board +/-12V supply with a small resistor connected as a heater; normally an external supply would be connected via jack J1 or J2 to drive a large thermoelectric heating/cooling element.

 

3. LabInt32: General lab interface/lock-in detector/waveform generator, etc.

LabInt32Labeled.pngThis PCB is intended as a general-purpose interface.  It supports up to two interchangeable daughter boards, and also has an optional on-board instrumentation amplifier, digital potentiometer, and dual 16-bit DAC.  Connectors are also provided for an optional rotary shaft encoder and serial display.

-      Microcontroller software, ramp generator, 8/1/14.  Also see lock-in software, below.

-      Schematics, parts list,  and drawings

-      Gerber files for the printed circuit card

 

4. Additional daughter boards.

-      Schematics and drawings of the Wvfm32 daughter board, an rf waveform generator.

-      Gerber files for the Wvfm32 circuit card

-      Schematics and drawings of the ADA2200 daughter board, added 9/26/15.  This is a synchronous filter optimized for lock-in detection, plus a variable-gain differential preamplifier.  Although the dynamic range is limited by the ADA2200 chip, actual performance in an iodine saturation spectrometer is comparable to that of a commercial lock-in.  It is normally used in conjunction with an ADC32 daugher board, although the built-in ADC on the microcontroller should be adequate for less-demanding applications.

-      Gerber files for the ADA2200 daughter board

-      Lock-in Amplifier software for ADA2200 and ADC32 daughter boards.  This program requires two daughter boards, ADA2200 and ADC32.  It includes a variable-phase reference waveform generator, drivers for both daughter-boards with full interfacing of parameters to a tablet, and a PID controller for closed-loop control applications such as laser frequency locking.

-      Schematics and drawings of the ADC32 daughter board, added 9/26/15.  This is a 16-bit fully differential ADC converter, 250 kSamples/s maximum, together with a four-channel differential multiplexer and a variable-gain differential amplifier.  The only software presently available is the ADA2200 lock-in amplifier program available with the link just above.  This program includes code to set the multiplexer channel and the gain, and also to regularly sample the ADC.

-      Gerber files for the ADC32 daughter board

-      (now obsolete!) Schematics and drawings of the LockIn32 daughter board, version of 8/1/14.  This is a compact but somewhat noisy lock-in detector featuring a differential preamplifier, a switched-gain demodulator, a filter/amplifier, and a 14-bit ADC.

-      (obsolete) Gerber files for the LockIn32 circuit card

-      (obsolete) Software files for the LockIn32 circuit card.  This program includes a variable-phase reference waveform generator, drivers for the LockIn32 card, and a PID controller for closed-loop control applications such as laser frequency locking.

 

------------------------------------------------------------------------------------------------------------------------------------------

Older Designs.

 

The designs below are slightly older ones that use Microchip dsPIC30F series processors.  They are interfaced to a custom OLED/keypad device, also documented below, which uses a PIC24F processor.  A descriptive article that describes several of these instruments was published in 2011 by the Review of Scientific Instruments, and a preprint is available here.

4. Event sequencer for atomic physics experiments.

-      Descriptive article (same as the one linked above; updated 11/20/10 and accepted by RSI)

-      Schematic diagram

-      List of components

-      Software (updated 7/22/10)

-      Drawings for printed circuit card

-      Gerber files for printed circuit card

-      Winqcad design files and modified libraries for printed circuit card

-      Photo

5. General-purpose OLED display and keypad input device (updated 10/13/10).

-      Schematic diagram

-      Software

-      Drawings for printed circuit card

-      Gerber files for printed circuit card

-      Photo of complete unit

-      Photo of internal PCB and cables

6. RF Frequency synthesizer for laser frequency offset locking or A-O modulators (updated 11/24/10, more coming soon).

-      Schematic diagram (version 3.1)

-      Software

-      Drawings for printed circuit card

-      Gerber files for printed circuit card

-      Update history

-      List of components (version 1; will be updated to version 3.1 shortly)

-      Photo showing Rev. 1 PCB and frequency counter at f=200 MHz

-      Photo of Rev. 2 prototype, with amplifier and programmable attenuator,

7. Optical spectrum analyzer controller (mostly supplanted by the TempCtrl32 PCB, contact E. Eyler for drawings and software).