Difference between revisions of "Simple USB Oscilloscope"
From Francois Louw
Line 7: | Line 7: | ||
__TOC__ | __TOC__ | ||
---- | ---- | ||
− | + | =A Simple/DIY USB Oscilloscope= | |
I have at many times wished that I had an oscilloscope. Given the prices, and shipping costs they are a bit too expensive for just hobbyist jobs. I have looked at USB oscilloscopes that are currently available, but starting at around $50 for one, that has a bit too high claims of sensing speed and accuracy, I realised that it will be a good weekend project to create a DIY USB Oscilloscope. | I have at many times wished that I had an oscilloscope. Given the prices, and shipping costs they are a bit too expensive for just hobbyist jobs. I have looked at USB oscilloscopes that are currently available, but starting at around $50 for one, that has a bit too high claims of sensing speed and accuracy, I realised that it will be a good weekend project to create a DIY USB Oscilloscope. | ||
Line 17: | Line 17: | ||
It's not pretty but it works! | It's not pretty but it works! | ||
− | + | =Specifications= | |
The goal was to create an Oscilloscope that is good enough for my ECU prototyping. Here are a list of the specifications for what I wanted. | The goal was to create an Oscilloscope that is good enough for my ECU prototyping. Here are a list of the specifications for what I wanted. | ||
Line 33: | Line 33: | ||
Ok, well, all of that is good, except, as most projects go, the timeframe of just weekend didn't work, so in the end it took me 5 days to get it sorted. There are still a few minor bugs in the Windows code, and inefficient coding. But it works 100%! | Ok, well, all of that is good, except, as most projects go, the timeframe of just weekend didn't work, so in the end it took me 5 days to get it sorted. There are still a few minor bugs in the Windows code, and inefficient coding. But it works 100%! | ||
− | + | =Hardware and Schematic= | |
The following is a bill of materials of what I used: | The following is a bill of materials of what I used: | ||
*Microchip PIC32MX220F032B | *Microchip PIC32MX220F032B | ||
Line 65: | Line 65: | ||
The voltage regulator is a simple linear low drop off regulator from ST Microelectronics. Any other regulator can also be used to drop the voltage to 3.3V. | The voltage regulator is a simple linear low drop off regulator from ST Microelectronics. Any other regulator can also be used to drop the voltage to 3.3V. | ||
− | + | =Firmware= | |
To create the firmware I used MPLabX 1.60 with Microchip XC32 V1.20 Compiler. This was programmed with the ICD3 programmer/debugger. I also used Microchip's Application Library 2013-02-15 USB Stack. The USB mode used is the LibUSB Generic Driver. | To create the firmware I used MPLabX 1.60 with Microchip XC32 V1.20 Compiler. This was programmed with the ICD3 programmer/debugger. I also used Microchip's Application Library 2013-02-15 USB Stack. The USB mode used is the LibUSB Generic Driver. | ||
Line 79: | Line 79: | ||
USB Packet structure is done first by writing the endpoint 0x81, then the packetsize, then the channel number followed by samples. This results in a max of 61 bytes of data (61 samples) per packet to be sent to the computer. | USB Packet structure is done first by writing the endpoint 0x81, then the packetsize, then the channel number followed by samples. This results in a max of 61 bytes of data (61 samples) per packet to be sent to the computer. | ||
− | + | =Windows Software= | |
This part is a bit more difficult. I have used Qt 4.7, with MinGW, and QWT 6.1.0rc3. Qt can be found [http://qt-project.org/downloads here] with MinGW. QWT for Qt can be found [http://qwt.sourceforge.net/ here]. '''Follow the QWT Installation instructions to the letter!''' Please don't contact me if you cant get QWT to work, search on the internet and on forums. | This part is a bit more difficult. I have used Qt 4.7, with MinGW, and QWT 6.1.0rc3. Qt can be found [http://qt-project.org/downloads here] with MinGW. QWT for Qt can be found [http://qwt.sourceforge.net/ here]. '''Follow the QWT Installation instructions to the letter!''' Please don't contact me if you cant get QWT to work, search on the internet and on forums. | ||
Line 101: | Line 101: | ||
<br clear=all> | <br clear=all> | ||
− | + | =Everything Together= | |
When you add everything together, you have a simple but effective USB oscilloscope that is good enough for everyday projects. As a Checklist remember to do the following (preferably in order) | When you add everything together, you have a simple but effective USB oscilloscope that is good enough for everyday projects. As a Checklist remember to do the following (preferably in order) | ||
Line 122: | Line 122: | ||
As stated before, the software has major room for improvement, and maybe someday I will get round to do it. But in the meantime, feel free to use this and improve! Remember to link to this site and share your design! | As stated before, the software has major room for improvement, and maybe someday I will get round to do it. But in the meantime, feel free to use this and improve! Remember to link to this site and share your design! | ||
− | + | =Download= | |
'''Everything here is provided under the [[Gplv3]] licence. Do not claim this as your own, do not make money from this, release your version also as open source. Give back to the community.''' | '''Everything here is provided under the [[Gplv3]] licence. Do not claim this as your own, do not make money from this, release your version also as open source. Give back to the community.''' | ||