Browse over 10,000 Electronics Projects using the Page Numbering provided at the bottom of each Page.
Cross Platform USB I/O Board With PWM in Qt5 , I/O Board V2
Quite a some time ago i published a USB I/O board PIC18F4550 which has total 16 I/O line and 5 analog input. The interface was written with Microsoft .net framework. Of course of being in .net we were bound to with windows only. so after many requests now here it is the next version of the good old USB I/O board.
The new version has complete change in the hardware. the are few feature addition like now it is possible to set the direction of individual I/O line instead in ground 8 I/O line each. the new Hardware has capability to generate PWM output with frequency range of 3Khz to 200 Khz with duty cycle from 0% to near 100 %.
The this version of hardware is based on PIC18F14K50 which is a 20 pin device. With this small microcontroller we now have Total 8 I/O lines , 3 Analog input , 1 PWM output. now the update rate of the interface is way much faster and and analog reading will automatically updated with the whole display.
The USB interface is still Standard Raw USB HID , you can sniffer the data with any host application of you choice or any programming library which support Raw HID. with help of some library you can interface the I/O Board with all sorts of automated testing and scientific calculation software like Matlab or eve LABVIEW. almost all the these type application support raw USB HID.
The schematic has nothing much but the MCU it self PIC18F14K50 with 12Mhz Crystal an RGB led , actually the hardware was build for some other purpose but due some error the silk screen there was few spare PCB left over with me so it get integrated the PCB into this project. the silk screen in the eagle file is fine and ready to use.
The ADC reference voltage set to USB bus voltage which is not going to be very accurate so it will lead to error in the ADC reading . if the accuracy of the analog readout matter to you then it is better to power the board with more stable source and now it is possible to set the ADC reference voltage in the GUI application itself.
Now new Application to access the board is the major change which happened. Instead off going with Microsoft .net we have chosen to work with a better solution Qt. Qt give many advantages over the .net , it is completely opensource and the most importantly it is absolutely cross plate from. which mean same application is going to run across all the OS we wanted to target. the Current Application is tested with Microsoft Windows 7 and Ubuntu 14.04 , i don’t have any mac machine but i am very sure it will work on mac osx with little or no changes at all.
We have written the application in C++ with Qt creator ,Qt Creator 3.1.2 (opensource) Based on Qt 5.3.1.
as you can see we have total 8 I/O individually select able , 3 Analog readout with Adjustable Vref for calibration Default set to 5000 mV assuming USB bus voltage to be 5.0V. now you have new option to generate square wave output from 3Khz to 200 Khz and adjustable Duty cycle 0 to ~100% .
Linux test , setting PWM to 80 % at 6Khz and 80% at 200Khz, there was a little permission issue with Raw HID USB device so i have to launch the application as sudo otherwise application was got getting permission to access USB hence was showing no device found. Linux uses libusb.
Ubuntu 14.04 Test Qt5
PWM Frequency 6Khz 80% Duty
Download Source Code of the Qt application ,the Firmware and all executable files