Two-Channel PC Based Oscilloscope USB
More and more experiments are now ‘PC-assisted.’ Also conventional acquisition systems are very expensive. Since portable PCs are today common and a USB link is a better solutionhere we present an oscilloscope using USB port of the PC that operates at up to 10 kHz with ±16V input voltage. It has much more improved features than the PC-based oscilloscope . 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.
At the heart of this oscilloscope is USB2.0-compliant microcontroller PIC18F2550 from Microchip. You can also use IC18F2445 in place of PIC18F2550. Specifications of this microcontroller are:-
Features of 18F2550
- Up to 32 kB of flash memory, 2kB RAM and 256-byte EEPROM
- Extended instruction set (optimised for ‘C’ compiler)
- 8×8 single-cycle multiplier
- Single-supply serial programming and easy debugging
- USB1.1 and 2.0 from 1.5 MB/s to 12 MB/s
- Isochronous, bulk and interrupt transfer modes
- 1 kB of access RAM usable with 32 endpoints (64 bytes each)
- From internal 31 kHz to external 48 MHz with PLL
- Possible software switching between ‘run,’ ‘idle’ and sleep
modes. In sleep mode, current is down to 0.1 μA.
- Wide operating voltage range (2.0V to 5.5V). Useful for battery
Complete set of classical peripherals
- Several input/output (I/O) ports, four timers with capture/
- Synchronous and asynchronous enhanced modules
- Streaming parallel port
- 10-bit ADC module with up to 13-channel multiplexer.
This microcontroller has a USB2.0-compliant transceiver and a CPU running up to 12 MIPS.
avobe figrue shows the circuit of the two-channel PC-based oscilloscope. MCP6S91 from Microchip Technology is an analogue programmable gain amplifier that is well suited to driving analogue-to-digital converters (ADCs) and an analogue input to a PIC microcontroller. Two MCP6S91 programmable gain amplifiers (IC4 and IC5) make it possible to choose the input ranges for each of the two channels, by selecting a gain from 1:1 to 32: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 pins 5, 6 and 7.
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 ±2 mA can cause reliability problems. Applications that exceed this rating must be externally limited with a resistor to the input pin.(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 SPI 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 voltage-shifting amplifiers LF353 (IC2A and IC3A) are used,one each for each channel input (see Fig. 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 a high input impedance and an attenuation factor of 1:4.5. A ±16V input signal is then shifted to the0-5V range when the programmed gain is 1:1.
Two halves of the LF353 (IC2B and IC3B) are used as voltage followers to provide a low-impedance 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 opamps need a symmetrical supply voltage, a small DC-DC voltage converter ICL7660 (IC1) is used to feed –5V to LF353. With its small 8-pin DIP package, it needs only two polarised capacitors. ICL7660 can be replaced with a MAX1044. The MAX1044 and ICL7660 are monolithic, CMOS switched-capacitor voltage converters that invert, double, divide or multiply a positive input voltage.These are pin compatible with the industry-standard LTC1044
All the data is transmitted on the D+/D- symmetrical pins using a variable bit rate. The position of a resistor (R13) on D+ or D- allows you to choose between the full-speed (12 Mbps) and lowspeed modes (1.5 Mbps). Note that the IC18F2550/2455 devices have built-in pull-up resistors designed to meet the requirements of low-speed and fullspeed speed USB. The UPUEN bit (UCFG=4) enables the internal pull-ups. In this project, R13 is not used. External pullup may also be used. The VUSB pin may be used to pull up D+ or D-. The pull-up resistor must be 1.5 kilo-ohms (±5%) as required by the USB specification
The PIC software
The program for the microcontroller is written in ‘C’ language. MPLAB 8.70 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. This loop never stops and each USB operation is done in one pass. All operations are initiated by the host (the PC), which ends a 16-byte command
The first command byte determines the chip actions. The four possible actions are:
1. Command 80h: Clears the EEPROM calibration memory
2. Command 81h: Receives parameters, and stores the gain-error compensation for the two channels.
3. Command 83h: Initiates a zero calibration sequence of the two chan The first command byte determines the chip actions. The four possible actions are:
4. Command 80h: Clears the EEPROM calibration memory
5. Command 81h: Receives parameters, and stores the gain-error compensation for the two channels.
6. Command 83h: Initiates a zero calibration sequence of the two channel.
Installation of the USB driver.
1. If everything is fine, plug the oscilloscope with a USB cable to your PC (running Windows 98SE or higher version). A “new hardware detected–USB2-MiniOscilloscope” dialogue box must immediately appear on the screen.
NOTE:- The driver for this oscilloscope is not for windows 7 or vista.
EasyEDA: Ideas for Circuit Design, Innovation for Electronics Access
Free Circuit Design: Schematic – Simulation – PCB Layout – Gerber Viewer
Cheapest PCB Prototype: Only $2 for 10pcs 10×10cm PCBs, 24 hours Quick Turn, DHL Delivery in 3 Days
Current Project / Post can also be found using:
- D 683 IC DATA