1、DesigningthePCBased4Chann精The 5 Student Conference on Research and Development SCOReD 2007 11-12 December 2007, MalaysiathDesigning the PC-Based 4-Channel Digital Storage Oscilloscope by using DSP TechniquesN.Sulaiman and N.A.MahmudHIS document explains and demonstrates how the DSO can be operated v
2、irtually, namely, running at PC. In addition, the document also explains how the GUI is developed, tested and how the integration between hardware and software is done. DSO has been preferable equipment by scientists or engineers or academicians or students as well to verify the electrical or electr
3、onic circuit operation and to save the analyzed signal for future reference. DSO will display the signal amplitude, frequency, period and wave shape and changes in voltage over time. DSO uses ADC to sample the signal and convert the voltage being measured into digital form. The vital criterion in de
4、signing the PC-Based Oscilloscope is the capability to measure and display the signal correctly and accurately. In order to achieve it, several factors need to be considered. Among them are the sampling rate, good amplifier bandwidth, good data acquisition devices,Index TermsDSO, ADC, GUI, PIC, PC-B
5、ased 4-Channel number of ADC chip, size of RAM, a good PIC, externalFlash ADC with direct memory access and DSP techniques Oscilloscopeused to process the signal and filter the signal from noise.Besides, the functional button of the DSO need to be studiedI. NOMENCLATURE so that the button created in
6、 GUI will carry the samefunctionality as the normal DSO. Moreover, DSO is selected DSO - Digital Storage Oscilloscopein this research not the analog type Oscilloscope because of PC - Personal Computerthe capability of the equipment to observe slow moving GUI - Graphical User Interfacesignals as a so
7、lid presentation on the monitor screen 6. The ADC - Analog-to-Digital ConverterDSO also has an ability to hold or retain a signal in memory RAM - Random Access Memoryfor long periods of time. In order to sample the correct signal PIC - Peripheral Interface Computerand to avoid aliasing, Low-pass ant
8、i-aliasing filter is used. Forthe display format to represent the captured waveform on the The research was done by a student under her final year engineeringproject subject and guided by a lecturer. The research was carried out at screen, sine interpolation technique is used because it can Universi
9、ti Malaysia Pahang (UMP). provide a good representation with as few as 2.5 samples per All authors are attached to Faculty of Electrical & Electronic Engineering cycle 6. (FKEE), Universiti Malaysia Pahang (UMP), Locked Bag 12, 25000 Kuantan,The brain of the hardware is PIC which will process the Pa
10、hang Darul Makmur, Malaysia.received signal and then send the data to PC through RS232 E-mail : norizamump.edu.myAbstractNowadays, the Digital Storage starts to replaceanalog type Oscilloscope due to the better functionality and features. Digital Storage Oscilloscope (DSO) is a device used by engine
11、ers, scientist or engineering students to verify or check the electronic circuit operation where the displayed signal in the DSO monitor can be analyzed and saved for future reference. DSO uses an Analog-to-Digital Converter (ADC) to convert the electrical voltage or current being measured into digi
12、tal form at certain sampling time. The sample of the signal will be saved and accumulated until it able to describe a waveform and reassembles the waveform for viewing in on the monitor screen. The purpose of the research is to design the PC-Based 4-Channel Oscilloscope where the electrical signal b
13、eing measured will be displayed on the PC (Personal Computer) monitor equipped with functionality button shown in term of Window based GUI (Graphical User Interface). The GUI is developed by using Microsoft Visual C+ 6.0. The PIC (Peripheral Interface Controller) is used for data acquisition which t
14、ransfers the data being measured to PC through RS232. Here 4 built-in ADCs are used in order to produce 4 channels Oscilloscope. The PIC is programmed by using C language to read the data from ADC and then transfer the data to PC. Frequency of 5 kHz is used as a sampling rate. Meanwhile, the clock s
15、peed of 20 MHz is selected in order to reduce the power consumption and noise. In addition, 8 Kbytes RAM chip is used for storing purpose. The research outcome shows 3 types of waveforms such as Sinusoidal, Square and Triangular are displayed with the correct frequency and amplitude. It is tested by
16、 using Signal Generator as an input to produce the waveform to the hardware. The integration between hardware (PIC) and software (GUI) is fully working. Beside that, the GUI is very user friendly and easy to be configured. The data from the signal being measured also can be saved and restored.USART
17、- Universal Synchronous Asynchronous Receiver Transmitter SPI - Serial Peripheral Interface I2C - Inter ICUART - Universal Asynchronous Receiver TransmitterTACQ - Time Acknowledgement for PIC BOR - Brown-Out-ResetTC - Hold Capacitor Charging TimeII. INTRODUCTIONT1-4244-1470-9/07/$25.00 2007 IEEE.Aut
18、horized licensed use limited to: Zhengzhou University. Downloaded on May 12,2010 at 02:40:10 UTC from IEEE Xplore. Restrictions apply.according to the instruction embedded to the chip. The PIC contains 4 built-in ADCs to represent the 4 channel scope. The PIC uses Harvard architecture due to fast, e
19、fficient and effective processors.In order to make the communication between PIC and PC work correctly and effectively, the USART is used 8. The data from PIC then sent to the MAX232 buffer and then transferred to PCs port through RS232 9-pin. The GUI at PC needs to be configured in order to interpr
20、et the data and show the waveform on the monitor screen. The illustration how thedata is transmitted to PC through RS232 is shown in Figure 1.Fig. 2. Simplified block diagram of research componentsFrom Figure 2, it can be clearly seen that 8Kbytes RAM is used for storage purpose, 8 data line connect
21、ed to port B (D7 Fig. 1. Data transmission to PC through RS232 D0) and 13 address lines connected to port C and pot D. Since2 bytes are required per reading. Hence, 4000 readings can beIII. METHODOLGY stored, thats 1000 for each channel. Notice also one controlline connected from PIC to RAM chip. Th
22、is line is used to put The research began by selecting the correct and suitable the RAM chip in read or write mode. The MAX 232 line components. The main component are Flash type buffer is connected to pin RC7 and RC6 of the PIC. Port D is Microcontroller (PIC16F877) with 4 built-in ADCs, SPI, I2C,
23、used for the first 8-bits of the 13-bits address bus (213 = 8192 UART, 8-channel 10 bit ADC, two 8-bit timers, one 16-bit address). Port E is used to select RS232 baud rate as shown in timer, watchdog timer, BOR and In-Circuit-Serial Table 1. The RC4 to RC0 is used for the upper 5-bits of the Progra
24、mming , RS-485 type UART. Other components address bus and Port B is used for 8-bit data bus. The only include 8 Kbytes RAM chip, MAX232 (for line buffer) and component making use of the data and address buses is the RS232 9-pin connected at PC and a 5V voltage regulator external RAM chip. In additi
25、on, one line is needed to put (7805) to power the circuit. The MAX232 buffer is used to RAM chip in Read or Write mode 5. convert the TTL serial logic of the PICs UART to the correct RS232 format 5. The four PICs ADC pins are used for data TABLE 1DIP-SWITCH CONFIGURATIONacquisition. The UART has bau
26、d rates of 300 bps to 115 kbpswith 8 or 9 bits, parity, start and stop bits. A clock speed to thePIC is set to 20 MHz not only to reduce power consumption and noise, but to obtain a maximum baud rate of 115 kbps of the UART for the faster communication between PIC and PC 5. The simplified block diag
27、ram of the research component is shown in Figure 2.A 5V Voltage Regulator is needed in the design in order to generate a 5 Volt DC output to power the circuit 9. The 0.1F capacitors are used to absorb line noise. Meanwhile, 100 F capacitors are used for storage in the case of minor drop in power in
28、milliseconds of time; the operation of the circuit will be not affected.For communication protocol development, there are two main communication protocols; real-time and storage 10. The block diagram of real-time communication protocol is shown in Figure 3.Authorized licensed use limited to: Zhengzh
29、ou University. Downloaded on May 12,2010 at 02:40:10 UTC from IEEE Xplore. Restrictions apply.below.TC = CHOLD(RIC + RSS + RS) In(1 / 2047) (3) = (-120 pF)(1 k + 7 k + 10 k) In(0.0004885) = 16.47sThus, the TACQ is set as below:TACQ = 2s + 16.47s + (50oC 25oC)(0.05s/oC)= 19.72sFig. 3. Real-time mode
30、with four channelsThe GUI for the research is developed by using MicrosoftThe RS232 communication is the bottleneck as theVisual C+ 6.0. The program is called Scope.exe. Themaximum sampling frequency of PIC16F877 Microcontrollerprogram is shown in Figure 4.ADC is higher than can be transmitted over
31、RS232 8.Therefore, it makes sense to calculate the maximum sample rate base based on capacity of data transmitted through RS232 at different baud rates. Two bytes are sent per frame which each byte contains 8-bits plus a start bit and stop bit. Hence, 20-bits are sent per reading. The formula for ca
32、lculating the sample rate is shown below.Sample rate = Baud rate / 20 (1) No. of ChannelsTable 2 shows the theoretical real-time sample rates for 10-bitADC.Fig. 4. Display of Scope.exe programTABLE 2THEORETICAL REAL-TIME SAMPLE RATES The left half of the window displays the waveform and the(10-bit ADC)right half of the window display the control panels. Thecontrol dialog is hidden and it can be activated by clicking on the wave form display as shown in Figure 5. Channels Rate rate Sampleat 230 Kbps at 1
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1