A Blended Lab on Phase-Sensitive Demodulation for Undergraduate Electronic Circuit Design Course

Abstract

This paper proposes the blended lab concept for mitigating the lack of practical lab sessions due to constraints on hardware resources or pandemic such as COVID. Virtual labs, which use computer aided simulation to enhance learning experience, can replace some aspects of the practical lab activities, but not all. Deficiency in practical skills caused by the lack of practical lab sessions can be observed evidently from post-pandemic students. The proposed blended lab combines computer-based simulation with practical activities that can be carried out readily at home. This concept has been applied in an undergraduate electronic circuit design course at Manchester and Tianjin. Students use mobile phones as simple signal generators/scopes to visualise sound/light/audio-jack signals from circuits built on breadboard at home. This approach has proved to enhance student experience when physical lab is limited.

Share and Cite:

Yin, W. , Zhao, Q. , Chen, Z. and Qu, Z. (2022) A Blended Lab on Phase-Sensitive Demodulation for Undergraduate Electronic Circuit Design Course. Creative Education, 13, 3332-3345. doi: 10.4236/ce.2022.1310213.

1. Introduction

Lack of physical lab can pose serious challenges for hands-on subjects such as circuit design. While Simulation can replace some of the practical lab activities, but not all (Li & Wang, 2007; Glavinic, Kukec, & Ljubic, 2007; Yin, York, & Ozanyan, 2018; Yin, Zhao, Zhang, & Qu, 2018). This paper proposed a blended lab concept where simulation is carried out on PC and mobile phones are used as simple signal generators/scopes to visualise sound/light signals from circuits built at home. This hybrid approach can enhance student learning experience by exploiting two complementary activities and has been trialled for an undergraduate electronic circuit design course. There are reports of mobile devices and remote labs in engineering education (Garcia-Zubia, López-de-Ipiña, & Orduña, 2008), but the device is not connected to an actual circuit.

Phase-sensitive demodulation (PSD), which obtains both magnitude and phase of signals, plays an important role in electronic circuit design for signal conditioning. Typically, the undergraduate engineering students are required to construct the electronic circuits practically (Zhao, Zhao, Cao, & Yin, 2019). However, due to the COVID-19 pandemic, alternative approaches have to be developed which enable the students to carry out the laboratory remotely. This paper introduces a new approach to 1) lead the student through the principle of PSD by doing simulations virtually using LTspice, a powerful tool for analogues circuit simulation. 2) use mobile phones as simple signal generators/scopes to make observations and take measurements of sound/light signals from circuits built at home. The overall aim is to enhance student experience using this blended approach in which both theory and practical skills can be developed.

The PSD is composed of two basic circuits: switches/multiplier and amplifier/filter. And hence the signal is firstly rectified and then filtered. The PSD has a good performance against noise and is capable of providing both amplitude and phase shift measurement of the signal.

2. Principles of PSD

PSD is commonly used in signal conditioning circuits for data acquisition. Basically, two AC signals (sine-wave or square-wave) of the same frequency are fed into a PSD and the output of PSD is not only the function of the amplitudes of the two signals, but also the phase difference between the two input signals. The output of a PSD consists of a DC component and high frequency harmonics. A low-pass filter (LPF) is needed to eliminate the harmonics and the remaining DC signal is the required measurement.

In principle, if the phase difference between the two input signals is 0˚, the output of the PSD should be positive. If the phase difference is changed to 180˚, then the polarity of the output will change, from positive to negative. If the phase difference is either 90˚ or 270˚, the output should be zero. In order to observe the effect of the phase difference, a phase shifter circuit is required. Each part of the overall circuit is introduced in the following sections.

2.1. Overall Arrangement

Figure 1 shows the overall arrangement. A signal generator is used to provide a sine-wave voltage and a square-wave voltage at the TTL level, i.e. 0 - 5 V. Then, the sine-wave signal goes through a phase shifter, which is constructed by an op-amp, so that the phase difference between the sine wave from the output of

Figure 1. Overall arrangement.

the phase shifter and the original square wave from the signal generator can be adjusted by changing a resistor value. And the sine-wave with phase shift is fed into the switch-based PSD for signal conditioning.

The square-wave is inverted, and both the original signal and inverted signal are applied to control the switch-based PSD. The output of the PSD contains DC component and harmonics. And hence a LPF is required to filter out the high frequency harmonics. After the LPF, there is only DC output.

In Figure 1, there are 4 circuits to be built following the sequence:

1) Phase shifter

2) Inverter

3) Switch-based PSD

4) LPF.

2.2. Phase Shifter

Figure 2 shows a design of phase shifter circuit, which is constructed using an op-amp. It has a unity gain and can give a phase shift between 0˚ and nearly −180˚. The phase shift can be calculated by:

φ = 2 tan 1 ( ω C R ) (1)

where ω = 2 π f and f is the input signal frequency (Hz).

The value of the variable resistor R in Figure 2 can be adjusted manually to achieve the required phase shift.

2.3. Switch-Based PSD

Figure 3 shows a switch-based PSD circuit. It consists of an op-amp and 4 switches. The four switches are used to implement the demodulation process and these switches are controlled by two complementary square-wave signals. The two complementary square-wave signals drive:

either switches S2 & S3 to be closed (ON) and switches S1 & S4 to be open (OFF).

or switches S2 & S3 to be open (OFF) and switches S1 & S4 to be closed (ON).

When S2 & S3 are closed (ON) and S1 & S4 are open (OFF), the PSD circuit functions as a unity-gain non-inverting amplifier. This is equivalent to multiplying the input signal by +1.

Figure 2. Phase shifter circuit.

Figure 3. Switch-based PSD circuit.

When S1 & S4 are closed (ON) and S2 & S3 are open (OFF), the PSD circuit functions as an inverting amplifier. This is equivalent to multiplying the input signal by −1. Because this type of PSD relies on switching function, it is called switch-based PSD.

2.4. LPF

Following the switch-based PSD, a LPF is used to remove high frequency harmonics. The remaining DC signal is then a function of both the two amplitudes and the phase difference between the sine wave and the square wave. Note that the square wave signal is used as a reference for measuring the phase difference. With the switch-based PSD, the output of the LPF is:

V ¯ = 2 A π cos ϕ (2)

where A is the magnitude of the sine wave, and ϕ is the phase difference between the sine wave and the square wave.

Figure 4 shows a simple 1st order LPF circuit.

The cut-off frequency of this filter is:

f o = 1 2 π R C (3)

If R = 160 kΩ and C = 0.1 μF, then the cut-off frequency fo ≈ 10 Hz, which is sufficiently low to eliminate the high-frequency harmonics. Because the input and feedback resistors have the same value, the gain of the LPF circuit at low frequency is 1.

Figure 4. 1st order LPF circuit.

3. Simulation

3.1. Simulation Software

LTspice® was selected as the simulation tool for this lab, which is a high-per- formance SPICE simulation software, including schematic capture and waveform viewer with enhancements and models for easing the simulation of analogue circuits. Macro models for a majority of analogue devices such as switching regulators, amplifiers, as well as a library of devices for general circuit simulation are included in the LTspice download package and can be used directly.

LTspice is a useful tool and has been widely used for electronic circuit simulation in industry. Also, as a free and open access resource, it allows any student to download it from its official website without any need of license or payment.

3.2. Simulation Circuits

The simulation is divided into two parts during the lab session and each part has a LTspice file (.asc file). The first part simulates the overall functionality of PSD including a phase shifter, a switch-based PSD and a LPF, which is shown in Figure 5. The second part particularly evaluates the frequency response of the LPF to obtain a better understanding of the effect of the LPF.

The first simulation file consists of five different parts: a phase shifter, a switch-based PSD, a LPF, a sine wave voltage source, a square wave voltage source (with inverter) and ±12 V power supply for the ICs, as shown in Figure 5. The amplitude of the sine wave was set to 1 V and the frequency was set to 1 kHz. For the square wave, it is in-phase with the sine wave with the amplitude of 1 V as well. Firstly, the sine wave signal Vin from the voltage source is fed into the input of the phase shifter. Vphase_theta contains a phase shift which is determined by the resistance of R3. Vphase_theta is then the input signal of the PSD. The switches in the PSD are controlled by two square waves. And the output of the PSD contains a DC component and high frequency harmonics. The LPF helps to eliminate high frequency harmonics and output a DC value. The second part only uses the LPF circuit as shown in Figure 6. There are three sections: power supply, input signal and the LPF filter constructed by using an op-amp 741 µA. Two DC voltage sources (±12 V) are used to power up the op-amp. Input signal VIN is provided by an AC voltage source. The LPF has the same configuration as in part 1, which gives a cut-off frequency of 10 Hz.

Figure 5. Simulation-part 1: The overall PSD.

Figure 6. Simulation-part 2: The LPF.

The simulation setting is determined by writing SPICE directive which configures the type of simulation. For transient simulation, the stop time need to be configurated. For AC analysis, number of points, type of sweep and frequency range should be set properly to obtain correct results.

4. Procedure

1) Adjust the frequency of the sine wave to 1 kHz and the amplitude of the sine wave to 1 V (i.e. 2 Vp-p) by right-click the voltage source in sine wave voltage. The DC OFFSET is 0. In this step, two waveforms (square and sine waves) will be checked in the waveform window. In order to do this, click Run in the toolbar. As is shown in Figure 7, the square wave (V(square)) and the sine wave (V(vin)) inputs are in phase.

2) Adjust the resistance of R3 by right-clicking on the resistor and type the value. Run the simulation again by clicking Run at the tool bar. Examine the input and output signals of the phase shifter in the waveform window. Adjust the resistance of R3 to check the range of phase shift. Save the oscilloscope screens for the minimum and maximum phase shifts and note below the measured range of phase shift. The minimum phase shift should be 0˚ while the maximum

Figure 7. Square wave and sine wave input.

phase shift should be 180˚. Waveforms with phase shift of 0˚, 90˚ and 180˚ between V(vin) and V(vphase_theta) are shown in Figures 8-10 respectively.

3) In this step, the function of the switch-based PSD circuit is investigated. Firstly, examine the two square-wave signals (which are called V(square) and V(square_)), one V(square_) from the inverter output and one V(square) from the square wave voltage source. These two signals should be complimentary which are shown in Figure 11.

4) Adjust R3 to visually make sure the phase difference between the output sine wave and the square wave is either 0˚ or 180˚. Note that if the phase is 0˚, the PSD output waveform should look like a signal from a full-wave rectifier (head up). If the phase is 180˚, it should be head down. Figure 12 shows the output of the PSD against the square wave from the voltage source when there is no phase shift.

5) Adjust R3 in phase shifter to make sure the phase difference between the sine wave and the square wave is either 90˚ or −90˚. Figure 13 shows the output from the PSD against the square wave from the voltage source with 90˚ phase shift. In order to obtain proper phase shift, the resistance of R3 need to be calculated by the students.

6) In this step, the students will observe the LPF circuit itself. Open the file PSD design—LPF.asc by clicking File >> Open and select the file in the folder as downloaded. The schematic is shown in Figure 6.

The students are required to examine the amplitude-frequency response of the LPF circuit and observed the effect of the frequency. And hence a bode plot can be produced. There are two ways to obtain the bode plot. One way is carrying gout transient simulation at different frequencies and measuring the amplitude

Figure 8. Phase shifter-0˚ phase shift.

Figure 9. Phase shifter-90˚ phase shift.

of the output sine wave. In this method, the following frequencies can be measured: 1, 2, 4, 6, 10, 20, 40, 60, 100, 200, 400, 600, and 1000 Hz. In order to change the frequency, the students can right click on the voltage source for input signal. The other way of doing the bode plot is to use AC analysis, which provides the magnitude and phase frequency response directly in the frequency range of interest. The bode plot obtained by using AC analysis is shown in Figure 14.

7) Find the cut-off frequency (−3 dB) by changing the frequency and write down the frequency and amplitude at this point.

Figure 10. Phase shifter-180˚ phase shift.

Figure 11. Square wave and inverted square wave.

8) Go back to the file PSD design.asc and examine the output of the LPF circuit after the PSD and measure the DC values using the cursor when the phase difference between the sine wave and square wave is 0˚ or 180˚ and 90˚ or 270˚. The output signal is shown in Figure 15 and Figure 16 respectively.

5. Mobile Scope for Home-Built Circuits

An actual version of the circuit can be built at home on breadboard. A picture of the circuit is shown in Figure 17.

Figure 12. PSD output-0˚ phase shift.

Figure 13. PSD output-90˚ phase shift.

The circuit signal can be observed on a mobile phone with appropriate apps. There are a number of options depending on available mobile devices and the operating systems as shown in Figure 18 (Smart Scope Oscilloscope; Audio Scope Oscilloscope; Sound Oscilloscope). Previous examples of interfacing sensors to mobile devices can be taken as a reference (Quesada-González & Merkoçi, 2017).

Circuit waveforms can be viewed in above apps because these waveform outputs can be connected to the phone audio jack and circuit signal is similar to audio signals after microphone which is a transducer to convert sounds to electronic signals. Future design of custom will be explored, but due to the constraints

Figure 14. Bode plot of the LPF.

Figure 15. Output signal-0˚ phase shift.

Figure 16. Output signal-90˚ phase shift.

of time and financial resources, this cannot be finished in this paper. Nevertheless, the methodology is similar, and feasibility is proved.

6. Required Submitted Report

The online simulation lab session lasts for 3 hours. During the lab session, the students need to complete their simulation individually. Supports will be available (via Zoom) from demonstrators. The practical session can be carried out at home, or other suitable places. Once both sessions are finished, the students are

Figure 17. A photo of a practical circuit built at home.

Figure 18. Apps that can be used for visualising the waveform output from a circuit.

required to produce a lab report which should be no more than 7 pages. In the main report, the following sections should be included.

1) Aims of the experiment.

2) Draw a complete circuit diagram.

3) Experimental results and analysis, including all waveforms captured and explanation.

4) Calculate the frequency response of the LPF and compare the calculated data with the measured results.

5) Draw Bode plots in one graph according to both the simulation results and the theoretical values. Discuss sources of error. Note that in a Bode plot, x-axis and y-axis are in log and dB scale respectively.

6) Display captured waveforms from a mobile scope device as required in Figures 8-13.

7) Compare the results from simulation and the actual captured waveforms on mobile app and discuss any discrepancies.

8) Answer the following questions:

Question 1: If 90˚ phase delay is required for a 1 kHz sine wave, calculate the resistor value of the trimmer R in Figure 2 and show the detailed calculation procedure. And do the same for phase delay of 0˚ and 180˚. Note that for engineering, 3 digits are sufficiently accurate.

Question 2: In step (4), if you have seen 0˚ PSD signal, how can you obtain 180˚ PSD signal? Or if you have seen 180˚ PSD signal, how can you obtain 0˚ PSD signal?

Question 3: With a cut-off frequency of 10 Hz of the LPF as shown in Figure 4, calculate how many times a 1 kHz sine input signal is attenuated after passing through the LPF circuit? If the cut-off frequency is increased to 100 Hz, how many times is the signal attenuated?

Question 4: What is the theoretical DC output of the above PSD if the phase angle is 60˚.

9) Conclusions.

7. Conclusion

This paper has proposed and reported a blended lab design for circuit design course at undergraduate level. It combines computer-based simulation with practical activities that can be carried out readily at home using mobile phone app style scopes. It can mitigate the lack of practical lab sessions due to constraints on hardware resources or pandemic such as COVID and address the deficiency in practical skills seen from post-pandemic students. This provides a new blended lab concept and a novel approach for enhancing student experience when physical lab is limited.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Audio Scope Oscilloscope.
https://play.google.com/store/apps/details?id=com.bti.aScope
[2] Garcia-Zubia, J., López-de-Ipina, D., & Orduna, P. (2008, July). Mobile Devices and Remote Labs in Engineering Education. In 2008 Eighth IEEE International Conference on Advanced Learning Technologies (pp. 620-622). IEEE.
https://doi.org/10.1109/ICALT.2008.303
[3] Glavinic, V., Kukec, M., & Ljubic, S. (2007, June). Mobile Virtual Laboratory: Learning Digital Design. In 2007 29th International Conference on Information Technology Interfaces (pp. 325-332). IEEE.
https://doi.org/10.1109/ITI.2007.4283791
[4] Li, L., & Wang, H. (2007, November). A New Method for Building Web-Based Virtual Laboratory. In 2007 First IEEE International Symposium on Information Technologies and Applications in Education (pp. 555-558). IEEE.
https://doi.org/10.1109/ISITAE.2007.4409347
[5] Quesada-González, D., & Merkoci, A. (2017). Mobile Phone-Based Biosensing: An Emerging “Diagnostic and Communication” Technology. Biosensors and Bioelectronics, 92, 549-562.
https://doi.org/10.1016/j.bios.2016.10.062
[6] Smart Scope Oscilloscope.
https://play.google.com/store/apps/details?id=com.lab_nation.smartscope
[7] Sound Oscilloscope.
https://apps.apple.com/us/app/sound-oscilloscope/id1442383439
[8] Yin, W., York, T., & Ozanyan, K. B. (2018). Teaching Approach and Materials for Enhancing Student Learning Experience in Tomography Engineering: Soft-Field Tomography. Creative Education, 9, 2884-2897.
https://doi.org/10.4236/ce.2018.916217
[9] Yin, W., Zhao, Q., Zhang, K., & Qu, Z. (2018). New Developments in Teaching Electromagnetics through Advanced Numerical Simulations and Virtual Experiments. Creative Education, 9, 2878-2883.
https://doi.org/10.4236/ce.2018.916216
[10] Zhao, Q., Zhao, L., Cao, D., & Yin, W. (2019). Design of Comprehensive Experiment Based on Phase Sensitive Demodulation in the Course of Intelligent Instrument. Journal of Electrical and Electronic Education, 41, 153-158.

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.