Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

Cross Platform USB I/O Board With PWM in Qt5 , I/O Board V2

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 Hardware 


Schematic 

   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.

The PCB 

     the PCB is designed with Free version of  Eagle CAD. PCB source can be downloaded from git repo.

The Qt5 Application

 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
 
 All the source code is available at github repo ,
 https://github.com/circuitvalley/USB-IO-Control-Board

the github repo contains executable build with required dll file for windows , dll file are very high in size.

when building qt application from source you may need to disable shadow build.

Read more Here







 

More Articles to Read

Design for a Wideband, Differential Transimpedance DAC Output
Design for a Wideband, Differential Transimpedance DAC Output
Wrist thrusters let you fly through the water effortlessly
Wrist thrusters let you fly through the water effortlessly
Bertan/Spellman 225-20R HV power supply teardown
Bertan/Spellman 225-20R HV power supply teardown
Blinking Christmas Lights
Blinking Christmas Lights
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adding an “extra sense” with rangefinders
Adding an “extra sense” with rangefinders
This wireless game controller looks like a rug
This wireless game controller looks like a rug
How to run your ESP8266 for years on a battery
How to run your ESP8266 for years on a battery
Calibration of a 3-Phase Energy Meter Board on the ADE7754
Calibration of a 3-Phase Energy Meter Board on the ADE7754
Making beats on a tiny Arduino DJ controller
Making beats on a tiny Arduino DJ controller
Qinsi-QS5100 Sn63Pb37 solder profile
Qinsi-QS5100 Sn63Pb37 solder profile
Water Detection System
Water Detection System
Professional Hi-Fi 15W Tube Amplifier circuit
Professional Hi-Fi 15W Tube Amplifier circuit
This Arduino machine will judge how sick your ollies are
This Arduino machine will judge how sick your ollies are
Turn an old payphone into a boombox for ’90s hits
Turn an old payphone into a boombox for ’90s hits
Big F’n 3D printer build
Big F’n 3D printer build
Temperature alarm for boiling milk
Temperature alarm for boiling milk
QuadBot is a 3D-printable walking robot for everyone
QuadBot is a 3D-printable walking robot for everyone
MicroConverter I2C Compatible Interface
MicroConverter I2C Compatible Interface
An Arduino tachometer for your older vehicle
An Arduino tachometer for your older vehicle

Top


Shares