Hand tools and fabrication machines
In this Tutorial, we will go through how to use the Analog Discovery 2 (AD2) multi-function tool to connect directly with the LDC1000 Inductance to digital converter IC for sensor coil prototyping. To do this, we will be using the following AD2 tool functionalities to configure and run the IC, measure sensor analog waveform, and capture the digital inputs and outputs:
- Logic Analyzer (capture the digital I/O signals)
- Oscilloscope (capture the sensor resonator analog signals)
- Programmable Power Supply (Power up the LDC1000)
- Protocol Analyzer (Send command to the LDC1000)
- Waveform Generator (Generates the external clock)
This tutorial will walk you through how to set up each of these tools for the project. The goal of this project was to setup a framework for sensor coil prototype testing using the LDC1000EVM sensor as a starting point.STEP 1: Materials
- Analog Discovery 2
- GW INSTEK PSP-603 (optional-Alternatively a voltage regulator can be used)
- Header Pins, Solder, and Soldering Iron
NOTE: use the above link to download waveforms softwareSTEP 2: LDC1000EVM Setup
- Break off the LDC1000EVM PCB along the perforation as shown in the image above.
Solder jumper wires and header pins as seen in the above images and described as follows:
- Solder jumper wires to J4 vias (altenatively J2 can be used).
- Solder 10 header pins (5 on each side) to the board as shown.
First we connect the 2x15 flywire signal cable assembly attached as seen in image 1 above. Then using the Analog Discovery 2 Pin configuration image 2 above, and the images of the top and bottom side views of the LDC1000 + Sensor PCB as a reference, we connect the AD2 to the LDC1000 as follows:
1. Using the top side view of the LDC1000 + Sensor PCB in image 1 above:
- Connect the (orange wire) 1+ and 1- Scope Ch. 1 positive and negative pins pad of the AD2 to the jumper wires to solder to J4 vias of the LDC1000 + Sensor PCB.
- Connect the GW INSTEK PSP-603 power supply to the +5V pin pad of the LDC1000 + Sensor PCB
- Connect the (yellow wire) W1 Waveform Generator pin and the (pink wire) 4 Digital I/O signal pin of the AD2 to the LDCLK pin pad of the LDC1000 + Sensor PCB. (Note: They were all connected by adding a spliced jumper wire seen in image 2 above).
- Connect the (green wire) 1 Digital I/O signal pin of the AD2 to the SCLK pin pad of the LDC1000 + Sensor PCB.
- Connect the (purple wire) 2 Digital I/O signal pin of the AD2 to the SDI pin pad of the LDC1000 + Sensor PCB.
- Connect the (red wire) V+ Power Supply pin of the AD2 to the SCLK pin pad of the LDC1000 + Sensor PCB.
Side Note: Alternatively, instead of using the GW INSTEK PSP-603 power supply, a voltage regulator can be used in combination with the 5V AD2 power supply to provide both 5V and 3.3V for the +5V and VIO pins respectively.
1. Using the bottom side view of the LDC1000 + Sensor PCB image above:
- Connect the (black wire) ↓ ground pins of the AD2 to the GND of the GW INSTEK PSP-603 power supply and the 2 GND pin pads of the LDC1000 + Sensor PCB.
- Connect the (pink wire) 0 Digital I/O signal pin of the AD2 to the CSB pin pad of the LDC1000 + Sensor PCB.
- Connect the (brown wire) 3 Digital I/O signal pin of the AD2 to the SDO pin pad of the LDC1000 + Sensor PCB.
- The INT pin pad of the LDC1000 + Sensor PCB is not connected.
For reference, here is the LDC1000 + Sensor Pinout table which gives a description of each pin below. The table was taken from page 6 of the snaa213.pdf document. The datasheet for the LDC1000 IC can be found here.
When the Waveforms Software is launched, we need to change the device buffer-memory distribution so that we have more memory allocated to the Scope and Logic instruments than the Wavegen and Patterns instruments. To do so, we do the following:
- Click on the Settings tab -> Device Manager to bring up the Device Manager window.
- In the Configurations list, click on configuration 8 as highlighted in the image above, then click on the select button.
The Analog Discovery 2 Power Supply was changed from the Default setting seen in image 1 and reconfigured to the setup seen in image 2 by doing the following:
- Click on the "Negative Supply (V-) RDY" button to disable it.
- Change the value of the Positive Supply to 3.3 V using the 'slider' or the text field next to it.
The GW Instek Power supply is setup as show in the image above.
Side Note: As mentioned in Step 3, instead of using the GW INSTEK PSP-603 power supply, a voltage regulator can be used in combination with the 5V AD2 power supply to provide both 5V and 3.3V for the +5V and VIO pins respectively.STEP 6: AD2 Waveform Generator Setup
The Waveform Generator settings were changed from the Default values seen in image 1 above and reconfigured as shown in image 2 by doing the following:
1 - Click on the Channels button and make sure Channel 1 (W1) is selected and Channel 2 (W2) is deselected.
2 - In the Channel 1 settings, change the following options to create the 8MHz square wave clock signal with 3.3V peak-to-peak to output to the LDCLK pin:
- Type -> Square
- Frequency -> 8 MHz
- Amplitude -> 1.65 V
- Offset -> 1.65 V
1 - Click on the SPI Tab seen in image 1 above, to open the SPI interface option.
2 - Click on the SPI Tab as seen in image 2 to open the Custom Mode.
3 - In the SPI settings a section highlighted in red in image 3, change the default values as follows:
- Select - DIO 0 (where DIO stands for Digital I/O pin)
- Clock - DIO 1
- Active - High
- Frequency - 4 MHz
- DQ0 - DIO 2
- DQ1 - DIO 3
- DQ2 & DQ3 - Don't care, so assign to unused pins DIO 9 and DIN 10.
Side Note 1: This code was created using the LDC1000 firmware library for the MSP430 (snac059.zip) found in Texas Instruments Website as a reference. In particular the evm_init() and evm_test() functions found in the "LDC1000_evm.c" file.
Side Note 2: On line 44 in the attached code, the CSB signal value is changed immediately after the "start()" command. This is done so that the CSB pin triggers immediately before data transfer. Because the CSB signal is controlled by Waveforms software, the signal has a latency of 1-10ms. Therefore, if the CSB signal value is changed before the "start()" command executed instead, the LDC1000 will timeout before the first instruction is received and no communication will occur. A 10ms wait command is then run on line 64 before the the CSB signal is changed again.STEP 8: AD2 Logic Analyzer Setup
The Logic Analyzer tool settings were changed from the Default values shown in video above and reconfigured as seen in the image below by doing the following:
- Click Add -> Signal, and add the DIO 0, DIO 1, DIO 2, DIO 3, and DIO 4 channels and rename them CSB, SCLK, SDI, SDO, and LDCLK respectively. (The CSB, SCLK, SDI, and SDO signals are not required but were added for me to remember how the AD2 and LDC1000 pins are mapped)
- Click Add -> SPI MISO/MOSI, and set Select, Clock, MOSI, and MISO options to the DIO 0, DIO 1, DIO 2, and DIO 3 channels respectively.
- With the Trigger setting set to "Simple" select the CSB Trigger and set it to falling edge.
- Change the Rate from 400 kHz to 100 MHz.
- Change the Samples from Default to 16 Ki.
The Oscilloscope Tool settings were changed from the Default values shown in image 1 above and reconfigured as seen in the image 2 by doing the following:
1 - Channel 2 is unchecked to disable it.
2 - Channel 1 is setup as follows:
- Offset - 4 V
- Range - 2 V/div
3 - The time setting is set to 5 us/div.STEP 10: The Results
Here is a video video showing the project in action. It goes over the hardware being used, the Waveforms software setup, and shows the results by executing the code in the Protocol Analyzer and using the Debugger.STEP 11: The End
Thank you for reading my tutorial. If you have any questions about the project or suggestions on how to make it better, please please comment below and I will answer promptly. Look forward to hearing your feedback