This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
university:courses:electronics:electronics-lab-14 [20 Sep 2019 16:12] – Pop Andreea | university:courses:electronics:electronics-lab-14 [25 Jun 2020 22:07] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
======Activity: | ======Activity: | ||
=====R-2R Resistor Ladder Digital to Analog Converter===== | =====R-2R Resistor Ladder Digital to Analog Converter===== | ||
- | =====Objective: | + | ====Objective: |
The objective of this exercise is to explore the concepts of digital to analog conversion making use of the CMOS inverter as reference switches for a resistor ladder divider (used in DAC). | The objective of this exercise is to explore the concepts of digital to analog conversion making use of the CMOS inverter as reference switches for a resistor ladder divider (used in DAC). | ||
- | =====Background: | + | ====Background: |
We will exploit the simple CMOS inverter logic gate as a pair of switches. The digital I/O signals of the ADALM2000 module can be configured as standard CMOS dividers with a +3.3 Volt supply (push-pull mode). In the simplest form, a CMOS output consists of one PMOS device, M< | We will exploit the simple CMOS inverter logic gate as a pair of switches. The digital I/O signals of the ADALM2000 module can be configured as standard CMOS dividers with a +3.3 Volt supply (push-pull mode). In the simplest form, a CMOS output consists of one PMOS device, M< | ||
Line 15: | Line 15: | ||
When used in what is referred to as " | When used in what is referred to as " | ||
- | =====Materials: | + | ====Materials: |
ADALM2000 Active Learning Module\\ | ADALM2000 Active Learning Module\\ | ||
Solder-less breadboard\\ | Solder-less breadboard\\ | ||
Line 23: | Line 23: | ||
1 - OP27 amplifier | 1 - OP27 amplifier | ||
- | =====Directions: | + | ====Directions: |
Build the 8 bit resister ladder circuit shown in figure 2, preferably on your solder-less breadboard. The number of resistors normally supplied in the Analog Parts Kit is not sufficient to build the full 8 bit ladder. It is best to use 1% resistors for this project if you have access to them. | Build the 8 bit resister ladder circuit shown in figure 2, preferably on your solder-less breadboard. The number of resistors normally supplied in the Analog Parts Kit is not sufficient to build the full 8 bit ladder. It is best to use 1% resistors for this project if you have access to them. | ||
Line 33: | Line 33: | ||
Connect the 8 digital outputs designated by the blue boxes, and the scope channel and AWG output designated by the green boxes to the resistor ladder circuit as shown. Remember to connect power to the op amp supply pins. | Connect the 8 digital outputs designated by the blue boxes, and the scope channel and AWG output designated by the green boxes to the resistor ladder circuit as shown. Remember to connect power to the op amp supply pins. | ||
- | =====Hardware Setup:===== | + | ====Hardware Setup:==== |
{{ : | {{ : | ||
Line 39: | Line 39: | ||
<WRAP centeralign > Figure 3 R-2R Resistor Ladder Circuit Breadboard Connections </ | <WRAP centeralign > Figure 3 R-2R Resistor Ladder Circuit Breadboard Connections </ | ||
- | =====Proceduce:===== | + | ====Procedure:==== |
With both R< | With both R< | ||
Line 56: | Line 56: | ||
Change the digital pattern. Try the Random pattern and open the FFT window on the scope. You can also load custom patterns by making a plain text csv file with a column of numbers ranging from 0 to 255 (for the 8 bit wide bus). Load your custom pattern and see what happens. | Change the digital pattern. Try the Random pattern and open the FFT window on the scope. You can also load custom patterns by making a plain text csv file with a column of numbers ranging from 0 to 255 (for the 8 bit wide bus). Load your custom pattern and see what happens. | ||
- | Here are some pre-made waveform files you can try: Sine, Triangle, Gaussian pulse etc. [[ https:// | + | Here are some pre-made waveform files you can try: Sine, Triangle, Gaussian pulse etc. [[downgit>education_tools/ |
=====AD5626 12-bit nanoDAC===== | =====AD5626 12-bit nanoDAC===== | ||
Line 77: | Line 77: | ||
{{ : | {{ : | ||
<WRAP centeralign > Figure 7. Unipolar code table of AD5626</ | <WRAP centeralign > Figure 7. Unipolar code table of AD5626</ | ||
- | ===Hardware setup=== | + | ====Materials==== |
+ | ADALM2000 Active Learning Module\\ | ||
+ | Solder-less breadboard\\ | ||
+ | Jumper wires\\ | ||
+ | 1 - AD5626 12-bit nanoDAC\\ | ||
+ | 1 - 2.2 KΩ resistor\\ | ||
+ | 1 - 0.001 uF capacitor\\ | ||
+ | 1 - 0.1 uF capacitor\\ | ||
+ | 1 - 10 uF capcitor\\ | ||
+ | |||
+ | ====Hardware setup==== | ||
Connect the pins of AD5626 as shown in figure 8. | Connect the pins of AD5626 as shown in figure 8. | ||
{{ : | {{ : | ||
<WRAP centeralign > Figure 8. Connections for Unipolar operation AD5626</ | <WRAP centeralign > Figure 8. Connections for Unipolar operation AD5626</ | ||
- | {{ : | + | {{ : |
<WRAP centeralign > Figure 9. AD5626 breadboard connections</ | <WRAP centeralign > Figure 9. AD5626 breadboard connections</ | ||
- | ===Procedure=== | + | ====Procedure==== |
Open Scopy and enable the positive power supply to 5V. in Pattern generator you should configure the DAC input signals according to the timing diagram of AD5626 presented in datasheet. | Open Scopy and enable the positive power supply to 5V. in Pattern generator you should configure the DAC input signals according to the timing diagram of AD5626 presented in datasheet. | ||
- | Start by configuring SPI signals. Create a group channel with DIO0, DIO1 and DIO2. If the connections were done as in figure 8 then DIO0 is the clock signal, DIO2 the data signal and DIO0 the /CS signal. | + | Start by configuring SPI signals. Create a group channel with DIO0, DIO1 and DIO2. If the connections were done as in figure 8 then DIO1 is the clock signal, DIO2 the data signal and DIO0 the /CS signal. |
+ | Pay attention that the digital channels are in the right order when grouped as SPI (see figure 11). | ||
It is specified in datasheet that the clock width for both high and low states should be at least 30 ns. From this you can compute the clock period and therefore maximum frequency. | It is specified in datasheet that the clock width for both high and low states should be at least 30 ns. From this you can compute the clock period and therefore maximum frequency. | ||
Set the clock frequency to 1Mhz. Set CLK Polarity and CLK Phase to 1. | Set the clock frequency to 1Mhz. Set CLK Polarity and CLK Phase to 1. | ||
Line 116: | Line 127: | ||
<WRAP centeralign > Figure 12. AD5626 output voltage for 7FF input.</ | <WRAP centeralign > Figure 12. AD5626 output voltage for 7FF input.</ | ||
+ | ===== Bipolar output operation===== | ||
+ | Although the AD5626 has been designed for single-supply operation, bipolar operation is achievable using the circuit | ||
+ | illustrated in Figure 13. | ||
+ | |||
+ | {{ : | ||
+ | <WRAP centeralign > Figure 13. Bipolar output operation without trim</ | ||
+ | |||
+ | This circuit can be used for applications that do not require high accuracy. | ||
+ | voltage is coded in offset binary and is given by: | ||
+ | \\ | ||
+ | < | ||
+ | |||
+ | \\ | ||
+ | For the ±5V output range and the circuit values shown in the table in figure 13 the transfer equation becomes: | ||
+ | \\ | ||
+ | < | ||
+ | \\ | ||
+ | |||
+ | ====Materials==== | ||
+ | ADALM2000 Active Learning Module\\ | ||
+ | Solder-less breadboard\\ | ||
+ | Jumper wires\\ | ||
+ | 1 - AD5626 12-bit nanoDAC\\ | ||
+ | 1 - 0.1 uF capacitor\\ | ||
+ | 1 - 1 KΩ resistor\\ | ||
+ | 1 - 20 KΩ resistor\\ | ||
+ | 2 - 10 KΩ resistors\\ | ||
+ | 1 - 47 KΩ resistor\\ | ||
+ | 1 - 470 KΩ resistor\\ | ||
+ | ====Hardware setup==== | ||
+ | Build the circuit presented in figure 13 on your solderless breadboard. | ||
+ | {{ : | ||
+ | <WRAP centeralign > Figure 14. AD5626 Bipolar output operation breadboard connections</ | ||
+ | |||
+ | ====Procedure==== | ||
+ | You can configure the DAC for unipolar output operation as described above. For the voltage reference use the channel 1 of the Signal generator | ||
+ | On the second channel of the oscilloscope visualize the voltage at the output of the opamp. | ||
+ | You can visualize both the voltages for unipolar operation and bipolar operation at the same time on the oscilloscope. | ||
+ | |||
+ | {{ : | ||
+ | <WRAP centeralign > Figure 15. Unipolar and Bipolar output voltage for 000 input</ | ||
+ | |||
+ | {{ : | ||
+ | <WRAP centeralign > Figure 16. Unipolar and Bipolar output voltage for 800 input</ | ||
+ | |||
+ | {{ : | ||
+ | <WRAP centeralign > Figure 17. Unipolar and Bipolar output voltage for FFF input</ | ||
=====Questions: | =====Questions: | ||
Line 132: | Line 190: | ||
<WRAP round download> | <WRAP round download> | ||
**Resources: | **Resources: | ||
- | * Fritzing files: [[ https:// | + | * Fritzing files: [[downgit>education_tools/ |
- | * LTspice files: [[ https:// | + | * LTspice files: [[downgit>education_tools/ |
</ | </ | ||