Dual Channel PC Based Oscilloscope Project Report

September 30, 2017 | Author: Saurabh Rathod | Category: Amplifier, Usb, Operational Amplifier, Cathode Ray Tube, Electronic Circuits
Share Embed Donate


Short Description

Dual Channel PC Based Oscilloscope Project Report, PC Based Oscilloscope using PIC18F2550, construction, programming....

Description

2-Channel PC-Based Oscilloscope

Table of Content CHAPTER-1....................................................................................7 INTRODUCTION.............................................................................7 1.1 Background of the problem............................................................................8 1.2 Statement of the problem ...............................................................................9 CHAPTER-2...................................................................................10 PROJECT OVERVIEW...................................................................10 2.1 VIEW OF PROJECT ...................................................................................11 2.2 Advantages of the PC-Based Oscilloscope ..................................................11 2.3 Circuit Diagram of Project ...........................................................................12 2.3.1 CIRCUIT DESCRIPTION .......................................................................13 2.3.2 OPERATION ........................................................................13 CHAPTER-3...................................................................................15 PIC18F2550 Microcontroller .............................................................................15 3.1 Description ...................................................................................................16 3.2.2 UNIVERSAL SERIAL BUS (USB) .........................................................16 3.5 Pin out Diagram of PIC18F2550 Microcontroller .......................................16 3.4 Internal Block Diagram of PIC18F2550 (28-Pin) .......................................17 3.10 USB Overview ...........................................................................................18 3.10.4 POWER ..............................................................................18 3.10.9 USB Hardware ........................................................................................18 Medi-Caps Institute Of Technology & Management, Indore

Page 1

2-Channel PC-Based Oscilloscope

CHAPTER-4...................................................................................20 COMPONENTS USED....................................................................20 4.1 LF353 DUAL OPERATIONAL AMPLIFIER ............................................21 4.1.1 General Description ..................................................................................21 4.1.2 Features......................................................................................................21 4.1.3 Typical connection ....................................................................................22 4.1.4 Connection Diagram……………………………………………………..22 4.1.4 Application of LF353 in our Project .........................................................22 4.2 MCP6S91 Low gain PGA ............................................................................23 4.2.1 Description ................................................................................................23 4.2.2 Block Diagram ..........................................................................................23 4.2.3 Package Types...........................................................................................23 4.2.4 Typical Applications .................................................................................24 4.3 ICL7660 - SWITCHED CAPACITOR VOLTAGE CONVERTERS ........24 4.3.1 General Description ..................................................................................24 4.3.2 Features .....................................................................................................24 4.3.3 Typical Operating Circuit .........................................................................25 4.3.5 Application of ICL7660 in our Project .....................................................25 CHAPTER-5...................................................................................26 PCB Designing Process .....................................................................................26 5.1 Introduction ..................................................................................................27 Medi-Caps Institute Of Technology & Management, Indore

Page 2

2-Channel PC-Based Oscilloscope

5.2 Material required ..........................................................................................27 5.3 Procedure.................................................................................27 CHAPTER 6...................................................................................29 SOFTWARE’S.................................................................................29 6.1 Microcontroller’s Programming.......................................................30 6.1.1 Microcontroller Programming and Code ..................................................30 CHAPTER 7...................................................................................34 INSTALLATION AND WORKING OF THE PROJECT.................................34 7.1 Installation Steps ..........................................................................................35 7.2 Project Working ...........................................................................................35 CHAPTER-8...................................................................................36 CONCLUSION...............................................................................36 8.1Applications ..................................................................................................37 8.2 Future aspects ..............................................................................................37 REFERENCE..................................................................................38

Medi-Caps Institute Of Technology & Management, Indore

Page 3

2-Channel PC-Based Oscilloscope

CHAPTER-1 INTRODUCTION

Medi-Caps Institute Of Technology & Management, Indore

Page 4

2-Channel PC-Based Oscilloscope

1.1 Background of the problem Oscilloscopes traditionally are hardware based using a CRT (Cathode Ray Tube) designed to display voltage variations (periodic or otherwise); they are bulky, expensive and have difficultly displaying low frequency waveform.

Figure 1 - 1 Conventional Digital CRO

Figure 1 - 2 Conventional Analog CRO

The heart of the traditionally CRT oscilloscope is the display screen itself, the CRT. “The CRT is a glass bulb which has had the air removed and then been sealed with a vacuum inside. At the front is a flat glass screen, which is coated inside with a phosphor material. This phosphor will glow when struck by the fast-moving electrons and produce light, emitted from the front and forming the spot and hence the trace. The rear of the CRT contains the electron ‘gun’ assembly. A small heater element is contained within a cylinder of metal called the cathode. When the heater is activated by applying a voltage across it, the cathode temperature rises and it then emits a stream of electrons.” Medi-Caps Institute Of Technology & Management, Indore

Page 5

2-Channel PC-Based Oscilloscope

1.2 Statement of the problem More and more experiments are now ‘PC-assisted’. In addition, conventional acquisition systems are very expensive. Since portable PCs are today common and a USB link is a better solution than an old ISA bus, here we present an oscilloscope using USB port of the PC that operates at up to 10 kHz with ±16V input voltage. .The oscilloscope uses IC PIC18F2550 from Microchip as the main controller, which makes the oscilloscope compact, as there is no need of additional power supply for the entire circuit board.

Medi-Caps Institute Of Technology & Management, Indore

Page 6

2-Channel PC-Based Oscilloscope

CHAPTER-2 PROJECT OVERVIEW

Medi-Caps Institute Of Technology & Management, Indore

Page 7

2-Channel PC-Based Oscilloscope

2.1 VIEW OF PROJECT This project attempts to achieve the same functionality as a traditional oscilloscope, using a PIC microcontroller for data acquisition (including appropriate analogue circuitry) which transfers the data to the PC through USB. A Microsoft Windows based software application will then display the waveform, as it would appear on a traditional CRT oscilloscope. This software application will have additional features not present on a traditional oscilloscope with greater flexibly as additional features can be added as they can be developed without the need for new hardware.

2.2 Advantages of the PC-Based Oscilloscope  Large screen using data projector for demonstration purposes.  Remote monitoring (e.g. via the internet remotely control/view the oscilloscope from anywhere in the world).  Low cost.  Software Upgradeable.

Medi-Caps Institute Of Technology & Management, Indore

Page 8

2-Channel PC-Based Oscilloscope

2.3 Circuit Diagram of Project

Medi-Caps Institute Of Technology & Management, Indore

Page 9

2-Channel PC-Based Oscilloscope 2.3.1 CIRCUIT DESCRIPTION At the heart of this oscilloscope is USB2.0-compliant microcontroller PIC18F2550from Microchip. We can also use PIC18F2445 in place of PIC18F2550.Specifications these microcontrollers are as follows: Programming 1. Up to 32 KB of flash memory. 2. 2 KB RAM and 256-byte EEPROM2. Extended instruction set (optimized for ‘C’ compiler). 3. 3. 8x8 single-cycle multiplier. 4. Single-supply serial programming and easy debugging. USB transceiver 1. USB1.1 and 2.0 from 1.5 MB/s to 12 MB/S. 2. Isochronous, bulk and interrupt transfer modes. 3. 1 KB of access RAM usable with 32 endpoints (64 bytes each) Multiple oscillator and power modes 1. From internal 31 kHz to external 48 MHz with PLL. 2. Possible software switching between ‘run’, ‘idle’ and sleep modes. In sleep mode, current is down to 0.1 µA. 3. 3. Wide operating voltage range (2.0V to 5.5V) Useful for battery operations. Complete set of classical peripherals 1. Several input/output (I/O) ports, four timers with capture/compares. 2. Synchronous and asynchronous enhanced modules. 3. Streaming parallel port. 4. 10-bit ADC module with up to 13-channel multiplexer.

2.3.2 OPERATION Figure 2-1shows the circuit of the 2-Channel-PC Based Oscilloscope.MCP6S91 from Microchip Technology is an analogue programmable gain amplifier that is well suited for driving analogue-to digital converters (ADCs) and an analogue input to a PIC microcontroller. Two MCP6S91 programmable gain amplifiers (IC2 and IC3) make it possible to choose the input ranges for each of the two channels, by selecting a gain from 1:1to32:1. The amplifiers are small, cheap and easy to use. A simple three-wire serial peripheral interface (SPI) allows the PIC to control them through its pins 5, 6 and7. The MCP6S91 amplifier is designed with CMOS input devices. It is designed to not exhibit phase inversion when the input pins exceed the supply voltages. The maximum voltage that can be applied to the input pin is -0.3V (Vss) to +0.3V (Vdd). Input voltages that exceed this absolute maximum rating can cause excessive current into or out of the input pins. Current beyond ±2mA can cause reliability problems. Applications that exceed this rating must be externally limited with a resistor to the input pin.

Medi-Caps Institute Of Technology & Management, Indore

Page 10

2-Channel PC-Based Oscilloscope Vref (pin 3), which is an analogue input, should be at a voltage between Vss and Vdd. The voltage at this pin shifts the output voltage. The SP Interface inputs are chip-select (CS), serial input (SI) and serial clock (SCK). These are Schmitt-triggered, CMOS logic inputs. The only disadvantage is that these amplifiers accept only positive signals. That’s why voltageshifting amplifiers LF353 (IC4A and IC5A) are used, one each for each channel input (see Figure 2- 1). The LF353 is a JFET input operational amplifier with an internally compensated input offset voltage. The JFET input device provides wide bandwidth; low input bias currents and offset currents. This voltage-shifting amplifier results in high input impedance and an attenuation factor of 1:4.5.A ±16V input signal is then shifted to the 0-5Vrange when the programmed gain is 1:1. Two halves of the LF353 (IC4B and IC5B) are used as voltage followers to provide a lowimpedance shifting voltage (Vref) to the programmable amplifiers. This voltage must be precisely adjusted with two 4.7-kiloohm presets to measure precisely 2.5V level on the inputs of IC2 and IC3 when the input signals are grounded. Because LF353 Op-Amps need a symmetrical supply voltage, a small DC-DC voltage converter ICL7660 (IC6) is used to feed –5V to LF353. With its small 8-pin DIP package, it needs only two polarized capacitors. ICL7660 can be replaced with a MAX1044. The MAX1044 and ICL7660 is monolithic, CMOSs witched-capacitor voltage converters that invert, double, divide or multiply a positive input voltage.

Medi-Caps Institute Of Technology & Management, Indore

Page 11

2-Channel PC-Based Oscilloscope

CHAPTER-3 PIC18F2550 MICROCONTROLLER

Medi-Caps Institute Of Technology & Management, Indore

Page 12

2-Channel PC-Based Oscilloscope

3.1 Description The PIC18F2550 is 28-Pin High Performance, Enhanced Flash, USB Microcontroller with Nano-watt technology. This family of devices offers the advantages of all PIC18 microcontrollers namely, high computational performance at an economical price – with the addition of high endurance, Enhanced Flash program memory. In addition to these features, the PIC18F2455/2550/ 4455/4550 family introduces design enhancements that make these microcontrollers a logical choice for many high-performances, power sensitive applications.

3.2 Universal Serial Bus (USB) Devices in the PIC18F2455/2550/4455/4550 family incorporate a fully featured Universal Serial Bus communications module that is compliant with the USB Specification Revision 2.0. The module supports both low-speed and full-speed communication for all supported data transfer types. It also incorporates its own on-chip transceiver and 3.3V regulator and supports the use of external transceivers and voltage regulators.

3.3 Pin out Diagram of PIC18F2550 Microcontroller

Figure 3-1 PINOUT DIAGRAM OF PIC18F2550

Medi-Caps Institute Of Technology & Management, Indore

Page 13

2-Channel PC-Based Oscilloscope

3.4 Internal Block Diagram of PIC18F2550 (28-Pin)

Medi-Caps Institute Of Technology & Management, Indore

Page 14

2-Channel PC-Based Oscilloscope

3.5 USB Overview USB Specifications can be seen from the USB website www.usb.org and the basic details of the USB is also given in PIC18F2550 datasheet. Here we are going to present the brief overview on USB in PIC18F2550 microcontroller. This section presents some of the basic USB concepts and useful information necessary to design a USB device. Although much information is provided in this section, there is a plethora of information provided within the USB specifications and class specifications. Thus, the reader is encouraged to refer to the USB specifications for more information (www.usb.org). If you are very familiar with the details of USB, then this section serves as a basic, high-level refresher of USB.

3.5.1 POWER Power is available from the Universal Serial Bus. The USB specification defines the bus power requirements. Devices may either be self-powered or bus powered. Self-powered devices draw power from an external source, while bus powered devices use power supplied from the bus. The USB specification limits the power taken from the bus. Each device is ensured 100 mA at approximately 5V (one unit load). Additional power may be requested, up to a maximum of 500 mA. Note that power above one unit load is a request and the host or hub is not obligated to provide the extra current. Thus, a device capable of consuming more than one unit load must be able to maintain a low-power configuration of a one unit load or less, if necessary. The USB specification also defines a Suspend mode. In this situation, current must be limited to 500 A, averaged over 1 second. A device must enter a Suspend state after 3 ms of inactivity (i.e., no SOF tokens for 3 ms). A device entering Suspend mode must drop current consumption within 10 ms after Suspend. Likewise, when signaling a wake-up, the device must signal a wake-up within 10 ms of drawing current above the Suspend limit.

3.5.2 USB Hardware USB is a four wire interface implemented using a four-core shielded cable. Two types of connectors are specified and used: Type-A and Type-B. The Pin-Out of USB Connectors is shown in Figure 3-3.

Figure 3–3 Pin-Out of USB Connectors

Medi-Caps Institute Of Technology & Management, Indore

Page 15

2-Channel PC-Based Oscilloscope The image of Type-A and Type-B USB Connector is shown in Figure 3-4.

Figure 3-4 USB Connectors

The USB Connector Pin assignment is shown in Table 3-1.

Table 3-1 USB Connector PIN Assignment

The specification also defines mini-B connector, mainly used in smaller portable electronic devices such as cameras and other hand-held devices. This connector or has a fifth pin called ID, though this pin is not used.

Medi-Caps Institute Of Technology & Management, Indore

Page 16

2-Channel PC-Based Oscilloscope

CHAPTER-4 COMPONENTS USED

Medi-Caps Institute Of Technology & Management, Indore

Page 17

2-Channel PC-Based Oscilloscope Some of the other important components used in our project are described in brief in the subsequent sections. They are as follow:  LF353 Dual Operation Amplifier.  MSCP6S91 Gain Amplifier from Microchip Technology.  ICL7660 Switched Capacitor Voltage Converter.

4.1 LF353 DUAL OPERATIONAL AMPLIFIER 4.1.1 General Description These devices are low cost, high speed, wide bandwidth dual JFET input operational amplifiers with an internally trimmed input offset voltage. They require low supply current yet maintain a large gain bandwidth product and fast slew rate. In addition, well matched high voltage JFET input devices provide very low input bias and offset currents. These amplifiers may be used in applications such as high speed integrators, fast D/A converters, sample and hold circuits and many other circuits requiring low input offset voltage, low input bias current, high input impedance, high slew rate and wide bandwidth. The devices also exhibit low noise and offset voltage drift.

4.1.2 Features Internally trimmed offset voltage Low input bias current Low input noise voltage Low input noise current Wide gain bandwidth High slew rate Low supply current Low total harmonic distortion Low 1/f noise corner Fast settling time to 0.01%

10 mV 50pA 25 nV/Hz 0.01 pA/Hz 4 MHz 13 V/μs 3.6 mA ≤0.02% 50 HZ 2 μs

Table 4.1 Features of LF353

Medi-Caps Institute Of Technology & Management, Indore

Page 18

2-Channel PC-Based Oscilloscope

4.1.3 Typical Connection

Figure 4-1 Typical Connection Diagram of LF353

4.1.4 Connection Diagram

Figure 4-2 Pin Out Diagram

4.1.5 Application of LF353 in our Project There are two applications of LF353 in our Project and they are as follow:  It is used as Voltage Shifting Amplifier to shift the negative signal to the positive signal, as the Gain Amplifier IC i.e. MCP6S91 is not able to process the negative signal.  Secondly it is used as voltage followers to provide low impedance shifting voltage to Vref Pin of Gain Amplifier.

Medi-Caps Institute Of Technology & Management, Indore

Page 19

2-Channel PC-Based Oscilloscope

4.2 MCP6S91 Low gain PGA 4.2.1 Description The Microchip Technology Inc. MCP6S91is analog Programmable Gain Amplifiers (PGAs). They can be configured for gains from +1 V/V to+32 V/V and the input multiplexer can select one of up to two channels through a SPI port. The serial interface can also put the PGA into shutdown to conserve power. These PGAs are optimized for high-speed, low offset voltage and single-supply operation with rail-to-rail input and output capability. These specifications support single supply applications needing flexible performance or multiple inputs. The one-channel MCP6S91 is available in 8-pin PDIP, SOIC and MSOP. All parts are fully specified from -40°C to +125°C.

4.2.2 Block Diagram

Figure 4-3 Block Diagram of MCP6S91

4.2.3 Package Types

Figure 4 - 4 Pin Out Diagram of MCP6S91

Medi-Caps Institute Of Technology & Management, Indore

Page 20

2-Channel PC-Based Oscilloscope

4.2.4 Typical Applications Gain Ranging Figure 4-5 shows a circuit that measures the current Ix. The circuit’s performance benefits from changing the gain on the PGA. Just as a hand-held millimeter uses different measurement ranges to obtain the best results, this circuit makes it easy to set a high gain for small signal.

Figure 4 - 5 Gain Ranging Circuit

For further details on MCP6S91 IC from Microchip Technology, one can refer its datasheet, which can be downloaded free of cost from the www.microchip.com.

4.3 ICL7660 - SWITCHED CAPACITOR VOLTAGE CONVERTERS 4.3.1 General Description The ICL7660 and MAX1044 is monolithic, CMOS switched-capacitor voltage converters that invert, double, divide, or multiply a positive input voltage. They are pin compatible with the industry-standard ICL7660. Operation is guaranteed from1.5V to 10V with no external diode over the full temperature range. They deliver 10mA with a 0.5V output drop. The ICL7660 combine low quiescent current and high efficiency. Oscillator control circuitry and four power MOSFET switches are included on-chip. Applications include generating a -5V supply from a +5V logic supply to power analog circuitry. For applications requiring more power, theMAX660 delivers up to 100mA with a voltage drop of less than 0.65V.

4.3.2 Features      

Miniature μMAX Package 1.5V to 10.0V Operating Supply Voltage Range 98% Typical Power-Conversion Efficiency Invert, Double, Divide, or Multiply Input Voltages No-Load Supply Current: 200μA Max at 5V No External Diode Required for Higher-Voltage Operation

Medi-Caps Institute Of Technology & Management, Indore

Page 21

2-Channel PC-Based Oscilloscope

4.3.3 Typical Operating Circuit

Figure 4-6 Negative Voltage Converter

4.3.4 Application of ICL7660 in our Project In our project this IC is used as Negative Voltage converter to provide symmetrical negative voltage supply to the dual-operational amplifier. The circuit for generating this is shown in Figure 4-7.

Figure 4-7 Circuit for Generating Negative Power Supply

Medi-Caps Institute Of Technology & Management, Indore

Page 22

2-Channel PC-Based Oscilloscope

CHAPTER-5 PCB DESIGNING PROCESS

Medi-Caps Institute Of Technology & Management, Indore

Page 23

2-Channel PC-Based Oscilloscope

5.1 Introduction Making a Printed Circuit Board is the first step towards building electronic equipment by any electronic industry. A number of methods are available for making PCB. The PCB in this project is made in lab with the proper procedure mentioned below. PCB is developed to obtain a conducting circuit diagram on the board. All the path which leads to current flow are developed on board and then desired components are soldered.

5.2 Material required        

EAGLE software. Copper Board. LASER printer Glossy paper Iron Ferrous chloride Etching solution Soldering gun Soldering wire  Soldering flux

5.3 Procedure  Layout is developed in EAGLE, and then its printout is taken on glossy paper with LASER printer as shown in Figure 5-1.  Now place this printout on the Copper Board and place hot iron on it and press it for 3-5 minutes.  Now the circuit is printed on the Copper Board. Excess copper is removed by etching.  For etching add Ferric Chloride (FeCl3) in a plastic container carefully, without any splashing. Place the board in solution with copper side up  After etching PCB is ready and the holes are drilled and finally components are mounted on it.

Medi-Caps Institute Of Technology & Management, Indore

Page 24

2-Channel PC-Based Oscilloscope

Figure 5- 1 Printout Taken by Express PCB Software

Medi-Caps Institute Of Technology & Management, Indore

Page 25

2-Channel PC-Based Oscilloscope

CHAPTER 6 SOFTWARE’S

Medi-Caps Institute Of Technology & Management, Indore

Page 26

2-Channel PC-Based Oscilloscope

6.1 Microcontroller’s Programming There are two well-known and popular software’s available in market for programming PIC series microcontroller, and they are as follow:  MPLAB IDE along with Hi-Tech C Compiler from Microchip Technology.

 MikroC for PIC from MikroElektronika. Both of these software’s are extremely good, we have used both software’s for our learning purpose but as MikroC doesn’t permit to compile the code above 2 kilobytes in its evaluation version, so we have to go for MPLAB IDE along with Hi-Tech C Compilers.

6.1.1 Microcontroller Programming and Code The program for the microcontroller is written in ‘C’ language. MPLAB 8.91 along with MPLAB_C18 is used as the software tool for development. The software tools can be downloaded for free from website www.microchip.com. Based on Microchip’s application notes, the program for the chip is centered on a main loop continually polling the USB transceiver state. The PIC software consists of eight ‘C’ program source files, 14 header files and a linker file all under ‘aquis.mcp’ project. The main ‘C’ program source file (‘main.c’) is given below: The ‘main.c’ program is as follow:

/********************************************************************* * * Microchip USB C18 Firmware Version 1.0 * ********************************************************************* * FileName: main.c * Dependencies: See INCLUDES section below /** I N C L U D E S **********************************************************/ #include "p18f2550.h" #include "typedefs.h" // Required #include "usb.h" // Required #include "io_cfg.h" // Required #include "user.h" // Modifiable /** V A R I A B L E S ********************************************************/ #pragma udata extern extern extern extern

unsigned char voie1[256]; unsigned char voie2[256]; unsigned char voiesH1[64],voiesH2[64]; char ordre, timeout;

Medi-Caps Institute Of Technology & Management, Indore

Page 27

2-Channel PC-Based Oscilloscope /** P R I V A T E P R O T O T Y P E S ***************************************/ static void InitializeSystem(void); void USBTasks(void); void timer_isr(void); /** V E C T O R M A P P I N G **************************************/ extern void _startup (void); // See c018i.c in your C18 compiler dir #pragma code _RESET_INTERRUPT_VECTOR = 0x000800 void _reset (void) { _asm goto _startup _endasm } #pragma code #pragma code low_vector = 0x18 void low_interrupt (void) { _asm goto timer_isr _endasm } #pragma code

#pragma interruptlow timer_isr //Fixe une periode de 1 seconde pour le time-out aquisition void timer_isr(void) { //Reset l'it du timer 1 INTCONbits.TMR0IF=0; TMR0H= 256-183; TMR0L= 0; timeout++;

// incremente le compteur time-out !!

} /*#pragma code _LOW_INTERRUPT_VECTOR = 0x000818 void low_ISR (void) { ; }*/ /** D E C L A R A T I O N S **************************************************/ #pragma code /********************************************************************** ******** * Function: void main(void) * PreCondition: None * Input: None * Output: None * Side Effects: None * Overview: Main program entry point. * Note: None *********************************************************************** ******/ void main(void) { InitializeSystem();

Medi-Caps Institute Of Technology & Management, Indore

Page 28

2-Channel PC-Based Oscilloscope ordre=0; while(1) { USBTasks(); ProcessIO(); }//end while }//end main

// USB Tasks // See user\user.c & .h

/********************************************************************** ******** * Function: static void InitializeSystem(void) * PreCondition: None * Input: None * Output: None * Side Effects: None * Overview: InitializeSystem is a centralize initialization routine. * All required USB initialization routines are called from * here. * User application initialization routine should also be * called from here. *********************************************************************** ******/ static void InitializeSystem(void) { ADCON1 |= 0x0F; // Default all pins to digital #if defined(USE_USB_BUS_SENSE_IO) tris_usb_bus_sense = INPUT_PIN; // See io_cfg.h #endif #if defined(USE_SELF_POWER_SENSE_IO) tris_self_power = INPUT_PIN; #endif UserInit();

// See user.c & .h

mInitializeUSBDriver();

// See usbdrv.h

}//end InitializeSystem /********************************************************************** ******** * Function: void USBTasks(void) * PreCondition: InitializeSystem has been called. * Input: None * Output: None * Side Effects: None * Overview: Service loop for USB tasks. *********************************************************************** ******/ void USBTasks(void) { /* Servicing Hardware */ USBCheckBusStatus(); // Must use polling method if(UCFGbits.UTEYE!=1)

Medi-Caps Institute Of Technology & Management, Indore

Page 29

2-Channel PC-Based Oscilloscope USBDriverService();

// Interrupt or polling

method }// end USBTasks /** EOF main.c ***************************************************************/

Rests of the programs are provided by Microchip and are available on the Microchip’s website ( www.microchip.com ). After compiling this code the hex file gets generated, now we have to burn this hex file into the microcontroller. To do this we have used simple JDM programmer given in “PIC Microcontroller Development Board” (NV5002 kit by ‘Nvis Technologies’) for programming the microcontroller. The software used for programming is ‘PICPgm Programmer’.

Medi-Caps Institute Of Technology & Management, Indore

Page 30

2-Channel PC-Based Oscilloscope

CHAPTER 7 INSTALLATION AND WORKING OF THE PROJECT

Medi-Caps Institute Of Technology & Management, Indore

Page 31

2-Channel PC-Based Oscilloscope This chapter describes how to connect the Oscilloscope Hardware with the host Computer. The various steps are to be taken while installing the hardware. And these are as follow:

7.1 Installation Steps 1. First of all the hardware is connected to the host computer with the help of a USB cable, when this device gets connected successfully, a dialogue box will appear displaying ‘USB2-Mini Oscilloscope’. 2. Now a Pop-up window will appear. Which is the hardware installation wizard. 3. Select the advance button and click next. 4. Then provide the path for the drivers and click on the next button. 5. During installation a hardware warning error comes just click on continue anyway button. 6. Then a pop-up dialogue box will appear at the right bottom of the screen, displaying your new hardware gets installed and ready to use. 7. One can check the hardware in ’Device Manager’.

7.2 Project Working Now, our 2-Channel PC Based Oscilloscope is ready, we have to just view the output, by connecting the signal (generated by a function generator or any other device, for verification purposes we can use function generator).

Medi-Caps Institute Of Technology & Management, Indore

Page 32

2-Channel PC-Based Oscilloscope

CHAPTER-8 CONCLUSION

Medi-Caps Institute Of Technology & Management, Indore

Page 33

2-Channel PC-Based Oscilloscope

8.1 Applications  Monitoring of sound waves, which are difficult to monitor on a traditional oscilloscope due to the low frequencies involved.  Monitoring of an ECG signal, again because this is such a low frequency traditional oscilloscopes would have difficultly monitoring such a signal. ECG data could be logged and emailed directly to the doctor for diagnosis, or perhaps real-time TCP/IP internet communication so that the doctor could remotely monitor the ECG signal in real-time.  The PC based oscilloscope is ideal for demonstration purposes, for example using data projector a class of student could be introduced to the oscilloscope, with real waveforms being monitored (signal generator, or even a microphone for sound waves) and displayed on a large project or display.  Because of the low cost of the PC based oscilloscope, it is economical for a school / technical college to have large quantities available for students. Unlike traditional analogue scopes which are expensive and students are forced to share equipment, because it is not economical to purchase enough scopes for every student.

8.2 Future aspects The future aspect of this Oscilloscope depends on the developer smartness that how efficiently he/she will experiment with the acquired samples based on our perception one can add various functionality such as follows:  The Oscilloscope can be extended up to 10 channels as PIC18F2550 supports 10 Analogto-Digital Converter.  Features like Save, Import and Export of the plots can be added to the visual basic graphical user interface.  Additional High-Level operations can also be inserted like logarithmic plot, Fourier Transform etc.  Frequency Range can be increased, so that this oscilloscope can handle more types of signal.

Medi-Caps Institute Of Technology & Management, Indore

Page 34

2-Channel PC-Based Oscilloscope

REFERENCE 1. 2. 3. 4. 5. 6.

www.sonsivri.to www.electronicsforu.com www.microchip.com for USB Based firmware’s and datasheets MikroElektronika Documentation. MPLAB IDE and Hi-Tech Documentation M.A. Mazidi | J.G. Mazidi | R.D. McKinlay ‘The 8051 Microcontroller and Embedded Systems Using Assembly & C’ 7. www.usb.org for USB 2.0 Specifications 8. www.google.com for searching all datasheets

Medi-Caps Institute Of Technology & Management, Indore

Page 35

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF