






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Ned University of Engineering & Technology Department of Electrical Engineering ADC SOUND CARD CURRENT AND VOLTAGE WAVEFORMS Course Name Digital Signal Processing Course Code EE- 395 Section C Batch 2022 Year Third Year Report Covers: This report details the process of converting an analog voltage and current signal into a digital format using an audio cardโs ADC and displaying it in MATLAB. It covers the selection and setup of essential components, including a potential transformer, current transformer, voltage divider resistor (VDR) circuit, audio card, and interfacing equipment. The report describes the transformation of 220V AC mains voltage to a compatible level for the audio card, followed by the design of a VDR circuit using a 20k potentiometer and an additional resistor to achieve the required output voltage safely. It includes calculations to determine the appropriate power ratings, ensuring the circuit operates within a safe range. The report further explains the choice of sampling frequency for accurate signal representation in MATLAB, along with safe operating conditions for all equipment, providing a complete guide from signal transformation to digital visualization.
AC SUPPLY LOAD (LED 13W) VDR Circuit (^) ADC (^) MATLAB
current through this load is calculated as I = 11/240 = 0.0516 A โข The output from the current transformer (CT) is connected via an audio jack to the microphone input of a sound card, which is then routed through ADC to the computer. โข This current value is digitally plotted in MATLAB/Simulink, fulfilling the lab's objective. BLOCK DIAGRAM FOR CURRENT
Supply Voltage = ๐๐๐๐ = 240 ๐ Input Voltage into ADC = 1 ๐ ๐๐๐ ADC drops = 0.02 ๐ ๐๐๐ 1) VDR: I have connected potentiometer and a resistor of 56-ohm resistor in series and the output is taken at the resistor. To get the voltage of one volt at the output of the resistor, I have started increasing the potentiometer value. Hence: VR=1 Vrms For Current of CT:(Inductive Load): Bulb of 100 watts was used ๐ = ๐ผ ๐ 100 = ๐ผ โ (240) I=0.4166 A For Current of CT:(Resistive Load): Bulb of 13 watts was used ๐ = ๐ผ ๐Cosโ AC SUPPLY LOAD (100W) Current Transformer ADC (^) MATLAB
2) Resolution: Resolution = 16 bits 3) Sampling Frequency: Sampling Frequency= 48000 Hz 4) Gain Factor: For Voltage: As the ADC drops 0.02 V, so the input voltage in rms appeared in MATLAB was 1 ๐rms ๐บ๐๐๐ ๐๐๐๐ก๐๐ = ๐๐๐ข๐ก / ๐๐๐ ๐บ๐๐๐ ๐น๐๐๐ก๐๐ = 240/ 0. ๐บ๐๐๐ ๐น๐๐๐ก๐๐ = 244. For Current:(For Resistive Load): The current drawn by our load as seen above was 0.4 ๐ด. Since CT transformer read the corresponding current value 10 times scaled down and in terms of voltage. So, the input to our ADC is as appeared on MATLAB was: I rms = 0.04166 As our ADC drops some voltage so the current appeared on MATLAB 0.04 ๐ด in terms of voltage as 0.04A. Hence Gain Factor for current will be: Gain Factor =10 (i.e., CT reads 10A/1V) For Current:(For Inductive Load): The current drawn by our load as seen above was 0.75 ๐ด. Since CT transformer read the corresponding current value 10 times scaled down and in terms of voltage. So, the input to our ADC is as appeared on MATLAB was: Irms= 0. 00637 A As our ADC drops some voltage so the current appeared on MATLAB 0.04 ๐ด in terms of voltage as 0.04A.
if ishandle(h) % Check if plot still exists % Dynamically adjust y-axis range based on signal values y_min = min(x_actual_voltage); % Minimum value of the signal y_max = max(x_actual_voltage); % Maximum value of the signal margin = 0.1 * (y_max - y_min); % Add 10% margin for better visualization ylim([y_min - margin, y_max + margin]); % Adjust y-axis limits % Update plot data set(h, 'XData', time, 'YData', x_actual_voltage); else % If the plot object is deleted, create a new one h = plot(time, x_actual_voltage); xlabel('Time (s)'); ylabel('Voltage (V)'); title('Real-Time Voltage Waveform'); xlim([0, duration]); grid on; end drawnow; % Update the plot immediately end Waveform Picture of Voltage:
Code For Current: % Real-Time Current Waveform Display clc; clear; close all; %% Sampling Parameters Fs = 48000; % Sampling frequency (Hz) nBits = 16; % Number of bits per sample (bit depth) scaling_factor = sqrt(2); % Scaling factor for converting RMS to peak nChannels = 1; % Mono recording ts = 1 / Fs; % Time interval between samples sec = 0.2; % Recording duration for each chunk (seconds) % Time vector for plotting (covers one recording duration) t = 0:ts:sec-ts; % Time values from 0 to (sec - ts) %% Continuous Waveform Capture and Plotting disp('Starting real-time current waveform display... Press Ctrl+C to stop.'); while true % Step 1: Create an audiorecorder object recObj = audiorecorder(Fs, nBits, nChannels); % Step 2: Record audio for the specified duration recordblocking(recObj, sec);
Experimental Setup for Current Waveform Setup Current Waveform for Inductive load LED Conclusion: This project successfully showed how AC voltage and current waveforms can be measured and digitized using a step- down transformer and a current transformer. A sound card was used as the ADC (analog-to-digital converter). Voltage and current signals from both linear and non-linear loads were plotted in MATLAB to display their time- domain behavior. Spectral analysis highlighted the main frequency and the harmonic components caused by non- linear loads. The approach demonstrated how digital signal processing techniques can be used for real-time waveform analysis.