Automatically measure the waveform of key points of PWM circuit and output the judgment

Publisher:光明2599Latest update time:2019-11-09 Source: 21icKeywords:PWM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Automatic test system (ATS) is a general term for a type of system that can automatically complete measurement, data processing, and display (output) test results. In different technical fields, the test content, requirements, conditions, and automatic test systems are different, but they all use computers to replace human testing activities. A general automatic test system includes a controller, an excitation source, a measuring instrument, a switch system, a human-machine interface, and a unit-to-machine interface. The test object of this automatic test system is a PWM circuit board, as shown in Figure 1. PWM (pulse width modulation) is a circuit that changes the output voltage by changing the duty cycle. PWM technology is widely used in DC motor speed regulation and other occasions.


Its working principle is as follows: As shown in Figure 2, a triangle wave is generated at point F. The amplitude of the triangle wave can be adjusted by adjusting RP3, and the frequency of the triangle wave can be adjusted by adjusting RP2. U1D is a voltage comparator. The waveform at point F and the waveform at point B are compared to finally obtain the waveform at point C. Since the PWM waveform at point C is obtained by comparing the voltages at points F and B, the voltage value at point B can be adjusted by adjusting RP1, and the duty cycle of the waveform at point C can be adjusted to ensure that the duty cycle of the waveform at point C exceeds 50%. The waveform at point C is driven by the OTL circuit to obtain the final test waveform at point D. After the amplified square wave signal is obtained at point D, it is used as a drive output signal through the CMOS tube to drive a motor or a signal light.


1 Test Task

The test task of this design is: taking the PWM circuit board as the test object, using the digital oscilloscope Tek TBS1012B-SC with USB interface and matrix switch, digital I/O card to build a test platform, and on the LabVIEW development platform, design an automatic test system to measure the key point waveform of the PWM circuit board.


Make it have the following functions:

(1) The triangular wave output frequency and waveform can be observed and adjusted, and can be adjusted in a human-computer interactive manner, fo=1kHz±5%; Up=3V±10%.

(2) The waveform of the comparator output point C can be observed, and the duty cycle of point C can be adjusted to 50% in a human-computer interactive manner.

(3) The modulation waveform at point D can be observed.

(4) The measured waveforms, frequencies, and amplitudes of points F, C, and D can be centrally displayed on the test system interface.

2 Hardware Platform

This system uses LabVIEW as a development platform to write test programs. The key points of the PWM circuit are tested to determine whether the circuit components have achieved the intended functions. The system hardware platform is mainly composed of Tek TDS1012B-SC, voltage regulator, matrix switch, matrix switch driver - NI6509 digital I/O card and other parts. The hardware platform is shown in Figure 3.

2.1 Oscilloscope

Since the system is used to measure the waveforms of the key points F, C, and D in the PWM circuit, the circuit needs to be adjusted before the system starts testing. The debugging requirements are: adjust the frequency and amplitude of the triangle wave to make fo=1kHz±5%; Up=3V±10%, so the debugging process needs to be carried out by observing the oscilloscope. Moreover, after a general oscilloscope measures the waveform of a test point, the test point must be switched manually. If it is a Tek digital oscilloscope, the waveform can be tested continuously. Its function is to measure the waveform and automatically transmit the waveform and data to the computer.


2.2 Matrix switch

To measure the waveforms of key points F, C, and D in the PWM circuit, but there is only one oscilloscope, we need to use one oscilloscope to measure the waveforms of three test points, so a multi-point switch is needed for switching. We use a matrix switch to switch between points.


This test system uses a 4×24 matrix switch to assign different test points (such as F, C, D) to the input of the oscilloscope to achieve time-sharing measurement of multi-point waveforms by the oscilloscope. The principle circuit diagram of the matrix switch is shown in Figure 4.


Generally, the measuring instruments are connected to H0, H1, H2, and H3, and V0, V1, V2, ..., and V23 are connected to the test points. As long as the switch that crosses the row and the column is turned on, the instrument connected to the row can be connected to the test point of the column. For example, if the oscilloscope is connected to H0, as long as K0 is turned on, the oscilloscope measures the waveform at point V0. If k1 is turned on, the oscilloscope measures the waveform at the V1 test point. For this system, H0 is connected to the oscilloscope, V0 is connected to point F of the circuit, V1 is connected to point C of the circuit, and V2 is connected to point D of the circuit. The actions of K0, K1, and K2 are controlled by the driving circuit of the matrix switch, that is, under the control of the driver, K0 is closed to measure the waveform at point F, K1 is closed to measure the waveform at point C, and K2 is closed to measure the waveform at point D.


2.3 Matrix switch driver component - NI6509 digital I/O card

The NI PCI-6509 Industrial 96-channel Digital I/O Board for PCI features 96 bidirectional digital I/O lines capable of high current drive (24mA) without the need for jumpers. With the PCI-6509, you can input and output at 5VDC digital levels and directly drive external digital devices such as solid-state relays (SSRs) at up to 24mA per channel. Each port (8 lines) can be configured for input or output, and no external power is required for output. With programmable power-up states, the initial output state can be configured in software, ensuring safe and trouble-free operation when connected to industrial actuators (pumps, gates, motors, relays).


For applications that require onboard pull-up resistors, consider using the NIPCI-DIO-96 parallel digital I/O board.

In the event of a computer or application failure, the PCI-6509 uses a digital I/O watchdog to switch to a configurable safe output state, ensuring that once it is connected to the industrial actuator, the fault condition can be detected and safely recovered. With change detection, when the digital state changes (no polling required), the digital I/O board can notify and trigger your software. Programmable input filters can be used to eliminate glitches/spikes and debounce digital switches/relays through selectable software digital filters.


The 4-row 24-column array switch used in this system requires 96 I/O ports to drive, and the 6509 digital I/O card has 12 8-bit digital ports, which can fully meet the needs. Therefore, the 6509 digital I/O card is selected for operation.


summary

This automatic test system uses LabVIEW to control the interface instrument, automatically measure the waveform of the key points of the PWM circuit and save the output, so as to judge whether the circuit components have achieved the predetermined function. On the one hand, it replaces the manual operation of the instrument, making it more intelligent; on the other hand, it also returns the measurement results of the instrument to the computer, makes intelligent judgments on the measurement results, and centrally displays and judges the measurement data, so as to realize automatic testing. This article gives a detailed description of the main links such as the hardware of the PWM circuit component function test system.


Keywords:PWM Reference address:Automatically measure the waveform of key points of PWM circuit and output the judgment

Previous article:Acoustic Beamforming for Vehicle Pass-By Noise Testing Using LabVIEW
Next article:Design of ZigBee coordinator gateway based on GPRS communication

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号