Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
university:tools:m1k:hw [03 Dec 2014 20:23] – created Ian Daniheruniversity:tools:m1k:hw [10 Nov 2015 20:54] – [Voltage Measurement] Brandon Bushey
Line 1: Line 1:
-=== Introduction ===+====== ADALM1000 ======
  
-The ADALM1000 is a learning tool designed to make interacting with the world around you easier and more intuitive. Offering two analog channels, it allows you to source and measure waveforms in voltage or current, easily characterising arbitrary systems in terms of voltage vs current, over time, and over frequency. To offer this functionality, it uses a number of building blocks to take the fixed 5V supply and digital interface of USB and offer voltage and current operation from 0v to 5v, from -200mA to 200mA, with precision and accuracy better than 100uV, 100uA, and 10uS.+===== Introduction =====
  
-=== USB ===+{{ :university:tools:m1k:adalm1000_angle_small.png?direct&150|}}
  
-USB is a high complexity, high speed digital interface designed for PC peripheralsoffering a number of defailt device types and communication schemesWhile tremendously useful for the "last inches" of interface between host PC and the M1K, the pieces of the M1K responsible for converting between analog values and digital words (analog-digital converters (ADCand digital-analog converters (DAC)) use simplerless robust communication schemes necessitating "glue" between a computer and the analog systems for voltage/current measurement and control. On the M1K, this glue is a microcontroller using a CPU designed by ARM (Cortex M3).+The [[adi>ADALM1000]] is a learning tool designed to make interacting with the world around you easier and more intuitive. Offering two analog channels, it allows you to source and measure waveforms in voltage or currenteasily characterizing arbitrary systems in terms of voltage vs current, over time, and over frequencyTo offer this functionality, it uses number of building blocks to take the fixed supply and digital interface of USB and offer voltage and current operation from 0 to 5 Volts (V), from -200 to 200 milliamps (mA), with precision and accuracy better than 100µV, 100µA, and 10µS.
  
-In addition to the three serial peripheral interfaces (SPI busses) used for the two ADCs and one DAC, the microcontroller also offers:+===== USB =====
  
 +[[wp>USB|Universal Serial Bus (USB)]] is a high complexity, high speed digital interface designed for PC peripherals, offering a number of default device types and communication schemes. While tremendously useful for the "last inches" of interface between a host PC and the M1K, the pieces of the M1K responsible for converting between analog values and digital words (analog-digital converters (ADC) and digital-analog converters (DAC)) use simpler, less robust communication schemes necessitating "glue" between a computer and the analog systems for voltage/current measurement and control. On the M1K, this glue is a microcontroller using a CPU designed by ARM (Cortex M3).
 +
 +In addition to the three serial peripheral interfaces (SPI busses) used for the two ADCs and one DAC, the microcontroller also offers:
   * timer-counters used for controlling ''when'' the data converters sample   * timer-counters used for controlling ''when'' the data converters sample
   * pulse-width modulation, used to set the unique LED color of each M1K on the three-channel (RGB) LED   * pulse-width modulation, used to set the unique LED color of each M1K on the three-channel (RGB) LED
-  * two-wire interface, similar to SMBUS or I2C, used as a low-speed communication network between the microcontroller controller and other "housekeeping" components+  * two-wire interface, ([[wp>I2C]], used as a low-speed communication network between the microcontroller controller and other "housekeeping" components
   * digital input-output pins used for both the user-accessible programmable IO pins and to control the internal switches used in the analog frontend   * digital input-output pins used for both the user-accessible programmable IO pins and to control the internal switches used in the analog frontend
   * 32 kilobytes SRAM, allowing for local data buffering and the potential for loading user-supplied software directly on to the device   * 32 kilobytes SRAM, allowing for local data buffering and the potential for loading user-supplied software directly on to the device
Line 18: Line 21:
 The microcontroller is only one of the pieces sitting between the USB connector and the analog components used for the front-end interface. Besides mapping between digital protocols, there is one more big problem to solve before we can build the analog system: power. The microcontroller is only one of the pieces sitting between the USB connector and the analog components used for the front-end interface. Besides mapping between digital protocols, there is one more big problem to solve before we can build the analog system: power.
  
-=== Power ===+===== Power =====
  
-The USB specification (available from the USB implementers forum) is a 600+ page document describing every aspect of the ideal operation of a USB2.0 device. It requires that attached devices consume less than 500mA from the provided voltage supply, which is allowed to range from as high as 5.25v to as low as 4.40v - a wide span clearly unacceptable for a precision tool! Additionally, the power available on USB ports can vary widely in terms of both electrical noise and electrical protection. An [[|out-of-spec device]] attached to the shared USB bus can throw tens or even hundreds of millivolts of noise onto the voltage supply. A poorly crafted computer may not handle overcurrent conditions on a USB bus with anything more than an immediate and complete power-off, or worse, permenantly disabling a USB port. It would be unfortunate if using the M1K on an old computer degraded the accuracy of measurements and unacceptable if making mistakes during the normal operation of the device put the attached computer at risk of damage or lost data. To address these issues and provide protected, low noise voltage supplies to the analog frontend, a sophisticated supply chain as designed to ensure that regardless of input, the full 0-5v range is available at the output, and regardless of shorting or overvolting the device, the host PC is not exposed to unacceptable risk.+The USB specification (available from the [[http://www.usb.org/home|USB implementers forum]]) is a 600+ page document describing every aspect of the ideal operation of a USB2.0 device. It requires that attached devices consume less than 500mA from the provided voltage supply, which is allowed to range from as high as 5.25v to as low as 4.40v - a wide span clearly unacceptable for a precision tool! Additionally, the power available on USB ports can vary widely in terms of both electrical noise and electrical protection. An [[wp>USB#Power|out-of-spec device]] attached to the shared USB bus can throw tens or even hundreds of millivolts of noise onto the voltage supply. A poorly crafted computer may not handle overcurrent conditions on a USB bus with anything more than an immediate and complete power-off, or worse, permanently disabling a USB port. It would be unfortunate if using the M1k on an old computer degraded the accuracy of measurements and unacceptable if making mistakes during the normal operation of the device put the attached computer at risk of damage or lost data. To address these issues and provide protected, low noise voltage supplies to the analog frontend, a sophisticated supply chain as designed to ensure that regardless of input, the full 0-5v range is available at the output, and regardless of shorting or over volting the device, the host PC is not exposed to unacceptable risk.
  
-The M1K power chain consists of a grand total of three linear voltage regulators, two switching voltage regulators, a "hot-swap" controller, and a precision reference. The crude 5v supply from the USB bus is first used to supply a 3.3v to the microcontroller, which is generated using an [[http://www.analog.com/static/imported-files/data_sheets/ADP7118.pdf|ADP7118 fixed voltage linear regulator]]. This regulator, and the microcontroller it supplies, are always-on, as the microcontroller is responsible for requesting the full 500mA available from the host. After device enumeration, the analog frontend is enabled using the [[www.analog.com/static/imported-files/data_sheets/ADM1177.pdf|ADM1177 hot-swap controller]], which allows for the well-behaved turn-on of the remainder of the power section, as well as overcurrent (short-circuit) protection. The ADM1177 monitors the drop across a 0.1 ohm current-sense shunt resistor and controls the gate of a nFET power transistor. When the enable pin of the hot-swap controller is driven high, it pumps current into the gate of the switching transistor at a rate determined by an external capacitor, until the gate of the transistor is substantially above the input voltage, and the transistor acts as a series resistor with a fixed (small) resistance. The current shunt resistor is constantly monitored by the ADM1177, and when the voltage drop across the shunt resistor increases to more than 100mV (corresponding to 1a) for longer than the 270uS defined by the 100nF of C11, between the ADM1177 soft-start pin and ground, the power to the analog half of the board is disabled. This configuration allows for hardware overcurrent protection while leaving a healthy margin between the USB specified maximum current and the point at which a host computer is potentially at risk. The controller also serves to control the inrush current associated with the large energy storage capacitors that sit between the upstream power source and the analog section of the device. These components are important to allow for local demand current to exceed the capability of the upstream supply for short periods of time, but were they not slowly ramped up to their working voltage, they would draw potentially amps of current for a few microseconds when te device was first connected, potentially resulting in a fault condition on the host.+The M1K power chain consists of a grand total of three linear voltage regulators, two switching voltage regulators, a "hot-swap" controller, and a precision reference. The crude 5V supply from the USB bus is first used to supply a 3.3v to the microcontroller, which is generated using an [[adi>ADP7118]] fixed voltage linear regulator. This regulator, and the microcontroller it supplies, are always-on, as the microcontroller is responsible for requesting the full 500mA available from the host. After device enumeration, the analog frontend is enabled using the [[adi>ADM1177]] hot-swap controller, which allows for the well-behaved turn-on of the remainder of the power section, as well as overcurrent (short-circuit) protection. The [[adi>ADM1177]] monitors the drop across a 0.1 ohm current-sense shunt resistor and controls the gate of a N-FET power transistor. When the enable pin of the hot-swap controller is driven high, it pumps current into the gate of the switching transistor at a rate determined by an external capacitor, until the gate of the transistor is substantially above the input voltage, and the transistor acts as a series resistor with a fixed (small) resistance. The current shunt resistor is constantly monitored by the ADM1177, and when the voltage drop across the shunt resistor increases to more than 100mV (corresponding to 1A) for longer than the 270µS defined by the 100nF of C11, between the ADM1177 soft-start pin and ground, the power to the analog half of the board is disabled. This configuration allows for hardware overcurrent protection while leaving a healthy margin between the USB specified maximum current and the point at which a host computer is potentially at risk. The controller also serves to control the inrush current associated with the large energy storage capacitors that sit between the upstream power source and the analog section of the device. These components are important to allow for local demand current to exceed the capability of the upstream supply for short periods of time, but were they not slowly ramped up to their working voltage, they would draw potentially amps of current for a few microseconds when te device was first connected, potentially resulting in a fault condition on the host.
  
-There are two switch-mode regulators which use energy storage in inductors to accomplish what is difficult (not quite impossible) to do with standard CMOS (complimentary metal-oxide transistor, resistor, capacitor) circuits - increase voltage and provide a negative voltage. An [[http://www.analog.com/static/imported-files/data_sheets/ADP1614.pdf | ADP1614-based boost-converter]] is used to generate a 6.5 volt power supply rail by fluxing up an inductor and causing a sudden change in current to generate a voltage above that which is used to store energy in the magnetic flux of the core of the inductor. This boosted power supply is relatively noisy, with frequency components from the switching frequency (fixed at 1.3MHz) to several times this, resulting from the inconsistent voltage and current output waveforms. A [[http://en.wikipedia.org/wiki/Capacitor-input_filter | pi-topology filter]] and a large output capacitor serve to attenuate the high frequency noise components and average the output voltage. The result is a 6.5v supply with relatively little output noise with little current draw. As the current draw increases, the output noise does as well, and some broadband noise remains due to the inherently noisy topolyg of the boost converter. To reduce the noise further, and supply a clean "high" voltage rail to the analog frontend, which must be able to supply 5v at up to 200mA, the [[http://www.analog.com/static/imported-files/data_sheets/ADM7171.pdf | ADM7171]] adjustable voltage regulator is used to convert the approximately 500mV of headroom voltage, along with the ~50mV of electrical noise, into heat. The resulting 6v output from the adjustable linear regulator is comparitively free of noise, across the entire spectrum. This 6.0v supply is used for the analog components in the output stage. This 6v0 supply provides more than the required headroom to allow the output amplifiers to supply 5v at the output, even after the additional voltage drops associated with the analog frontend. The [[http://www.analog.com/static/imported-files/data_sheets/ADP2442.pdf | ADP2442]] is the second switching regulator, [[http://www.analog.com/static/imported-files/application_notes/AN-1269.pdf | used in an inverting buck-boost configuration]] to supply a voltage below the minimum supply (0v, ground) of USB. To provide output operation all the way down to ground (0v), a negative one volt rail (-1v0) is generated in a fashion similar to the 6v5 rail generation described above - energy is stored in an inductor, and a sudden change in current creates a potential ''less than'' that of ground. A similar pi filter topology is used to attenuate the out of band signals created by this process, resulting in an adequately clean -1v0 supply, which powers the output stage, as well as the servo amplifier.+There are two switch-mode regulators which use energy storage in inductors to accomplish what is difficult (not quite impossible) to do with standard CMOS (complimentary metal-oxide transistor, resistor, capacitor) circuits - increase voltage and provide a negative voltage. An [[adi>ADP1614]] based boost-converter is used to generate a 6.5 volt power supply rail by fluxing up an inductor and causing a sudden change in current to generate a voltage above that which is used to store energy in the magnetic flux of the core of the inductor. This boosted power supply is relatively noisy, with frequency components from the switching frequency (fixed at 1.3MHz) to several times this, resulting from the inconsistent voltage and current output waveforms. A [[wp>Capacitor-input_filter| pi-topology filter]] and a large output capacitor serve to attenuate the high frequency noise components and average the output voltage. The result is a 6.5v supply with relatively little output noise with little current draw. As the current draw increases, the output noise does as well, and some broadband noise remains due to the inherently noisy topolyg of the boost converter. To reduce the noise further, and supply a clean "high" voltage rail to the analog frontend, which must be able to supply 5v at up to 200mA, the [[adi>ADM7171]] adjustable voltage regulator is used to convert the approximately 500mV of headroom voltage, along with the ~50mV of electrical noise, into heat. The resulting 6v output from the adjustable linear regulator is comparitively free of noise, across the entire spectrum. This 6.0v supply is used for the analog components in the output stage. This 6v0 supply provides more than the required headroom to allow the output amplifiers to supply 5v at the output, even after the additional voltage drops associated with the analog front end. The [[adi>ADP2442]] is the second switching regulator, [[adi>AN-1269]] used in an inverting buck-boost configuration to supply a voltage below the minimum supply (0v, ground) of USB. To provide output operation all the way down to ground (0v), a negative one volt rail (-1v0) is generated in a fashion similar to the 6v5 rail generation described above - energy is stored in an inductor, and a sudden change in current creates a potential ''less than'' that of ground. A similar pi filter topology is used to attenuate the out of band signals created by this process, resulting in an adequately clean -1v0 supply, which powers the output stage, as well as the servo amplifier.
  
-Having generated the voltages required for the output stage, additional clean supplies are required for operating other aspects of the analog systems. The data converters (DAC and ADC) require that the analog output/input voltages are less than or equal to the supply voltage, and both require a supply voltage less than 5.5v. As such, a 5.0v rail is generated using the [[http://www.analog.com/static/imported-files/data_sheets/ADP7118.pdf | ADP7118 linear regulator]] from the 6.0v rail described above, offering a low noise, high precision voltage supply for the remainder of the mixed-signal components, afforementioned AD5663R digital-analog converter, the two AD7682 analog-digital converters, the AD8210 current-sense differential amplifier, and the ADG719 analog mode-switch. The even lower noise 5.0v supply is in turn used to power a precision voltage reference, the [[http://www.analog.com/static/imported-files/data_sheets/ADR380_381.pdf | ADR381]], which is used in conjunction with a 510 ohm load resistor to provide a high precision, low noise 2.5v supply capable of sourcing and sinking the few milliamps of current required by the analog frontend.+Having generated the voltages required for the output stage, additional clean supplies are required for operating other aspects of the analog systems. The data converters (DAC and ADC) require that the analog output/input voltages are less than or equal to the supply voltage, and both require a supply voltage less than 5.5v. As such, a 5.0v rail is generated using the [[adi>ADP7118]] linear regulator from the 6.0v rail described above, offering a low noise, high precision voltage supply for the remainder of the mixed-signal components, afforementioned AD5663R digital-analog converter, the two AD7682 analog-digital converters, the AD8210 current-sense differential amplifier, and the ADG719 analog mode-switch. The even lower noise 5.0v supply is in turn used to power a precision voltage reference, the [[adi>ADR381]], which is used in conjunction with a 510 ohm load resistor to provide a high precision, low noise 2.5v supply capable of sourcing and sinking the few milliamps of current required by the analog frontend.
  
-=== Analog Overview ===+===== Analog Overview =====
  
 ==== Digital-Analog Conversion ==== ==== Digital-Analog Conversion ====
  
-To afford analog output from a digitally connected device, signal conversion from binary representations of a waveform to an analog approximation. This process is achieved using the two channel AD5663R digital to analog converter, offering 16b conversions, a fast settling time (high bandwidth), and a simple digital interface. The digital interface is accomplished using a clocked digital serial protocol closely related to the Serial Peripheral Interface (or SPI) standard. Twenty-four bit words containing sixteen bits of data and eight configuration bits are written to a digital line, starting with the high bit, proceeding to the last. A separate clock line is used to specify at what points in time the data is valid. A synchronisation line is strobbed to alternate subsequent 24b words. A latch line is strobbed to trigger the conversion of words stored in device memory to an analog voltage on the output lines. For each sample on the device, two 24b words are written, strobing the synchronization line between them, and then the latch line is toggled to simultaneously start the change in analog value. In order to reduce the high frequency components of the change in analog value, two series one-pole low-pass filters were placed on the analog output of the device, offering 6dB of attenuation per decade of frequency, reducing high order harmonics to negligible amplitude.+To afford analog output from a digitally connected device, signal conversion from binary representations of a waveform to an analog approximation. This process is achieved using the two channel [[adi>AD5663R]] digital to analog converter, offering 16b conversions, a fast settling time (high bandwidth), and a simple digital interface. The digital interface is accomplished using a clocked digital serial protocol closely related to the Serial Peripheral Interface (or SPI) standard. Twenty-four bit words containing sixteen bits of data and eight configuration bits are written to a digital line, starting with the high bit, proceeding to the last. A separate clock line is used to specify at what points in time the data is valid. A synchronisation line is strobbed to alternate subsequent 24b words. A latch line is strobbed to trigger the conversion of words stored in device memory to an analog voltage on the output lines. For each sample on the device, two 24b words are written, strobing the synchronization line between them, and then the latch line is toggled to simultaneously start the change in analog value. In order to reduce the high frequency components of the change in analog value, two series one-pole low-pass filters were placed on the analog output of the device, offering 6dB of attenuation per decade of frequency, reducing high order harmonics to negligible amplitude.
  
 ==== Analog-Digital Conversion ==== ==== Analog-Digital Conversion ====
Line 50: Line 53:
 ==== Voltage Measurement ==== ==== Voltage Measurement ====
  
 +
 +TBD
 ==== Current Measurement ==== ==== Current Measurement ====
  
Line 64: Line 69:
 Let us first consider the topology of the AD82xx family by examining Figure 1 in the AD8210 datasheet. To paraphrase both the theory of operation section (pg X) and conversations with ADI personell familiar with the part... a current-mode difference amplifier comprised of R1, R2, A1, Q1, Q2 acts to convert a small voltage difference across the inputs into a current difference through the emitters of Q1 and Q2, which serve as preamplifiers and buffers from the input to the output gain stage. R3 and R4 convert these current differences back into ground-referenced voltage differences, where the instrumentation amplifier A2 has well-defined operation and subtracts and multiplies these voltages, offering a midpoint referenced output voltage with a net gain of 20x. Let us first consider the topology of the AD82xx family by examining Figure 1 in the AD8210 datasheet. To paraphrase both the theory of operation section (pg X) and conversations with ADI personell familiar with the part... a current-mode difference amplifier comprised of R1, R2, A1, Q1, Q2 acts to convert a small voltage difference across the inputs into a current difference through the emitters of Q1 and Q2, which serve as preamplifiers and buffers from the input to the output gain stage. R3 and R4 convert these current differences back into ground-referenced voltage differences, where the instrumentation amplifier A2 has well-defined operation and subtracts and multiplies these voltages, offering a midpoint referenced output voltage with a net gain of 20x.
  
-This topology offers many of the advantages of the previously described architectures, while using a level-shifting current-mode topology to work around the inherent limitations of the above. The incorporation of all the necessary well-matched components on the same piece of silicon as the main amplifier allows for factory trimming to maintain the high common mode rejection required, and the level shifting architecture prevents the saturation of the instrumentation amplifier across a wide range of common mode voltages. "Popping the hood" on this part and inspecting the SPICE netlist model offers additional insight into the operation of this component. The "input stage" section of [[http://www.analog.com/static/imported-files/spice_models/AD8210.cir | the netlist]] can be represented as follows:+This topology offers many of the advantages of the previously described architectures, while using a level-shifting current-mode topology to work around the inherent limitations of the above. The incorporation of all the necessary well-matched components on the same piece of silicon as the main amplifier allows for factory trimming to maintain the high common mode rejection required, and the level shifting architecture prevents the saturation of the instrumentation amplifier across a wide range of common mode voltages. "Popping the hood" on this part and inspecting the SPICE netlist model offers additional insight into the operation of this component. The "input stage" section of [[adi>AD8210]] SPICE netliest can be represented as follows:
  
 It was surprising to discover several facts as depicted in this representation of the device. First, a biasing diode, responsible for ensuring the currents, when operating with common mode voltages less than or equal to 5VDC, do not produce erroneous voltages further down the signal chain. Also surprising was the corresponding nature of the stated 1.5k common mode input impedance for this operating regime - the resistance described in the datasheet is not to ground, but to the high rail voltage supply. Moreover, this impedance does not apply continuously to 5v, but to input signals within approximately a diode drop (0.2v-0.7v) of the 5v rail. It was surprising to discover several facts as depicted in this representation of the device. First, a biasing diode, responsible for ensuring the currents, when operating with common mode voltages less than or equal to 5VDC, do not produce erroneous voltages further down the signal chain. Also surprising was the corresponding nature of the stated 1.5k common mode input impedance for this operating regime - the resistance described in the datasheet is not to ground, but to the high rail voltage supply. Moreover, this impedance does not apply continuously to 5v, but to input signals within approximately a diode drop (0.2v-0.7v) of the 5v rail.
university/tools/m1k/hw.txt · Last modified: 14 Mar 2023 06:47 by Joyce Velasco