MAX5171BOB

MAX5171 Breakout Board - 14-bit Force/Sense DAC

Hello World

Import programMAX5171BOB_14bit_Remote_Sense_SPI_DAC

Example host software for the Maxim Integrated MAX5171 14-bit Force/Sense DAC. Hosted on the MAX32625MBED.

Library

Import libraryMAX5171

Maxim Integrated MAX5171 14-bit Force/Sense DAC

Pinout

Datasheet

http://www.maximintegrated.com/products/MAX5171BOB

Notes

PRELIMINARY

MAX5171 Breakout Board 14-bit Force/Sense DAC

General Description

Digital-to-analog converters (DACs) provide accurate output voltages for actuation and control in many electronic applications such as industrial, medical and RF systems. The MAX5171 is a highly accurate, 14-bit voltage output DAC. Development with DACs involves expertise in analog systems, power supplies, digital interfaces and firmware. Now, enter the MAX5171BOB to accelerate the development process.

The MAX5171BOB Breakout Board provides for rapid prototyping and development with the MAX5171 (a 14-bit, voltage-output DAC). MAX5171BOB interfaces to any Arduino™-compatible or mbed.org™ compatible platform system with expansion ports configurable for SPI communication. Additionally, the MAX5171BOB works with systems that have a Pmod™ connection, a 2x6 right-angle header at board edge (compatible with Digilentinc.com Pmod™ interface spec) Interface type 2A (expanded SPI) on 2x6 header at board edge. MAX5171 also comes with schematics, design files and firmware for immediate use and forking to future projects.

The board directly interfaces to SPI with logic levels in the range 2.7V to 5.5V. (Note: MAX5171 is specified for 4.5V to 5.5V operation, and the pin-compatible MAX5173 is specified for 2.7V to 3.6V operation.)

The board comes installed with MAX5171AEEE+ installed.

Example firmware is provided for Arduino™ and mbed.org™ system boards.

Tested with:

PMOD is a trademark of Digilent Inc

Arduino is a trademark of Arduino AG

Arm and Mbed are trademarks of Arm Limited (or its subsidiaries)

Windows is a trademark of Microsoft

Quick Start

Required Equipment

  • MAX5171BOB# Breakout Board
  • Appropriate mbed.org or Arduino board
  • Computer with USB and web access
  • A serial terminal emulator software such as teraterm, realterm, picocom, minicom, or equivalent

The procedures below describe the Quick Start process with the MAX32625MBED# and the Arduino. MAX5171BOB has been tested on the platform boards listed above.

There are two example programs for each platform:

  • The "Simplified Hello World" program is a small example program which can be changed by modifying the Hello_MAX5171.cpp source code and repeating the compile-build-upload cycle, providing straightforward code for easy adoption.
  • The "Serial Tester" program is an interactive, menu-driven test program which is controlled through a serial communications port, using a terminal emulator, supporting quick discovery and evaluation of device features for testing functionality.

Procedure for Mbed: Simplified Hello World

The "Simplified Hello World" program is a small example program which can be changed by modifying the Hello_MAX5171.cpp source code and repeating the compile-build-upload cycle, providing straightforward code for easy adoption.

The Breakout Board is fully assembled and tested. The first time the board is used, the MAX5171BOB firmware must be loaded into the MAX32625MBED, or equivalent platform board. This firmware is stored on the MAX32625MBED board and remains after the board is powered off. When the board is plugged into USB the first time, the computer may need about a minute to install its device drivers.

Import programMAX5171BOB_14bit_Remote_Sense_SPI_DAC

Example host software for the Maxim Integrated MAX5171 14-bit Force/Sense DAC. Hosted on the MAX32625MBED.

Follow the steps below to verify board operation:

  1. Connect the MAX5171BOB to the MAX32625MBED or equivalent mbed platform board using the standard pinout.
  2. Connect a USB cable from computer to MAX32625MBED board “HDK” USB port. (Windows may require some time to install its device driver.) Expect the system to automatically mount the board as a new USB drive named MBED or DAPLINK or something similar. This is a special-purpose drive: firmware will be loaded into the board by copying the compiled binary into the board's drive. Don't write any other files to this drive.
  3. Open your board's USB device folder and double click on its MBED.HTML file. On the board page, click Add to your Mbed Compiler. This adds your Mbed board to the Online Compiler as a compilation target. See https://os.mbed.com/docs/mbed-os/v5.13/quick-start/index.html for more detailed instructions on using the online compiler.
  4. In a web browser, navigate to https://os.mbed.com/teams/MaximIntegrated/code/MAX5171BOB_14bit_Remote_Sense_SPI_DAC/ and click Import into Compiler. The mbed online IDE window opens, and prompts to import program. Click Import button to complete the import.
  5. Compile the program. When complete, the online mbed IDE downloads the firmware file to your local downloads folder.
  6. Locate the newly built firmware file MAX5171BOB_14bit_Remote_Sense_SPI_DAC.MAX32625MBED.bin and copy the file to the board's MBED drive. (The names might not match exactly if using a platform other than MAX32625MBED, or if there is already a file with that name.) If a warning dialog appears asking to move this file without its properties, answer yes. After file copying is complete, press and release the board's RESET button to start the firmware.
  7. The program behavior can be changed by modifying the Hello_MAX5171.cpp source code and repeating the compile-build-upload cycle from step 4.
  8. You can discard your local changes and reset to the latest published firmware version as follows: Bring up the project Revision tab and right-click on the line that says “default” “tip”. In the popup context menu, select Switch working copy to this revision…. There will be a warning that there are uncommitted local changes in the working tree. Click Discard, and all of the local files will be reset to the published version.

Procedure for Mbed: Serial Tester

The "Serial Tester" program is an interactive, menu-driven test program which is controlled through a serial communications port, using a terminal emulator, supporting quick discovery and evaluation of device features for testing functionality.

The Breakout Board is fully assembled and tested. The first time the board is used, the MAX5171BOB firmware must be loaded into the MAX32625MBED, or equivalent platform board. This firmware is stored on the MAX32625MBED board and remains after the board is powered off. The serial tester firmware uses a USB serial port to communicate. When the board is plugged into USB the first time, the computer may need about a minute to install its device drivers.

Import programMAX5171BOB_Serial_Tester

Test program running on MAX32625MBED. Control through USB Serial commands using a terminal emulator such as teraterm or putty.

Follow the steps below to verify board operation:

  1. Connect the MAX5171BOB to the MAX32625MBED or equivalent mbed platform board using the standard pinout.
  2. Connect a USB cable from computer to MAX32625MBED board “HDK” USB port. (Windows may require some time to install its device driver.) Expect the system to automatically mount the board as a new USB drive named MBED or DAPLINK or something similar. This is a special-purpose drive: firmware will be loaded into the board by copying the compiled binary into the board's drive. Don't write any other files to this drive.
  3. Open your board's USB device folder and double click on its MBED.HTML file. On the board page, click Add to your Mbed Compiler. This adds your Mbed board to the Online Compiler as a compilation target. See https://os.mbed.com/docs/mbed-os/v5.13/quick-start/index.html for more detailed instructions on using the online compiler.
  4. In a web browser, navigate to https://os.mbed.com/teams/MaximIntegrated/code/MAX5171BOB_Serial_Tester/ and click Import into Compiler. The mbed online IDE window opens, and prompts to import program. Click Import button to complete the import.
  5. Compile the program. When complete, the online mbed IDE downloads the firmware file to your local downloads folder.
  6. Locate the newly built firmware file MAX5171BOB_Serial_Tester.MAX32625MBED.bin and copy the file to the board's MBED drive. (The names might not match exactly if using a platform other than MAX32625MBED, or if there is already a file with that name.) If a warning dialog appears asking to move this file without its properties, answer yes.
  7. (?) Connect another USB cable from computer to MAX32625MBED board “DEV” USB port.
  8. Unplug the USB HDK and plug USB into the DEV connector. Expect the LEDs in the lower right corner should flash briefly and then remain lit.
  9. Locate the newly arrived USB Serial Device COM port, and use a serial terminal emulator (such as teraterm, realterm, picocom, minicom, or equivalent). Baud rate is 9600.

Procedure for Arduino: Simplified Hello World

The "Simplified Hello World" program is a small example program which can be changed by modifying the Hello_MAX5171.cpp source code and repeating the compile-build-upload cycle, providing straightforward code for easy adoption.

The Breakout Board is fully assembled and tested. The first time the board is used, the MAX5171BOB firmware must be loaded into the Arduino board. This firmware is stored on the Arduino board and remains after the board is powered off. The firmware uses a USB serial port to communicate. When the board is plugged into USB the first time, the computer may need about a minute to install its device drivers.

Follow the steps below to verify board operation:

  1. Connect the MAX5171BOB to the Arduino board using the standard pinout.
  2. Connect a USB cable from computer to Arduino board USB port. (Windows may require some time to install its device driver.)
  3. In a web browser, navigate to https://create.arduino.cc/editor/whismanoid/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/preview and click "Add to my Sketchbook".
  4. Connect USB cable to Arduino hardware. If first time using Arduino Create online, you may be prompted to install Arduino Create Agent to connect with the hardware.
  5. Compile the program with the "Upload and Save" button.
  6. The program behavior can be changed by modifying the Hello_MAX5171.cpp source code and repeating the compile-build-upload cycle.

Procedure for Arduino: Serial Tester

The "Serial Tester" program is an interactive, menu-driven test program which is controlled through a serial communications port, using a terminal emulator, supporting quick discovery and evaluation of device features for testing functionality.

The Breakout Board is fully assembled and tested. The first time the board is used, the MAX5171BOB firmware must be loaded into the Arduino board. This firmware is stored on the Arduino board and remains after the board is powered off. The firmware uses a USB serial port to communicate. When the board is plugged into USB the first time, the computer may need about a minute to install its device drivers.

Follow the steps below to verify board operation:

  1. Connect the MAX5171BOB to the Arduino board using the standard pinout.
  2. Connect a USB cable from computer to Arduino board USB port. (Windows may require some time to install its device driver.)
  3. In a web browser, navigate to https://create.arduino.cc/editor/whismanoid/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/preview and click "Add to my Sketchbook".
  4. Connect USB cable to Arduino hardware. If first time using Arduino Create online, you may be prompted to install Arduino Create Agent to connect with the hardware.
  5. Compile the program with the "Upload and Save" button.
  6. Locate the newly arrived USB Serial Device COM port, and use a serial terminal emulator (such as teraterm, realterm, picocom, minicom, or equivalent). Baud rate is 9600.

Sending Commands with a Serial Console

A serial terminal emulator software (such as teraterm, realterm, putty, picocom, minicom, or equivalent) must be installed to communicate with the example firmware. Various terminal programs connect in various ways and have different user interfaces, but they all share a common set of basic features: Connecting to a specific serial port device by name, such as COM4 or /dev/ttyACM0 Settings such as baud rate 9600, 8 bits / No parity / 1 Stop bit, no flow control Typing at the keyboard transmits to the firmware through the serial port Messages received from the firmware are displayed on the screen A special keyboard command or menu item exits the terminal program See https://os.mbed.com/handbook/Terminals for more details. More resources:

In Windows™, install a terminal emulator such as teraterm, realterm, or putty. Find the serial port name and COM port number in Control Panel “View devices and printers”. The Mbed board will appear as “USB Serial Device” or “mbed Serial Port”. See https://os.mbed.com/handbook/Windows-serial-configuration and https://os.mbed.com/docs/mbed-os/v5.11/tutorials/windows-serial-driver.html for troubleshooting. Start the terminal emulator and use its menu to connect to the serial port that belongs to the board. Pressing ENTER displays the firmware’s banner message (see example session).

In linux, install a terminal emulator such as minicom or picocom. For example, under Debian or Ubuntu linux, use

sudo apt-get install picocom

In linux (Debian), find the serial port name as follows:

# with the board not connected, get list of tty device names
ls -1 /dev/tty~* >dev_tty_baseline
# now connect the device to USB and find the new tty device name (such as /dev/ttyACM0)
ls -1 /dev/tty~* | diff dev_tty_baseline -

The picocom terminal emulator runs from the tty console. The tty device name must be given on the command line when starting picocom. See man picocom for more details.

picocom /dev/ttyACM0 --baud 9600

Pressing ENTER displays the firmware’s banner message (see example session). Pressing CTRL+A and then CTRL+X exits picocom.

Example Serial Console Session

The firmware uses a USB serial port to communicate. Typing “?” prints a menu of supported device commands.

# Example for MAX5171BOB Breakout Board

Main menu MAX5171 14-bit Force/Sense VOUT DAC MAX32625 [microUSB] [Button1=DemoConfig1] [Button2=DemoConfig2]
 ? -- help
MAX5171 > ?

Main menu MAX5171 14-bit Force/Sense VOUT DAC MAX32625 [microUSB] [Button1=DemoConfig1] [Button2=DemoConfig2]
 ? -- help
 # -- lines beginning with # are comments
 . -- SelfTest
 %Hn {pin: 0 1 2 3 4 5 6 7 8 9 14 15 16 17} -- High Output
 %Ln {pin: 0 1 2 3 4 5 6 7 8 9 14 15 16 17} -- Low Output
 %?n {pin: 0 1 2 3 4 5 6 7 8 9 14 15 16 17} -- Input
 %A -- analogRead
 %D -- DAC output MAX541 (SPI2)
 %SC SCLK=12000000=12.000MHz CPOL=1 CPHA=1 -- SPI config
 %SW mosi,mosi,...mosi -- SPI write hex bytes
 0 code=? -- CODE
 4 code=? -- CODE_LOAD
 8 -- LOAD
 c -- NOP
 d -- SHUTDOWN
 e0 -- UPO_LOW
 e8 -- UPO_HIGH
 f0 -- MODE1_DOUT_SCLK_RISING_EDGE
 f8 -- MODE0_DOUT_SCLK_FALLING_EDGE
MAX5171 > # send 4 CODE_LOAD code=0x3fff expect AIN0(AIN4)=full scale 2.5V

Main menu MAX5171 14-bit Force/Sense VOUT DAC MAX32625 [microUSB] [Button1=DemoConfig1] [Button2=DemoConfig2]
 ? -- help
MAX5171 > 4 code=0x3fff
CODE_LOAD code=16383
MAX5171 > %a
AIN0 = 100.000% = 0.600V  AIN4 =  42.033% = 2.522V
AIN1 = 100.000% = 0.600V  AIN5 =  42.131% = 2.528V
AIN2 = 100.000% = 0.600V
AIN3 = 100.000% = 0.600V

MAX5171 > # send 4 CODE_LOAD code=0x0000 expect AIN0(AIN4)=zero scale 0V

Main menu MAX5171 14-bit Force/Sense VOUT DAC MAX32625 [microUSB] [Button1=DemoConfig1] [Button2=DemoConfig2]
 ? -- help
MAX5171 > 4 code=0x0000
CODE_LOAD code=0
MAX5171 > %a
AIN0 =   0.489% = 0.003V  AIN4 =   0.391% = 0.023V
AIN1 = 100.000% = 0.600V  AIN5 =  42.131% = 2.528V
AIN2 = 100.000% = 0.600V
AIN3 = 100.000% = 0.600V

MAX5171 > # send 4 CODE_LOAD code=0x1fff expect AIN0(AIN4)=mid scale 1.25V

Main menu MAX5171 14-bit Force/Sense VOUT DAC MAX32625 [microUSB] [Button1=DemoConfig1] [Button2=DemoConfig2]
 ? -- help
MAX5171 > 4 code=0x1fff
CODE_LOAD code=8191
MAX5171 > %a
AIN0 = 100.000% = 0.600V  AIN4 =  21.114% = 1.267V
AIN1 = 100.000% = 0.600V  AIN5 =  42.131% = 2.528V
AIN2 = 100.000% = 0.600V
AIN3 = 100.000% = 0.600V

MAX5171 > # send e8 UPO_HIGH expect input D2=1

Main menu MAX5171 14-bit Force/Sense VOUT DAC MAX32625 [microUSB] [Button1=DemoConfig1] [Button2=DemoConfig2]
 ? -- help
MAX5171 > e8
UPO_HIGH
MAX5171 > %?2
 digitalInOutPin 2 Input 1
MAX5171 > # send e0 UPO_LOW expect input D2=0

Main menu MAX5171 14-bit Force/Sense VOUT DAC MAX32625 [microUSB] [Button1=DemoConfig1] [Button2=DemoConfig2]
 ? -- help
MAX5171 > e0
UPO_LOW
MAX5171 > %?2
 digitalInOutPin 2 Input 0
MAX5171 >

Main menu MAX5171 14-bit Force/Sense VOUT DAC MAX32625 [microUSB] [Button1=DemoConfig1] [Button2=DemoConfig2]
 ? -- help
MAX5171 > # end of test file

Main menu MAX5171 14-bit Force/Sense VOUT DAC MAX32625 [microUSB] [Button1=DemoConfig1] [Button2=DemoConfig2]
 ? -- help
MAX5171 > ~*~* U+0004 EOT = EOF ~*~*

Detailed Description of Hardware

The MAX5171 is a 14-bit, voltage-output DAC with SPI Interface. The MAX6126 provides a 2.5V reference voltage. For bipolar operation, the MAX889 charge pump generates a -5V power supply rail to drive the MAX44260 operational amplifier. Jumper JU1 selects unipolar or bipolar output configuration. When configured for unipolar output, analog output is driven from the FORCE_UNI test point and sensed by the SENSE_UNI test point, with closed-loop feedback through resistor network R1-R2. When configured for bipolar output, analog output is driven from the FORCE_BIP test point and sensed by the SENSE_BIP test point, with closed-loop feedback through resistor network R3-R4. (The analog output pin OUT is also connected to the standard Arduino A0 analog pin on the external connector.) For more information on these products, please visit:

Bipolar (-5V to 5V) Force/Sense Wiring Connection

To drive an output in the range -5V to 5V, put the JU1 shunt on pins 1-2, and connect both the FORCE_BIP and SENSE_BIP test points to the positive side of the load. Connect the ground return side of the load to the GND test point. Leave the FORCE_UNI and SENSE_UNI test points unconnected. For best accuracy, avoid the resistive (I x R) voltage drop losses in the supply wire by using two separate wires for FORCE and SENSE.

Unipolar (0 to 5V) Force/Sense Wiring Connection

To drive an output in the range 0 to 5V, put the JU1 shunt on pins 2-3 (the MAX889 charge pump and MAX44260 op amp and resistors R3-R4 will not be used). Connect both the FORCE_UNI and SENSE_UNI test points to the positive side of the load. Connect the ground return side of the load to the GND test point. Leave the FORCE_BIP and SENSE_BIP test points unconnected. For best accuracy, avoid the resistive (I x R) voltage drop losses in the supply wire by using two separate wires for FORCE and SENSE.

Minimal Component Count (0 to 2.5V) Force/Sense Wiring Connection

To drive an output in the range 0 to 2.5V with minimal component count, remove the JU1 shunt (the MAX889 charge pump and MAX44260 op amp and resistors R1-R4 will not be used). Connect both the OUT and FB pins of the MAX5171 to the positive side of the load. Connect the ground return side of the load to the GND test point. Leave all other test points unconnected. For best accuracy, avoid the resistive (I x R) voltage drop losses in the supply wire by using two separate wires for OUT and FB.

Evaluating the 2.7V to 3.6V MAX5173

The MAX5173 is the pin-compatible low-voltage version of MAX5171, specified for 2.7V to 3.6V operation. All on-board support circuitry (MAX889 charge pump, MAX44260 operational amplifier, and MAX6126 voltage reference) are specified to operate over the full 2.7V to 5.5V range. For specified operation of MAX5173, replace U3 with a 1.25V reference such as the pin-compatible MAX6190AESA+.

Table 1. Jumper Functions

JumperStateFunction
PDL1-2 *PDL = logic high: shutdown function is allowed.
2-3PDL = logic low: shutdown function is disabled.
RS1-2RS = logic high: output will be midscale at reset.
2-3*RS = logic low: output will be zero at reset.
SHDN1-2SHDN = logic high: MAX5171 is shut down.
2-3*SHDN = logic low: normal operation.
FB1-2* (BIP)Bipolar output configuration (+5V/-5V): connect positive terminal of load to FORCE_BIP and SENSE_BIP test points.
2-3 (UNI)Unipolar output configuration (+5V): connect positive terminal of load to FORCE_UNI and SENSE_UNI test points.
J71-2*Analog reference REF connects to Arduino pin A1
J61-2*Analog output OUT connects to Arduino pin A0
J41-2*VDD supply is driven by Arduino IOREF supply
J81-2*User Programmable Output UPO connects to Arduino pin D2
J11-2*2.5V reference force/sense connection point
J51-2*2.5V reference drives MAX5171 REF input

*Default

Ordering Information

PARTTYPE
MAX5171BOB#Breakout Board

#Denotes RoHS compliant.


You need to log in to post a discussion