This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
resources:eval:user-guides:circuits-from-the-lab:eval-adpd410x [05 Jan 2022 05:45] – Angelo Nikko Catapang | resources:eval:user-guides:circuits-from-the-lab:eval-adpd410x [03 Mar 2023 07:42] (current) – Joyce Velasco | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== EVAL-ADPD410X-ARDZ User Guide ====== | + | ====== EVAL-ADPD410x-ARDZ User Guide ====== |
- | **[[ADI> | + | The [[ADI> |
{{ : | {{ : | ||
Line 8: | Line 8: | ||
===== Device Driver and Support ===== | ===== Device Driver and Support ===== | ||
- | A no-OS device driver and example program | + | A no-OS device driver and an example program |
- | Similarly, utility software (iio_info, IIO Oscilloscope, | + | |
+ | Similarly, utility software (such as iio_info, IIO Oscilloscope, | ||
===== Materials Needed ===== | ===== Materials Needed ===== | ||
* [[ADI> | * [[ADI> | ||
- | * [[ADI> | + | * [[ADI> |
* Micro USB to USB cable | * Micro USB to USB cable | ||
* PC or laptop with a USB port | * PC or laptop with a USB port | ||
- | |||
- | ===== Driver / Firmware Setup ===== | ||
- | There are two basic ways to program the [[EVAL-ADICUP3029]] with the software for both boards. | ||
- | |||
- | ==== Dragging and Dropping the Hex File to the Daplink Drive ==== | ||
- | - Connect the [[ADI> | ||
- | - Drag and Drop the appropriate .hex file from the list below to the the Daplink Drive {{ : | ||
- | - The drive will unmount once the .hex file is dropped and wait for it to reappear. Once it does, press the reset button of the **[[ADI> | ||
- | |||
- | <WRAP todo> | ||
- | Confirm that these are the latest HEX files, and that they function with IIOscope and pyadi: | ||
- | [[repo> | ||
- | Prerelease hex files can be found inside this zip archive: {{ : | ||
- | * For EVAL-ADPD4100: | ||
- | * For EVAL-ADPD4101: | ||
- | </ | ||
- | |||
- | ==== Using CrossCore Embedded Studio ==== | ||
- | - You will have to acquire a copy of the project source files of the EVAL-ADPD410X-ARDZ. You can download the source files directly from the repository at [[repo> | ||
- | - Open CrossCore Embedded Studio and import the project into your workspace as detailed in [[: | ||
- | - Once ready, you can opt to generate your own .hex file and use the first method to program the **[[EVAL-ADICUP3029]]** or you can use a debug session by following the quickstart guide. | ||
===== Hardware Setup ===== | ===== Hardware Setup ===== | ||
- | ==== Jumper | + | ==== Jumper |
- | There are two shunt-configurable jumpers and 3 types of solder jumpers on both **[[ADI> | + | There are two shunt-configurable jumpers and three types of solder jumpers on the [[ADI> |
=== I/O Logic Voltage (IOSEL) Shunt Positions === | === I/O Logic Voltage (IOSEL) Shunt Positions === | ||
Line 48: | Line 28: | ||
=== Onboard LED and Photodiode (P10) Shunt Positions === | === Onboard LED and Photodiode (P10) Shunt Positions === | ||
+ | The onboard LED and photodiode are by default connected to LED1A and PD1A, respectively. **When using external LEDs and sensors on this channel, make sure to remove this connection using jumper header P10.** | ||
^ Correct Shunt Position | ^ Correct Shunt Position | ||
| Shorted Pin 1 and 2, Shorted Pin 3 and 4, Shorted Pin 5 and 6 | {{ : | | Shorted Pin 1 and 2, Shorted Pin 3 and 4, Shorted Pin 5 and 6 | {{ : | ||
Line 53: | Line 34: | ||
=== LED Supply Voltage (JP1) Solder Positions === | === LED Supply Voltage (JP1) Solder Positions === | ||
^ Correct Shunt Position ^ Layout Picture | ^ Correct Shunt Position ^ Layout Picture | ||
- | | Shorted Pin 1 and 2 | {{ : | + | | Shorted Pin 2 and 3 | {{ : |
=== LED Driver Connection P9, P11, P13, P15, P17, P19, P22, P24 === | === LED Driver Connection P9, P11, P13, P15, P17, P19, P22, P24 === | ||
Line 61: | Line 42: | ||
=== SPI or I2C Interface === | === SPI or I2C Interface === | ||
^ Board ^ Shorted Resistors | ^ Board ^ Shorted Resistors | ||
- | | EVAL-ADPD4100-ARDZ (SPI) | Shorted R8 and R9, Open R6 and R7 | {{ : | + | | EVAL-ADPD410x-ARDZ (SPI) | Shorted R8 and R9, Open R6 and R7 | {{ : |
- | Below is a photo of the EVAL-ADPD4100-ARDZ (SPI) board with all the correct shunt and solder jumper connections. | + | Below is a photo of the [[ADI>ADPD4100]] (SPI) board with all the correct shunt and solder jumper connections. |
{{: | {{: | ||
^ Board ^ Shorted Resistors | ^ Board ^ Shorted Resistors | ||
- | | EVAL-ADPD4101-ARDZ (I2C) | Shorted R6 and R7, Open R8 and R9 | {{ : | + | | [[ADI>ADPD4101]] (I2C) | Shorted R6 and R7, Open R8 and R9 | {{ : |
Below is a photo of the EVAL-ADPD4101-ARDZ (I2C) board with all the correct shunt and solder jumper connections. | Below is a photo of the EVAL-ADPD4101-ARDZ (I2C) board with all the correct shunt and solder jumper connections. | ||
{{: | {{: | ||
==== Prototyping Connectors ==== | ==== Prototyping Connectors ==== | ||
- | The board has 2 parallel 18-pin 100-mil pitch male connectors which give access to the LED driver channels, the photodiode inputs, custom I/O pins from the AFE, and supply voltage for the LED. The user can use this along with the break-away protoboard to implement a custom circuit for test. The pin assignment and functions are shown below. | + | The board has two parallel 18-pin, 100-mil pitch male connectors, which give access to the LED driver channels, the photodiode inputs, custom I/O pins from the AFE, and supply voltage for the LED. The user can use this along with the break-away protoboard to implement a custom circuit for testing. The pin assignment and functions are shown below. |
{{: | {{: | ||
- | Pins labeled XYC (where X refers to LED 1, 2, 3, or 4 and Y refers to channel A or B) pins denote connections to the LED cathode which are voltage protected via transistors to the ADPD4100/1 LED inputs (denoted by LXY). It is recommended to connect LED cathodes to this pins instead of connecting directly to LXY pins. PDXY (X refers to photodiode 1, 2, 3, or 4 and Y refers to channel A or B) pins denote photodiode signal inputs to the AFE. ACOM and BCOM pins refer to the common cathode bias output for photodiode sensors. These should be connected to the cathodes of photodiodes in the matching channel (i.e. photodiodes connected to PD1A, PD2A, PD3A, and PD4A should have their cathodes connected to ACOM). | ||
- | A simple circuit for testing LED driver outputs and photodiode current sensing using the break-away prototype board can easily be set-up using optocouplers as shown below. | + | Pins labeled **XYC** (where X refers to LED 1, 2, 3, or 4, and Y refers to channel A or B) denote connections to the LED cathode which are voltage protected via transistors to the ADPD4100/1 LED inputs (denoted by **LXY**). It is recommended to connect LED cathodes to these pins instead of connecting directly to **LXY** pins. **PDXY** (X refers to photodiode 1, 2, 3, or 4 and Y refers to channel A or B) pins denote photodiode signal inputs to the AFE. **ACOM** and **BCOM** pins refer to the common cathode bias output for photodiode sensors. These should be connected to the cathodes of photodiodes in the matching channel (for example, photodiodes connected to PD1A, PD2A, PD3A, and PD4A should have their cathodes connected to ACOM). |
+ | |||
+ | A simple circuit for testing LED driver outputs and photodiode current sensing using the break-away prototype board can easily be set up using optocouplers, as shown below. | ||
{{: | {{: | ||
+ | |||
+ | ==== General Connection ==== | ||
+ | * Set the following EVAL-ADICUP3029 switches according to their configuration on the table. | ||
+ | |||
+ | ^ Switch | ||
+ | | UART (S2) | USB | | ||
+ | | POWER (S5) | WALL/ | ||
+ | |||
+ | * Connect the [[ADI> | ||
+ | {{: | ||
+ | |||
+ | ===== Driver / Firmware Setup ===== | ||
+ | There are two basic ways to program the [[ADI> | ||
+ | |||
+ | ==== Dragging and Dropping the Hex File to the Daplink Drive ==== | ||
+ | - Ensure that the [[ADI> | ||
+ | - Connect the [[ADI> | ||
+ | - Drag and Drop the appropriate .hex file from the list below to the Daplink Drive. {{: | ||
+ | - The drive will unmount once the .hex file is dropped and wait for it to reappear. Once it does, press the reset button of the [[ADI> | ||
+ | |||
+ | <WRAP center round download 80%> | ||
+ | |||
+ | Pre-built hex files can be found here: | ||
+ | * [[repo> | ||
+ | * [[repo> | ||
+ | |||
+ | The latest source code can be found here: | ||
+ | * [[repo> | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== Using CrossCore Embedded Studio ==== | ||
+ | - Acquire a copy of the project source files of the [[adi> | ||
+ | - Open CrossCore Embedded Studio and import the project into your workspace, as detailed in the [[: | ||
+ | - Once ready, you can opt to generate your own .hex file and use the first method to program the [[ADI> | ||
+ | |||
+ | === CrossCore Project Header File Configuration === | ||
+ | * Select which board the project will support when built using [[https:// | ||
+ | * For EVAL-ADPD4100-ARDZ\\ {{: | ||
+ | * For EVAL-ADPD4101-ARDZ\\ {{: | ||
+ | You can configure the default timeslots and other settings of the [[ADI> | ||
+ | * You can set the default number of active timeslots and output data rate.\\ {{: | ||
+ | * Initial timeslot settings are configured using the **adpd410x_timeslot_init** data structure, as shown below:\\ {{: | ||
+ | * **Enabling ADC channel 2**\\ Each timeslot can use the two ADC input channels of the ADPD4100/1. By default, the timeslot only uses channel 1. Setting this to true will enable channel 2. | ||
+ | * **Timeslot Inputs**\\ {{: | ||
+ | * Each of the input pins can be disabled or routed to any or both of the channels. Below are the possible configurations of the input pins.\\ {{: | ||
+ | |||
+ | * **Timeslot Input Preconditioning**\\ Timeslot inputs have programmable connections, | ||
+ | * **TIA Reference Voltage**\\ The reference voltage of the Trans-Impedance Amplifier (TIA) is configurable. Below are the possible values:\\ {{: | ||
+ | * **TIA Gain Resistor**\\ The gain resistor used by the TIA is configurable for each input channel. Below are the possible values:\\ {{: | ||
+ | * **Multiple Pulses and Integrator Chopping** The ADPD4100/1 is capable of improving SNR using multiple pulses per sample and integrator chopping, which have configurable settings. | ||
+ | * **4-Pulse Reverse Pattern**\\ Each pulse from the LED in a set of 4 can be configured to either have an on-off or off-on integrator chopping sequence. This is a 4-bit value, 1 bit for each pulse. Setting a bit reverses the integrator chopping sequence for that pulse. | ||
+ | * **4-Pulse Subtract Pattern**\\ The mathematical operation performed on a digitized ADC sample can be set to addition or subtraction for each pulse in a set of 4. This is a 4-bit value, 1 bit for each pulse. Setting a bit negates the operation for that pulse. | ||
+ | * **Byte Number**\\ This sets the number of data bytes used in the timeslot. | ||
+ | * **Decimation Factor**\\ The decimation factor sets the number of time slot values used in the final sample.\\ < | ||
+ | output data rate = sample rate / (decimation factor - 1) | ||
+ | </ | ||
+ | * **LED Output**\\ The 4 LED outputs have configurable output current and can be set to either channel A or channel B only. You can define the LED value directly or through fields. The first 7 bits are for the output current, which scale from 1.5 mA to 200 mA for 0x01 to 0x7F. The last bit is for the output channel. Setting this bit selects channel B while clearing selects channel A.\\ {{: | ||
+ | * **ADC Cycles**\\ This sets the number of integration cycles per ADC conversion. This value can range from 0x01 to 0xFF.\\ | ||
+ | * **Number of Repeats**\\ This sets the number of repeat ADC conversions\\. This value can range from 0x01 to 0xFF\\. < | ||
+ | total number of pulses = ADC cycles X Number of Repeats | ||
+ | </ | ||
+ | |||
+ | Here is an example timeslot setting used in the pre-built hex files: | ||
+ | {{: | ||
===== Software Setup ===== | ===== Software Setup ===== | ||
Line 85: | Line 133: | ||
==== Connection ==== | ==== Connection ==== | ||
- | The device must be able to create a context. Context creation in the software depends on the backend used to connect the device. This guide will cover the device communication using a serial backend through a USB-UART connection. A simple way of checking, if the device is connected, is through the **iio_info** command. | + | The device must be able to create a context. Context creation in the software depends on the backend used to connect the device. This guide covers |
+ | < | ||
iio_info -u serial:< | iio_info -u serial:< | ||
+ | </ | ||
Examples: | Examples: | ||
- | * In a Windows machine, you can check the port of your ADICUP3029 via Device Manager in the Ports (COM & LPT) section. If your device is in COM4, you have to use iio_info -u serial:COM4 as your URI. | + | * In a Windows machine, you can check the port of your ADICUP3029 via Device Manager in the Ports (COM & LPT) section. If your device is in COM4, use **serial:COM4** as your URI (e.g., //iio_info -u serial: |
- | * In a Unix-based machine, you will see it under the /dev/ directory in this format “ttyUSBn”, | + | * In a Unix-based machine, you will see it under the /dev/ directory in this format “ttyUSBn”, |
+ | An example output of this command should look like the one below: | ||
+ | {{: | ||
+ | |||
+ | ==== Reading and Configuring the Device from Command Line ==== | ||
+ | Using the **[[: | ||
+ | |||
+ | === Reading Raw Channel Outputs from the Device === | ||
+ | The -c option of the **[[: | ||
+ | < | ||
+ | iio_attr -u <URI> -c < | ||
+ | E.g., for a Windows Machine | ||
+ | iio_attr -u serial: | ||
+ | </ | ||
+ | * <URI> specifies the URI similar to the one used in [[resources: | ||
+ | * < | ||
+ | * < | ||
+ | * < | ||
+ | An example output of this command should look like the one below: | ||
+ | {{: | ||
+ | |||
+ | === Reading and Writing Device Attributes === | ||
+ | The -d option of the **[[: | ||
+ | < | ||
+ | For reading, use iio_attr -u <URI> -d < | ||
+ | For writing, use iio_attr -u <URI> -d < | ||
+ | e.g., for a Windows Machine | ||
+ | iio_attr -u serial:COM4 -d adpd410x sampling_frequency 40 | ||
+ | </ | ||
+ | * <URI> specifies the URI similar to the one used in [[resources: | ||
+ | * < | ||
+ | * < | ||
+ | An example output of this command should look like the one below: | ||
+ | {{: | ||
==== IIO Oscilloscope ==== | ==== IIO Oscilloscope ==== | ||
+ | <note important> | ||
+ | - Install and start IIO-Oscilloscope. There are two options you can use to select IIO contexts. First, you can use the Serial option and input the correct port settings of the board from the Device Manager. Another way is by manually entering the URI used in [[resources: | ||
+ | - Press Refresh to display available IIO Devices, and once adpd410x is detected, press Connect. It may take several presses to Connect before the software proceeds and opens the Debug Panel and Waveform Panel\\. {{: | ||
- | ==== PyADI-IIO ==== | + | === Debug Panel === |
+ | In the Debug Panel, you can directly access the device/ | ||
+ | {{: | ||
- | ===== Schematic, PCB Layout, Bill of Materials ===== | + | === Waveform Panel === |
+ | The Waveform panel, also known as the Capture window, displays the real-time waveform | ||
+ | <WRAP important> | ||
+ | {{: | ||
+ | <note important> | ||
+ | ==== Python and PyADI-IIO ==== | ||
+ | [[/ | ||
+ | |||
+ | === Installing the Packages === | ||
+ | <note important> | ||
+ | Install PyADI-IIO using one of the methods in [[/ | ||
+ | |||
+ | There are two example scripts found in the examples folder in [[/ | ||
+ | |||
+ | If you are using [[https:// | ||
+ | - Clone or download the pyadi-iio repository [[repo> | ||
+ | - Open command prompt or terminal and navigate to the // | ||
+ | - Enter the following commands: < | ||
+ | ...\pyadi-iio\> | ||
+ | ...\pyadi-iio\> | ||
+ | ...\pyadi-iio\> | ||
+ | </ | ||
+ | <note important> | ||
+ | |||
+ | === Running the Examples === | ||
+ | There are three example scripts for the ADPD410x found in [[repo> | ||
+ | For example 1, follow these steps: | ||
+ | - Connect the [[ADI> | ||
+ | - Connect the [[ADI> | ||
+ | - Open command prompt or terminal and navigate to the examples folder inside the downloaded or cloned // | ||
+ | - Run the example using the command: < | ||
+ | - Input the noted serial port and press // | ||
+ | - Once connected, press //Read//\\ {{: | ||
+ | \\ | ||
+ | For example 2, follow these steps: | ||
+ | - Connect the [[ADI> | ||
+ | - Connect the [[ADI> | ||
+ | - Open command prompt or terminal and navigate to the examples folder inside the downloaded or cloned // | ||
+ | - Run the example script using the command: < | ||
+ | - The script will ask for a serial port. Input the noted serial port and press Enter. In cases when the board is not found, press the reset button (S1) on the [[ADI> | ||
+ | - When the board is detected, you will be asked to specify the number of channels (1 to 8) you want to read. Then, you need to specify the desired channel numbers (1 to 8).\\ {{: | ||
+ | - A plot will appear showing the specified channels. You have the option to save a copy of the displayed waveform at any point in time using the matplotlib controls at the top.\\ {{: | ||
+ | \\ | ||
+ | For example 3, follow these steps: | ||
+ | - Connect the [[ADI> | ||
+ | - Connect the [[ADI> | ||
+ | - Open command prompt or terminal and navigate to the examples folder inside the downloaded or cloned // | ||
+ | - Run the example script using the command: < | ||
+ | - A GUI window will appear, as shown below. There are four buttons at the top right for each test namely, open onboard LED test, covered onboard LED test, no load test, and mounted jig test. **Before pressing a button to start the test, select the noted COM port on the dropdown list at the top left.**\\ {{: | ||
+ | * **Open Onboard LED Test**\\ The test samples raw ADC values from the onboard photodiode and checks whether it is consistent with the standard. Make sure that all shunts on jumper header P10 are present and connected. A sample passing result is shown below\\ {{: | ||
+ | * **Covered Onboard LED Test**\\ Place your finger above the onboard photodiode and LED.\\ {{: | ||
+ | * **No Load Test**\\ Remove all shunts on jumper header P10. This test checks the photodiode input when no external sensor is connected. A sample passing result is shown below.\\ {{: | ||
+ | * **Mounted Jig Test**\\ Using the simple test schematic shown in [[resources: | ||
+ | \\ | ||
+ | \\ | ||
+ | ===== Schematic, PCB Layout, Bill of Materials ===== | ||
<WRAP round 80% download> | <WRAP round 80% download> | ||
- | [[adi>cn0xxx-designsupport|EVAL-AD410X-ARDZ Design & Integration Files]] | + | [[adi>media/ |
- | * Schematics | + | |
- | * PCB Layout | + | * Schematic |
- | * Bill of Materials | + | * PCB Layout |
+ | * Bill of Materials | ||
* Allegro Project | * Allegro Project | ||
+ | |||
</ | </ | ||
+ | \\ | ||
===== Additional Information and Useful Links ===== | ===== Additional Information and Useful Links ===== | ||
* [[ADI> | * [[ADI> | ||
* [[ADI> | * [[ADI> | ||
+ | * [[: | ||
+ | |||
+ | |||
+ | =====Registration===== | ||
+ | <WRAP round tip 80% > | ||
+ | Receive software update notifications, | ||
+ | |||
- | // End of Document // | + | //End of Document// |