Lab 4: Full-Wave Rectifiers

This lab guides students in building a full-wave bridge rectifier and in exploring the V-I characteristic of a diode. Students will first simulate and build the rectifier to gain an understanding of the purpose of a rectifier. Then, students will use LabVIEW to explore the individual components of the rectifier in order to visualize and understand how these components limit its operating range. Advanced students can explore ways to overcome the threshold voltage limit when using diodes in a rectifier or learn more about programming practices and user-friendliness.


Introduction

A rectifier is a diode circuit that converts an alternating current (AC) waveform into a waveform that has constant polarity (also sometimes called a direct current or DC waveform), either always negative or always positive depending on the direction of the diodes. There are two major classifications of rectifiers, half-wave and full-wave rectifiers. Half-wave rectifiers are so called because they only pass through one polarity of the circuit while the opposite polarity is removed.

Full-wave rectifiers reproduce the whole waveform, but with one of the polarities inverted. You can think of full-wave rectification as putting an AC waveform through an absolute value function. In this lab we will simulate, build, and explore the bridge rectifier – a type of full-wave rectifier constructed using diodes.

Learning Objectives

In this section, students will:

  • Simulate a bridge rectifier in Multisim.
  • Build a bridge rectifier and explore its response to different input waveforms and loads.
  • Use LabVIEW to characterize diodes and find the minimum input voltage for a diode.

Part List

The following equipment is required for this experiment:

Hardware


Circuit Theory and Simulation

Full-Wave Bridge Rectifier

The bridge rectifier consists of four diodes laid out in a bridge pattern. Using the forward-biased behavior of diodes, we can force current to flow in the same direction through a load. This allows us to convert an AC waveform into a DC waveform. Many circuits require the use of DC waveforms and the rectifier circuit is an important part of a power supply circuit.

The image to the right shows a typical configuration for a bridge rectifier. You can see that Diodes D1 – D4 are laid out in a bridge pattern with their anodes on the left and the cathodes on the right and the load is connected across the joint cathodes and the joint anodes.

Compare the output of the bridge rectifier to the input by using probes on the input and output of the bridge rectifier circuit and simulating the circuit in Interactive Mode. Remember that the probes are automatically reference to ground. In order to acquire the waveform across the output, you will need to place a separate Voltage Reference on the negative leg of the output terminal.

Before moving to the next section, save the waveform of the following situations:

  • Waveform capture of $V_{in}$ at 2V and $V_{out}$ with 1kΩ load resistance
  • Waveform capture of $V_{in}$ at 2V and $V_{out}$ with 100kΩ load resistance
  • Waveform capture of $V_{in}$ at 0.5V and $V_{out}$ with 1kΩ load resistance
  • Waveform capture of $V_{in}$ at 0.5V and $V_{out}$ with 100kΩ load resistance

These waveforms will be used to compare our simulated results to our physical results later in the lab.

Questions and Exercises
  • Using the circuit component names ($D_1$, $D_2$, $D_3$, $D_4$, $R_{load}$), describe the path that current flows through during the positive half cycle of the AC input and the path that current flows through during the negative half cycle.
  • What is the peak voltage value of the rectified waveform?
  • What is the polarity of the DC waveform that is produced? How could we reverse the polarity of the output waveform?
  • Click on the load resistance and use the slider to change the load resistance while the simulation is running. Vary the load resistance from 1kΩ to 100kΩ. How does load resistance affect the output waveform? Why would this occur?
  • Set the load resistance back to 1kΩ. Click on the amplitude value of $V_{in}$ and use the slider to lower the voltage amplitude of $V_{in}$ while the simulation is running. What happens to the rectified waveform as $V_{in}$ decreases to 100mV?
  • Assume that our load has a minimum peak voltage requirement of 200mV. What is the lowest voltage if our load resistance is 1kΩ? And if our load resistance is 10kΩ?

Building and Measuring Your Circuit

Now that we have simulated the rectifier, we will move to actually building the circuit so that we can compare our simulated results against an actual circuit. Follow the steps below to build the circuit and acquire your experimental data.

Build the circuit presented in Full-Wave Bridge Rectifier on the Breadboard Canvas. Connect the function generator's W1 channel (yellow wire) and the oscilloscope's Channel 1+ (orange wire) to the input of the circuit and the 2+ channel of the oscilloscope (blue wire) to the positive output of the circuit. Connect the 2- channel of the scope (blue-white wire) to the negative output. Connect to the ground the 1- channel of the oscilloscope (orange-white wire), and the function generator's ground.

Don't forget to turn the Scope Channel 1 and Scope Channel 2 switches towards the MTE headers.

You can download the wiring diagram here: wiring_diagram_fw.zip

When connecting, check the polarity of the diodes!

Follow the instructions below to set up your instruments in WaveForms and acquire data for this experiment. We will look to see how the output waveform compares to the input waveform and how the rectified output reacts to different input voltages and load resistances.

Launch WaveForms, generate a 50Hz signal using the Wavegen instrument and set the amplitude to 2V. Use the Scope to view the circuit response in the time domain. Set the time base of the scope to visualize 2-3 periods of the signals.

Questions and Exercises
  • What is the peak value of the rectified waveform? How does this compare to the simulated value?
  • Change the load resistance from 1kΩ to 100kΩ. What is the peak value of the rectified waveform now? How does this compare to the screenshot captured earlier?
  • Set the load resistance back to 1kΩ. Set the amplitude of the Wavegen to the value you recorded as the minimum input voltage to produce a 200mV peak output. What is the peak voltage of the output waveform? Is this higher or lower than 200mV? What is the actual minimum input voltage required to produce a 200mV peak output?
  • How would we determine the exact voltage where the bridge rectifier no longer produces a rectified waveform? Write a procedure that you would follow to determine this value.
  • What is the lowest voltage that produces a rectified waveform? What happens to the output signal when the input signal voltage is below that value?

Analysis with LabVIEW

After rectifying the AC signal in simulation and in the actual circuit, you may have noticed a smaller peak voltage in the output signal than the input. Analyzing the circuit, there is only one possible culprit for the difference: the diodes. While we can usually model diodes as components that either act as an open or a short, a small amount of voltage does get dropped over real diodes. When the diode is operating in forward-bias operation, this voltage is generally referred to as the forward “threshold” voltage ($V_{TH}$) of the diode. Ideally a diode would have $V_{TH}=0$, but common silicone diodes generally have a $V_{TH}=0.7V$, while germanium diodes have a $V_{TH}=0.3V$ and Schottky diodes have a $V_{TH}=0.2V$.

But you might be asking, if $V_{TH}$ is defined as a single point, why does the attenuation vary with different input voltage levels? This is because $V_{TH}$ is only a typical value and not an absolute value. In real-world diodes, the current through the diode, the voltage dropped across the diode and the input voltage are tied together in a non-linear relationship.

In this section, we will look to graphically model this relationship using two plots. The first plot will show us the relationship between the current through the diode and the voltage drop across the diode, and the second plot will show how these two quantities change with respect to the input voltage. We will use LabVIEW, a graphical programming language, to first automate the plotting of these graphs and then, secondly, analyze these relationships. This section of the lab will assume a working knowledge of the LabVIEW environment and basic programming conventions. For help with getting started in LabVIEW, including installation of the Digilent WaveForms VIs, please view the resources available here: Getting Started with LabVIEW and a Digilent Discovery Device

Note: Before testing or running your LabVIEW code, make sure that you exit WaveForms. The Digilent WaveForms VIs will throw an error if Digilent WaveForms is still open when you run your code.

Note: If you don't know what a VI does, you can check the Context Help by pressing Ctrl+H, then highlighting the respective VI.


Objectives

Design a VI in LabVIEW that will map out the I-V curve of a diode. You can build your own VI, following the steps below, or you can download the VI used in this guide from here: i-v_curve.zip

The I-V curve allows us to explore the relationship between voltage and current through a given circuit element – in this case a diode. As the front panel shows, current (I) is plotted on the y-axis and voltage (V) is plotted on the x-axis.

The Front Panel is where you place your UI elements in LabVIEW and how you can interact with the program while it is running. There are two major components on this front panel: the controls are how you can give information to the program, and the indicators are how the program gives data back to the user.

The Block Diagram is where you will actually code in LabVIEW. Any controls you have will show up in the block diagram. As shown, in this VI we have one string, two numeric and one boolean controls. Any indicators you have will also show up in the block diagram. As shown, in this VI we have three graphs corresponding to the graphs we want the VI to plot.

The Functions Palette can be accessed by right-clicking on the Block Diagram. The Functions Palette is how you can place different functions and VIs that build up your code into the block diagram. For this VI we will primarily be using VIs from the Digilent WF VIs palette. The Digilent WF VIs palette gives us access to the VIs that control the different instruments on Analog Discovery devices and can be accessed by navigating to Functions Palette → Measurement I/O → Digilent WF VIs.

General Operation

The VI is able to sweep through a range of voltages, measuring voltage and current at each point. The sweep should start from 0V, end at the Maximum Input Voltage, and increase by the 0.1V in each step. In each sep, the scopes should acquire several samples and the average of these samples should be calculated to get the voltage drop and the current through the diode.

In each step, the calculated values should be appended to arrays, and these array should be displayed on the front panel, on one of the three plots. The first graph is the I-V curve of the diode. The second graph will show the current through the diode with respect to the input voltage. The third one shows the voltage drop on the diode against the input voltage. While the first graph lets us directly examine the voltage and current relationship of the diode, the second and the third graphs will let us examine how the current and the voltage react to different input voltages. The image to the right shows the general program flow for this VI and the Software Setup section goes over each of these steps in more detail.


Hardware Setup

While we can measure voltage across the diode directly, we will have to use a sense resistor ($R_{sense}$) and Ohm’s law to measure current through the diode. We will use the same full-wave rectifier circuit we used previously, however we will change the load resistance to 4.7Ω and will use the Supplies instrument to output a DC voltage instead of an AC waveform as our input voltage.

Build the circuit presented in Full-Wave Bridge Rectifier on the Breadboard Canvas. Connect the positive power supply V+ (red wire) to the input of the circuit and the 2+ channel of the oscilloscope (blue wire) to the positive output of the circuit. Connect the 2- channel of the scope (blue-white wire) to the negative output. Connect together the ground of the circuit and the ground of the Analog Discovery Studio (black wire). Connect the 1+ channel of the scope (orange wire) to the anode of a diode and the 1- channel (orange-white wire) to the cathode of the same diode.

Don't forget to turn the Scope Channel 1 and Scope Channel 2 switches towards the MTE headers and the and the V± switch towards the POWER inscription.

You can download the wiring diagram here: wiring_diagram_iv_curve.zip


Software Setup

Setup and Instrument Configuration

As a first step the control and indicator elements should be placed by right-clicking on the Front Panel and selecting the required element. In this VI we need a Combo Box, which sets the device type, with the elements “Analog Discovery Studio”, “Analog Discovery 2” and “Analog Discovery”, we need a Numeric Control for the load resistance value and a Knob, to set the maximum input voltage. A Stop Button should also be placed on the Front Panel, to interrupt the program if needed.

To display the results, we need three XY Graphs. Arrange everything on the Front Panel, then right-click on the x-axis of the graphs and deselect Autoscale. The range of these axes will be set according to the maximum input voltage. Rename the placed elements by double-clicking on their name.

In the Block diagram, right-click the VD vs Vin graph and create a property node for the XScale.Maximum property. Repeat this step for the ID vs Vin graph. Change both property nodes to write, then connect the Maximum Input Voltage control to them.

Initialize the Scope instrument (MSO), then configure both analog channels (mso/1 and mso/2) in DC mode, with 1X probe attenuation, set the vertical offset to 0 and the vertical range to the double of the maximum input voltage. Enable the channels with a True constant.

Configure the timing of the Scope to sampling mode, with a sampling rate of 100000 samples/s, acquisition time of 0.1s and pretrigger time of 0s.

Initialize the Supplies instrument and configure the positive voltage supply (ps/+5V) to have a default current limit (0) and an output voltage level of 0V. Enable the power supply.

Acquiring Data

In a loop, run the Scope and read its output. The first element of the output array is the channel 1 data, the second element is the channel 2 data. Average the output arrays to get the voltage drop on the diode (channel 1) and the voltage drop on the sense resistor (channel 2). Divide the sense resistor voltage with the resistor value to get the current through the diodes.

Outside the loop, initialize three empty cluster arrays, with the clusters containing two numbers. Shift these arrays into the loop. Shift the voltage level of the power supply from the previous step (0V) into the loop.

Inside the loop, bundle together the diode voltage and the diode current, the input voltage and the diode current and the input voltage and the diode voltage, then append the resulting clusters to the arrays shifted into the loop. Connect the appended arrays to the respective XY Graphs, then shift them out of the loop.

Stepping the Input Voltage and Exiting

In each iteration, increment with 0,1 the voltage level shifted in the loop in the previous step, then reconfigure the positive power supply, setting the voltage level to this value.

Also compare this value to the Maximum Input Voltage, and if it is exceeded, exit the loop. The user should also be able to exit the loop if they press the stop button, so the the button should be connected to the exit condition. In case of any error the program will be finished, therefore connect the error signal to the exit condition as well.

If the loop is exited, the instruments must be stopped, then the errors should be handled.

Questions and Exercises
  • Set up your circuit with a 4.7Ω sense resistor. Configure your VI to sweep to 2.5 V. Run the VI. Once the VI has stopped, describe the I-V curve. Is the curve linear or nonlinear? How does this compare to the ideal I-V curve of a diode?
  • Use the cursors on the “ID vs Vin” and on the “VD vs Vin” graphs. At what input voltage does the diode conduct current? How does the input voltage affect the voltage drop across the diode and the current through the diode?
  • Looking at the three graphs, what is the lowest voltage source we can use if our load needs a current of at least 50mA? 100mA? 200mA? 250mA?
  • How long does the VI take to run with a step increment of 0.1V? How would we increase or decrease this run time?

Further Exploration

The topics below go over two ways you can continue exploring after finishing this lab. The first topic goes more into the limitations on using diodes as a rectifier and the second topic covers some ideas for user-friendly programming.

Diodes and Rectifiers

Looking at your results, you should see a breakpoint in current around 0.6 – 0.7V. This matches with the typical $V_{TH}$ of a silicon diode. However, we also saw that the current through the diode at that point is relatively small; on the order of 10s of milliamps. In order to increase the current, we will need to increase the voltage. While this works for most circuit applications, what happens when we need to rectify a signal with an amplitude less than 0.6V?

We saw earlier that with the bridge rectifier, as the input voltage decreased we reached a point where our output signal was effectively zero. And looking at the diode curves we found using LabVIEW, it is very likely that while the voltage waveform was rectified, no current was actually flowing once the input voltage dipped below 0.6V. Therefore, in order to rectify a small signal, we would need some method of isolating the effects of $V_{TH}$ from our output signal. This is where the op-amp based precision rectifier comes in. The image to the right shows one typical configuration for a precision rectifier.

Use what you have learned in this lab to build the precision rectifier and compare it against the bridge rectifier. What are some of the tradeoffs with the precision rectifier? Aside from being able to rectify small signals, are there any other benefits to using a precision rectifier?


LabVIEW Programming and User Friendliness

Set up your LabVIEW VI to sweep to 2.5V again, but now change the step increment to 0.01V. Notice how much longer it takes to complete the VI this time. What is on screen while the VI is running? Is there any indication that it is working? How would you tell if the program was just busy processing your instructions or actually stuck in a loop? One of key aspect of user friendly programming is to give feedback to the user that a program is running or doing something. For example, loading bars show progress while a program is loading a big file or using a rotating wheel to symbolize that a program is busy executing your last command.

What other ways can we show the user that the program is running as expected? Use what you know of loops and iterations to implement a way to let the user know that the program is running correctly. You can even display an estimated time of completion for longer tasks.


Next Steps

For more complementary laboratories, return to the Complementary Labs for Electrical Engineering page of this wiki.

For technical support, please visit the Test and Measurement section of the Digilent Forums.