Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Equipment & Tools From test equipment to hand tools

PC USB scope project.
PC USB scope project.
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 21st July 2018, 01:21 AM   #1
nigelwright7557 is offline nigelwright7557  United Kingdom
diyAudio Member
 
nigelwright7557's Avatar
 
Join Date: Apr 2008
Location: Carlisle, England
Default PC USB scope project.

after a previously successful PC USB scope project I decided to try something a littler faster.
So I got into PIC32's which run at upto 50MHz instead of the previous project which only ran at 20MHz.

I used Microchip's Harmony system to create a basic project with A2D and USB interface. The top application layer of USB was missing so I borrowed that from a different harmony project which gave me app.h and app.c files.

I set up the pic32 pins in harmony for a2d input, select pins for a 74hc4051 to select gain of scope front end.
Another task was to set up the system clock. I set cpu speed to 48MHz.
I set USB clock to 48MHz but couldn't get it to register with the pc, the pc said it couldn't connect with the usb pcb.
In the end it was down to getting the clock selectors right, despite harmony telling me it was right in fact one of the settings was wrong giving wrong usb clock.
I used my old pc software but with a bigger data buffer (2048 bytes) instead of the previous 640 bytes. I just had to calibrate the pc software to the new pic faster speed. This includes rehashing the FFT display.

For some reason all the front end worked ok except for the 1:1 voltage mode which had noise on it. In the end I traced it down to a track passing close to a negative voltage generator.
__________________
PCBCAD51 download or CDROM 2019 version out now http://www.murtonpikesystems.co.uk
  Reply With Quote
Old 22nd July 2018, 02:16 PM   #2
nigelwright7557 is offline nigelwright7557  United Kingdom
diyAudio Member
 
nigelwright7557's Avatar
 
Join Date: Apr 2008
Location: Carlisle, England
I re-laid out the pcb today with audio signals kept as short as possible and away from the 7660 negative voltage generator.

Thank goodness for cheap pcb makers like jlcpcb and pcbway !
__________________
PCBCAD51 download or CDROM 2019 version out now http://www.murtonpikesystems.co.uk
  Reply With Quote
Old 29th July 2018, 02:44 PM   #3
nigelwright7557 is offline nigelwright7557  United Kingdom
diyAudio Member
 
nigelwright7557's Avatar
 
Join Date: Apr 2008
Location: Carlisle, England
Apparently the 7660 oscillates at 10KHz so interfered nicely with my signal.
The new pcb is dead quiet.
I am not getting as good a frequency response as I had hoped at the top end.
So reduced front end gain by 10 and changed inverter into PIC into times ten gain.
This has improved top end a lot.
I was previously getting about 20KHz top end now its way above that.
__________________
PCBCAD51 download or CDROM 2019 version out now http://www.murtonpikesystems.co.uk
  Reply With Quote
Old 30th July 2018, 12:07 PM   #4
ontoaba is offline ontoaba  Indonesia
diyAudio Member
 
ontoaba's Avatar
 
Join Date: Nov 2009
Location: Kudus, Malang, Dieng
there are many working scope project out there. why not just refine them?
and i don't see any of your app.h and app.c here
  Reply With Quote
Old 30th July 2018, 01:25 PM   #5
nigelwright7557 is offline nigelwright7557  United Kingdom
diyAudio Member
 
nigelwright7557's Avatar
 
Join Date: Apr 2008
Location: Carlisle, England
Quote:
Originally Posted by ontoaba View Post
there are many working scope project out there. why not just refine them?
and i don't see any of your app.h and app.c here
There are many scope projects but I wanted the scope to be as fast as possible with a microcontroller while still be cheap. I found the PIC32 series to have 1.1 mega-samples per second a2d so decided to use that.
Trying to write assembler for PIC32 is very tedious work so I decided to use C and Microchip Harmony. There were a few problems along the way but I got it working. app.c and app.h come from the Microchip Harmony library for the USB_HID project.
__________________
PCBCAD51 download or CDROM 2019 version out now http://www.murtonpikesystems.co.uk
  Reply With Quote
Old 3rd August 2018, 05:46 PM   #6
nigelwright7557 is offline nigelwright7557  United Kingdom
diyAudio Member
 
nigelwright7557's Avatar
 
Join Date: Apr 2008
Location: Carlisle, England
Default USB scope, in need of bandwidth.

I designed a 460,000 samples per second usb scope.
It worked well with up to 20KHz sine waves.

I then designed a 1,000,000 samples per second scope.
For some reason I couldn't get past the 20KHZ sine wave, it just rolled off after 20KHz.
I looked into it and it looked like my 1 meg input resistor in conjunction with the large feedback resistors to get gain was limiting my bandwidth to about 20KHz.
So I then attenuated the input by a factor of ten to bring down the op amp feedback resistors by a factor of ten. This gave me a bandwidth of about 40KHz.

My next step is to use a passive front end using a 74HC4051 to select different resistors in the potential divider chain. After that stage I buffer the signal with a none invertin gstage and then amplify signal by a factor of 4 so that gives a range of 250mV per division up to 80 volts per division.

PCB is with jlcpcb being manufactured so will see how it goes.

Op amps are great tools but do suffer at the higher limits of impedance.
__________________
PCBCAD51 download or CDROM 2019 version out now http://www.murtonpikesystems.co.uk
  Reply With Quote
Old 3rd August 2018, 06:28 PM   #7
jazbo8 is offline jazbo8
diyAudio Moderator
 
jazbo8's Avatar
 
Join Date: Jan 2011
Location: In Transient
PC USB scope project.
Please do not start multiple threads about the same project, which is against the forum rules.
  Reply With Quote
Old 9th August 2018, 12:09 AM   #8
nigelwright7557 is offline nigelwright7557  United Kingdom
diyAudio Member
 
nigelwright7557's Avatar
 
Join Date: Apr 2008
Location: Carlisle, England
Quote:
Originally Posted by nigelwright7557 View Post

Op amps are great tools but do suffer at the higher limits of impedance.
I got to the bottom of my bandwidth problems.
With my 1meg input resistor and 8pf op amp input capacitance things started to go downhill over about 20KHz.
I found 10pf in parallel with my 1 meg resistor brought things back into line.
__________________
PCBCAD51 download or CDROM 2019 version out now http://www.murtonpikesystems.co.uk
  Reply With Quote
Old 11th August 2018, 02:24 AM   #9
nigelwright7557 is offline nigelwright7557  United Kingdom
diyAudio Member
 
nigelwright7557's Avatar
 
Join Date: Apr 2008
Location: Carlisle, England
Sadly the 10pf only works with the 250mV mode.
It overboosts the other voltage modes. This is because input impedance is so high with 250mV mode.

I tried to find lower input capacitance op amps but cant find any much less than 8pf.

I gave up in the end and reluctantly reduced input impedance of the scope to 200K.
This gives bandwidth of about 40KHz.
I found I can boost this a bit with some post front end stage filtering.
__________________
PCBCAD51 download or CDROM 2019 version out now http://www.murtonpikesystems.co.uk
  Reply With Quote
Old 12th August 2018, 06:45 PM   #10
nigelwright7557 is offline nigelwright7557  United Kingdom
diyAudio Member
 
nigelwright7557's Avatar
 
Join Date: Apr 2008
Location: Carlisle, England
I built up a new version with 200k input impedance expecting that to be better.
It was slightly better.
As the frequency drops off above 20KHz I added a capacitor across one of the inverting amp input resistors. This boosts 20KHZ+ frequencies a little.
This brought the 250mV range into line without affecting other ranges much.

I had a look on the internet for USB scope front ends and most people get around the problem by not having input resistors in series with the input signal.
They rely on the scope probe to divide by 10 or 100.
So I came up with a new similar circuit. After buffering the input I then have my attenuator/multiplier but use much lower resistor values so as not to be affected by a few pf capacitance.
__________________
PCBCAD51 download or CDROM 2019 version out now http://www.murtonpikesystems.co.uk
  Reply With Quote

Reply


PC USB scope project.Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New project 1megasample/second PC USB scope project. nigelwright7557 Digital Line Level 0 14th July 2018 10:42 PM
DSO150 - a poor 'scope, but is it enough 'scope? bugbear Equipment & Tools 14 5th June 2018 03:13 PM
New project USB scope. nigelwright7557 Equipment & Tools 12 6th February 2017 05:59 PM
USB Scope - Real scope and not too expensive Algar_emi Equipment & Tools 11 16th March 2010 11:40 PM
Great deal on Digital scope. Is this enough scope? hifimaker Pass Labs 1 1st May 2007 09:59 PM


New To Site? Need Help?

All times are GMT. The time now is 11:56 PM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 15.00%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
Copyright ©1999-2019 diyAudio
Wiki