AN-2609: How to Generate Bidirectional Currents

Introduction

Current source-sink digital-to-analog converters (IDACs) are fundamental components in electronic systems that convert discrete digital signals into continuous analog signals. Among the diverse variety of IDACs configurations, most operate on the unidirectional principle, where the output current is sourced from the DAC. However, in certain applications, the need to handle currents in both positive and negative directions drives the design of bidirectional current converters. This application note explains how to generate bidirectional currents using low Ron analog switches and the difference between unidirectional and bidirectional IDACs, as well as applications where bidirectional currents are essential.

Source IDACs generate output currents that flow in one direction, either from the output terminal of the IDAC to a reference potential, such as ground, or vice versa, depending on the IDAC configuration. This design is effective for applications that rely exclusively on unidirectional signals, such as audio systems, motor control, and sensor networks. However, advanced systems such as photonics, bidirectional DC motor control, and microelectromechanical systems (MEMS) mirrors, require the additional drive capability to handle currents in both directions for optimal functionality. In these cases, a bidirectional current IDAC paired with an analog switch becomes a key component. These devices support bidirectional current flow, enabling sourcing operations as required by the application and making them versatile for applications with complex current flow requirements.

System Overview

Figure 1. System connection diagram

Theory of Operation

Unidirectional and Bidirectional Signals


IDACs are devices that convert digital signals, represented by binary numbers, into analog current signals. The directionality of the current—whether unidirectional or bidirectional—is determined by the architecture of the IDAC output stage. Independently, the mapping between digital codes and current levels can use either unsigned binary or signed formats, such as twos complement. The two signal classifications are described as follows:

  • Unidirectional signal. A unidirectional signal refers to a current flowing in a single polarity without reversing direction. This means that the output current is zero when the digital input value is zero. When the digital input value increases, the output current increases proportionally but always remains on the positive side of the reference axis (ground) as it is shown in Figure 2.
  • Bidirectional signal. In this case, the output current alternates between positive and negative polarities. When the value of the digital input is zero, the output current is not zero but is the most negative current possible. As the value of the digital input increases or decreases, the output current ranges from between positive and negative values, crossing the reference level (ground) as shown in Figure 3.

In summary, the difference between a unidirectional signal and a bidirectional signal generated by a current DAC lies in the presence or absence of negative currents at the output. A unidirectional signal has only positive current flow, while a bidirectional signal has current varying between positive and negative.

Figure 2. Unidirectional current (source)
Figure 3. Bidirectional current (source)

The majority of Analog Devices, Inc., IDAC portfolio provides the capability to generate only unidirectional output currents. The following section presents a circuit implementation for generating bidirectional current signals using Analog Devices IDACs and refers to the current portfolio of available products.

Circuit Concept


The operating principle of the system is represented in Figure 4 and Figure 5 where a controller, an IDAC, and a quad single-pole single-throw (SPST) switch are the main devices to implement the operation.

The quad SPST switch integrates four independent SPST switches into a single package, enabling precise control of multiple current paths, which is important for systems that manage bidirectional current flow. The controller coordinates the toggling of these switches to determine the current direction, while the IDAC generates and regulates the output waveforms. The output current from the IDAC flows through N-channel diffuse metal oxide semiconductor (NDMOS) switches that are activated directly by the controller digital input, eliminating the need for external drivers.

This synchronized operation allows the system to manage current transitions between positive and negative values effectively, ensuring reliable performance in applications such as motor control, signal generation, and other systems requiring bidirectional current management.

In Figure 4, at the output of the switch, taking the positive reference from M1 to M2, enabling S3 and S2 switches results in a positive current flowing into the load, whereas in Figure 5, taking the same reference direction M1 and M2, enabling S1 and S4 switches results in the opposite direction of the current flowing into the load, generating a negative current in the load.

Figure 4. Positive current flow
Figure 5. Negative current flow

To ensure proper operation and minimize power dissipation in the IDAC, the supply must be adjusted to keep the current source in compliance when the voltage at the load is maximum. If the resistance is too high, the voltage at the output may exceed the compliance range of the current source. To prevent this, the supply voltage (VDD) must be sufficient to support the voltage drop across the load at maximum current, plus the required headroom. This condition can be expressed as:

Equation 1

The maximum resistance is calculated by solving for RLOAD in Equation 1, resulting in Equation 2. For this calculation, it is important to know the maximum dropout voltage, which is defined by the minimum headroom needed to keep the current source in compliance, and the headroom is the difference between the PVDD and the IDAC output voltage VOUT.

Equation 2

where:
RLOAD is the maximum load that the IDAC can drive.
VDD is the output supply voltage.
VDropOut is the minimum headroom needed to keep the current source in compliance
IOUT is the output current sourced through the load at the selected DAC channel.

For example, if the LTC2672 is used in a 300mA range and the targeted IOUT = 200mA, VDD = 5V, and VDropOut = 0.72V, the maximum load resistance in the IOUT pin must be RLOAD ≤ 21.4Ω. For a more detailed explanation of compliance conditions, headroom requirements, and practical implementation example, refer to the AN-2010 Application Note.

Power Sharing Options and Ranges for IDAC and Analog Switch


One advantage of reusing power supplies is the potential size savings because it avoids the need to add low drop out voltage regulators (LDOs) or DC-DC converters, which can introduce noise into the system. Figure 6 and Figure 7 show the wiring diagrams using currently available components from the Analog Devices portfolio of IDACs and analog switches. IDAC products such as the LTC2662, LTC2672, and AD5770R, along with switches like the ADG2412 and ADG6412, are excellent candidates due to their flexible power supply options.

Figure 6. Unipolar supply
Figure 7. Bipolar supply

A multitude of power supply combinations can be realized allowing bipolar power supplies from +33V to −15V. Table 1 shows the different operating supply voltages of the existing products.

Note that the power dissipation in the IDAC can be reduced by using the V− power supply. The main condition is that VCC is within the safe operating range of the output supply. By performing the power dissipation calculation with a load of RLOAD= 10Ω and a constant output current of IIDAC = 100mA a significant reduction is observed when using different supply configurations. For example, when AVEE = −2V and PVDD = 1.45V, the on-chip power dissipation per channel is approximately 45mW, compared to 150mW when using AVEE = 0V and PVDD = 2.5V with the same load.

This improvement is explained by the following power dissipation formula:

Equation 3

The maximum current that can flow through the switch depends on the power supply, number of channels, and temperature of the switch. Table 2 shows the current flow as a function of temperature. At 25°C, combined IDACs and switches allow a maximum flow of full-scale 300mA. This decreases as the temperature rises and reaches a maximum of 117mA at 125°C.

Table 1. Operating Supply Voltages
Parameter IDACs Analog Switches
AD5770R LTC2662 LTC2672 ADG2412 ADG6412
VCC 2.85V to 5.5V N/A1
VDD 2.9V to VCC 2.85V to 33V 2.1V to VCC 4.5V to 16.5V 5V to 40V
VSS 0V to −3V 0V to −15.75V −5.5V to 0V −16.5V to 0V 0V to −22V

1 N/A means not applicable.

Table 2. Continuous Current Flow and Output Current
Parameter IDACs Analog Switches
AD5770R LTC2662 LTC2672 ADG2412 ADG6412
Temperature N/A1 25°C 85°C 125°C 25°C 85°C 125°C
Continuous Current (mA) 646 289 120 548 265 117
Output Current Per channel configurable up to 300mA N/A1 N/A1

1 N/A means not applicable.

How to Generate Different Types of Bidirectional Waveforms


The combination of IDAC and analog switch allows the user to generate a variety of bidirectional waveforms. To generate bidirectional waveforms, a half-cycle of the desired waveform must be synchronized with the activation of the switches. This allows the user to generate sine waveforms, square waveforms, and sawtooth waveforms.

The IDAC produces the absolute value of the desired waveform as a unidirectional output. The analog switch toggles when the waveform crosses zero, allowing the current flow direction to reverse and thus creating a full bidirectional waveform at the load.

Figure 8 illustrates this process. The first graph shows the waveform generated at the output of the IDAC, which is the absolute value of a sine wave, ranging from 0mA to 300mA, with a frequency of 1kHz. The second graph represents the enabling of the switches just as the half of the half-sine wave reaches its 1kHz period. Finally, the last graph shows the bidirectional waveform generated at the load. It is important to note that this waveform has twice the period of the IDAC output signal since a signal with half the frequency is used to generate the sine wave at the load. This relationship can be expressed as the following formula:

Equation 4
Figure 8. Bidirectional sine signal

The same principle applies to generate a square wave. In this case, the frequency of the square wave depends on the switching of the analog switch, as the IDAC is producing a DC current signal. As shown in Figure 9, the IDAC generates a full-scale constant current of 300mA. The switching signal has a frequency of 2 kHz, which results in a square waveform at the load with a frequency equal to half that value, that is, 1 kHz.

Figure 9. Bidirectional square signal

In order to generate any waveforms, it is important to take into account several timing aspects that influence the process. One of these aspects is the concept of dead time, defined as the interval between the change of state of two general-purpose input/output (GPIO) ports, from a high to a low state and vice versa. This dead time is required to allow the current to get close zero before reversing polarity; therefore, avoiding possible short circuits or damage to electronic components during switching.

There are different timing parameters that affect the waveform generation process. These parameters are shown in Figure 10 and described as follows:

  • tdead. A switch-dependent parameter. The period of time when both GPIOs are in transition between opposite states. That is, when one transitions from high to low and the other transitions from low to high. During this time interval, neither port is fully active in its new state, which prevents both ports from being active simultaneously.
  • tsync. A parameter related to the settling time of the IDAC, which affects the synchronization of the system.
  • tupdate. The time it takes to change the final IDAC output after the switch change plus the IDAC settling time.
Figure 10. Timing diagram

Self Heating


Regarding heat, it is essential to take this parameter into account due to its direct influence on the overall system performance and the current carrying capacity of the device. Excessive heating can compromise both the efficiency and the lifetime of the component.

The power consumed by the system is closely linked to several factors, including the output current provided by the IDAC. This current is crucial as it flows through the internal transistors of the switch. In addition, the number of active transistors, which in this application is two, also has a significant influence. As current flows through these transistors, it face internal resistance, which generates heat. Temperature is a direct indicator of the power consumed by the device.

Considering these factors, the power of the device can be calculated using Equation 5.

Equation 5

► where:
► Nchannels is the number of active channels on the switch.
► IIDAC is the total IDAC output current.
► Ron the ohmic resistance between Terminal D and Terminal S.

The maximum heating that can occur within the temperature range of −40°C to +85°C can be calculated using Equation 5, where IIDAC = 300mA, Ron= 0.85Ω (from −40°C to +85°C), and Nchannels = 2 (S1 and S4 on or S2 and S3 on).

Equation 6

Given the thermal resistance of the analog switch θJA, the total heating is determined using Equation 7.

Equation 7

The following calculation is carried out at room temperature, with the on-resistance Ron= 0.5Ω at 25°C. This value of Ron is temperature-dependent. Therefore, any deviation from room temperature may impact the overall thermal performance.

Equation 8
Equation 9

Charge Injection and Crossover Distortion


Charge injection refers to the phenomenon in which a small amount of current leaks or is injected from the control terminal to the signal terminal of an analog switch when it is turned on or off. This phenomenon can affect the accuracy and integrity of the signal in sensitive circuits. Charge injection occurs primarily due to parasitic capacitance present in the analog switch. When the switch is turned on or off, this capacitance is charged or discharged, resulting in a small current flowing through the signal circuit. This current can alter the signal level and affect measurement accuracy or circuit operation.

Crossover distortion occurs when the switch transitions between two states (for example, open and closed), creating a brief partial connection between two signal channels or between a signal channel and the reference (common) terminal. This partial connection can lead to time-based or amplitude distortion in the output signal. Crossover distortion results from inherent imperfections in the design and construction of the analog switch. Although switches are designed to provide a complete connection between two points when on and no connection when off, there is always a very brief interval during which the connection may be partially established. During this interval, a small current may flow between channels or between the signal and the common terminal, causing signal distortion.

During directional current switching, the load is floating. There is distortion and charge injection effects from switching across the load. This factor can be calculated as the integral under the curve where the glitch is located (Equation 10). Figure 18 and Figure 19 show an example of the glitch produced during GPIO switching.

Equation 10

Laboratory Results

The following sections present the results obtained using the SDPK1 controller, the ADG2412 analog switch, and the LTC2662 IDAC. Results were captured with an oscilloscope to ensure accurate data representation. The SDP-K1 controller sends SPI commands to configure the IDAC and generate a half-cycle waveform. Additionally, it synchronizes the GPIOs to activate the internal transistors in an H-bridge configuration within the ADG2412, enabling directional switching of the load.

To generate the resulting waveforms in the Resistive Load Test Results section and the Inductive Load Test Results section, the operating principle explained in the How to Generate Different Types of Bidirectional Waveforms section was followed. Figure 11 shows the signals of GPIO1 and GPIO2 during the direction change, which occurs at the 0mA crossing with a 200ns dead time. Figure 12 and Figure 13, on the other hand, show the waveform directly at the IDAC output.

Figure 11. Dead Time Between GPIOs
Figure 12. Absolute Value of a Sinusoidal Wave as Played by the Unidirectional IDAC
Figure 13. Absolute value of a triangular wave as played by the unidirectional IDAC

Resistive Load Test Results


Figure 14 and Figure 15 show the bidirectional sine and triangular waveforms across the load. This test is performed with a 1.5Ω load and a current span range of 200mA, with a dead time of 200ns. Note that the minimum dead time depends on the power supply of the switch. In this case, for a 5V supply, the dead time is 200ns. Both figures illustrate how the different waveforms drive the bidirectional currents in the load, flowing in both positive and negative directions up to ±200mA.

Figure 14. Bidirectional sinusoidal output current resistive load
Figure 15. Bidirectional triangular output current resistive load

Inductive Load Test Results


Figure 16 and Figure 17 display the bidirectional sine and triangular waveforms across a 220µH inductive load. This test is conducted with a current span range of 50mA and a dead time of 200ns. The figures demonstrate how the inductive load allows bidirectional current flow, oscillating in both positive and negative directions up to ±50mA.

Figure 16. Bidirectional sinusoidal output current with inductive load
Figure 17. Bidirectional triangular output current with inductive load

Charge Injection and Crossover Distortion Results


Figure 18 provides a zoomed view of the region where the current direction changes (near 0mA). In this test, a dead time of 200ns was set, and both the IDAC and the analog switch were powered at 5.5V. Three short-duration peaks are observed in the output current, each lasting only a few nanoseconds. The first peak occurs due to the disconnection of S1 and S4 switches. The second, negative peak is a parasitic effect caused by the load being left floating during the switching transition—at that moment, the only path available is through the probe impedance. Finally, the third peak occurs once S3 and S2 switches are fully on. The charge injection is calculated using Equation 10, resulting in a value of 0.6nC.

Figure 18. Glitch produced during polarity change with 200ns dead time (code close to 0)

Figure 19 shows the charge injection with an increased dead time of 800ns, under the same supply conditions (5.5V for both the IDAC and the analog switch). With this extended dead time, the calculated charge injection is 4.79nC.

Figure 19. Glitch produced during polarity change with 800ns dead time (code close to 0)

The analysis of these results shows that charge injection (QNJ) is influenced by both dead time and supply voltage. A lower supply voltage and shorter dead time lead to a reduction in charge injection.

To visualize the crossover distortion, a square wave was generated within a span range of 100mA with different loads of 1.5Ω and 33Ω, both leaving a dead time of 200ns. Figure 20 and Figure 21 display a zoom-in at the 0mA crossing point to observe the crossover distortion. It is observed that during mux switching for directional current change, the load is floating, and there will be distortion and charge injection effects due to mux switching across the load. From the results, it can be concluded that the higher the resistance, the longer the discharge time between nodes, while the lower the resistance, the smoother the transition.

Figure 20. Crossover distortion RLOAD = 1.5Ω
Figure 21. Crossover distortion RLOAD = 33Ω

Conclusion

This application note verifies the capability of the system to generate bidirectional waveforms with accurate control over current and timing, taking advantage of the SDP-K1 controller, the AD2412 analog switch, and the LTC2662 IDAC. Laboratory results confirm that the system operates reliably with both resistive and inductive loads, generating accurate waveforms with consistent performance over different ranges and dead times.

The load injection analysis highlights the relationship between the supply voltage, dead time, and related load, highlighting the importance of optimizing these parameters to minimize distortion. In addition, crossover distortion and switching dynamics have been analyzed, showing how careful configuration of the H-bridge and dead time can mitigate unwanted effects during transitions.

Overall, the insights presented in this document provide a solid basis for the design of systems requiring high precision current control in bidirectional loads. This knowledge can guide the design and optimization of similar applications in fields, such as motor control, power electronics, and signal generation.

Author

Juan Garcia

Juan Garcia

Juan Garcia is an applications engineer with 4 years of experience in the industry. He received his degree in Telecommunications Engineering from the University of Cantabria in Santander and completed his Master's degree in Valencia. Currently, Juan works in the Precision Converter Group focusing on digital-to-analog converters. He is based in the Analog Devices office in Valencia, Spain.