MF PROJECTS HOME TECHNICAL TIPS MOBILE SITE
PIC Projects
WiFi, Ethernet
Doorbell with SD / EEPROM
SD FAT16/32 for .bmp
TFT Egg Timer
LCD TFT Oscilloscope
SD Talking Clock
SD Sound Recorder,
    FAT32 wav Player
LED Thermometer
LED Egg Timer
LCD Egg Timer

Frequency Counters
TFT 10MHz
100KHz For PC
1MHz For PC
8 Digits LED 50 MHz
Scope Screen Display
LCD Module 10MHz
6MHz for Android
USB PIC18F2550
USB TFT display BMP
USB DS18B20 Sensor
USB Thermometer
USB Counter
USB Meter
USB Oscilloscope
USB Input-Output
USB 16x2 LCD

COM & LPT Ports
MCP3201 on LPT
Serial TFT Text
Serial Inputs Outputs
Serial Port LCD
Analogue Signal to LPT
MCP3201 on Serial Port
Serial Thermometer
Analogue Signal to Serial
LCD Display on LPT
Serial Thermostat

Others
Water Softener
HP Stream 7 docking
3.7V to 5V
Solar Charger

Infrared Decoder
PIC Music

Code Lock
Code Lock with LCD

USB VOLTAGE, FREQUENCY INDUCTANCE AND CAPACITANCE METER

Updated on 10/9/14 , L Meter added.
Using
PIC18F2550 for connecting analogue and digital signals to USB port . Included Visual Basic 6 software, PIC C code and a circuit diagram. The PIC microcontroller has 10 bit analogue to digital converter, by selecting 8 bits conversion the 2 LSB are ignored. The circuit is powered by the USB. The interface to the PC is HID class.
The frequency meter has a range of up to 4MHz (24bits). The meter accuracy is 0.2% or better.
Inputs samplings can be done at rates of 1 per second and 1 every 0.2 second.
The cap meter (max 50uF) measures the period of charging the cap to the Vref. The accuracy is about 5%, it depends on the charge resistors, can be calibrated by trimming 1K5 and 1M5 resistors or by the VB code.
The inductance meter (max 1H) measures the oscillation frequency of the coil under test in parallel to 0.22uF. The oscillation is triggered by a 10uS pulse from RB3. The accuracy of the measurement is about 5% and can be calibrated by the VB code or by trimming 0.22uF cap.
HID class (human interface device) is a class of devices like the mouse and the keyboard, the data transfer rate is limited to 64KB/S. The PC already has a driver for HID USB.
VB6 code includes guidance to setting up the PC. The PC register the PID and VID (product ID) of the USB device when it's plugged, the VB code uses these ID's to communicate with the device. For commercial VID it is needed to buy it from USB-IF, but in your lab you can use any number.
The source code is derived from freeware from these sources: http://janaxelson.com/usb.htm , http://openprog.altervista.org/USB_firm_eng.html
Code was written on MPLAB 8x and compiled with C18 ver 3.43. PIC18F2550 was programmed using Velleman K8076.
Software includes PIC code and VB6 code. You are free to use the circuit diagram and the VB software with no limitations.

The VB6 application is a combined digital and analogue voltmeter.

Circuit Description
See also Technical Tips

PIC18F2550
Pin 3 is the analogue input, voltage range 0 to 5V. Max input voltage is 5.5V .
Pin 11 is the counter input, TTL voltage levels.
Cx is the cap under test. BC546 selected as low leakage device for reducing error. Resistors 1M5 and 1K5 selected to give accuracy of 10%, 1K5 can be trimmed for better accuracy of uF range and 1M5 for nF range.
Lx is the coil under test. 220R triggers the coil to oscillate with parallel 0.22uF. For better stability 0.22uF should be polypropylene cap. 470K and 1K resistors on pin 4 bias the comparator input by 10mV to insure high output at idle state.
Pin 14 is 3.3V internal supply for the USB transceiver. 0.22uF is required for regulation.
Pins 15,16 are the data lines to the USB connector on the PC.
Pin 20 is the PC 5V powering the PIC. It is limited to 100mA by the PC. 10uF is for decoupling.
For USB wiring info: http://www.interfacebus.com/Design_Connector_USB.html





Name:

Comments and questions

Copy the number from the picture It stops net-robots from adding comments.


Be the first to add a comment.