Author Topic: Flea-Scope™ USB Oscilloscope, Logic Analyzer, and more ($18, 18 Msps, WebUSB)  (Read 4862 times)

0 Members and 1 Guest are viewing this topic.

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
Hi all,

I've been working on this for about a year and finally got it into production -- it's a super-simple and easy-to-use USB oscilloscope, logic analyzer, and waveform generator that is controlled by a web-page -- with no software install required!  Just open a web-page -- on a computer, tablet, or phone -- and connect to the USB device using WebUSB and you are up-and-running.

The board is basically some life-support and a bit of analog front-end around a fast MCU -- the PIC32MK0512GPK064, with 5 interleaved ADCs running together!

It's also completely open-source, so you can build one yourself if you want and dive into the inner workings -- check out:

https://hackaday.io/project/192598-flea-scope-usb-oscilloscope-18-18-msps-webusb

The full User's Guide with specifications (and a "how it works" section) is here:

https://rtestardi.github.io/usbte/flea-scope.pdf

I am dreaming of getting this into high-schools to help kids build technology again -- not just assemble prefab components -- my first oscilloscope cost $400 and had basically the same specs as this!  It's likely good enough for most things kids can do with a solderless breadboard or wire wrap!

I also think it's an amazing example of how you can use WebUSB to connect to microcontroller gadgets -- and avoid the whole problem of writing an "app" for a half-dozen different platforms, in different languages, dealing with app stores or driver signing or whatever!  Literally, you just open a web-page and you are up-and-running!

The even cooler thing is you can use a different web-page and log in interactively and reprogram the thing in BASIC and take control of all its pins, turning the MCU into a fully re-programmable embedded systems core!

If you know anyone in education who would want these for their classroom, I have a few hundred extra in hackerbox form -- have the school contact me!

-- Rich

 

Offline shabaz

  • Frequent Contributor
  • **
  • Posts: 436
That looks really nice. Congrats on the product. And great vision that this could be useful for schools and kids.
I'm going to order from Elecrow at least a couple (so that hopefully a couple of kids can show their teacher all about it).
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
Thanks!!!  The other place I find this useful is for automotive work...  It is nice to finally be able to see things like the crankshaft sensor signal with just a laptop!

 
The following users thanked this post: pardo-bsso

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1911
  • Country: au
That's cute.

Did you look at the (very) new dsPIC33A ? - claims 2 x 40 Msps ADC's, 40V/us OpAmps,  and 1.6GHz VCO's, comes in 28/36/48/64 pin packages.
Could be a base for a nice Scope/Generator/frequency counter ?

https://www.microchip.com/en-us/search?searchQuery=dsPIC33A&category=ALL&fq=start%3D0%26rows%3D10
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
Wow, no, I did not see that one!  And am having trouble finding a real datasheet...

(And the MK/GPK was brand new when I started -- we had to wait until March of this year for production ramp...)

How did you find that?  Might there be one with USB as well?  80 Msps would be amazing -- I could spin the board for that! :-)

The challenge at these rates is you can run out of DMA bandwidth -- I actually had the ADCs working at 20 Msps on MK/GPK, but had to drop it to 18.18 Msps because we ran out of bus bandwidth when I added in digital capture and waveform generation as well.

 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1911
  • Country: au
How did you find that?  Might there be one with USB as well?  80 Msps would be amazing -- I could spin the board for that! :-)

https://www.eevblog.com/forum/microcontrollers/dspic33a-new-32bit-dsp!/

Good question, there are part codes suggesting larger parts, but all I can find is brief :

dsPIC33AK512MC206-E/PT  200 MHz, 512KB Flash, FuSa-Compliant, HS-Analog, HS-PWMs, Touch, 64 TQFP 10x10x1mm TRAY

What data rates does the current model manage on USB ?
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
Oh, the USB on PIC32MK/GPK is slow -- 12 Mbits/sec -- but that really doesn't matter because we set up trigger (there is well under 1us trigger delay) and capture while we're not using USB, and only after we capture data, then we send it over the USB to be displayed by the web-page -- we can get maybe 10 captures/second (with about 2000 points per capture) even with the slow USB, with a decent host, so you get a nicely animated display.

It looks like there is a dsPIC33A curiosity board available for $98, but no hint of parts themselves from microchip direct -- so no real clue about pricing...  I'd love to know if we have to do interleaving to get 40 Msps (interleaving was a pain and a further burden on DMA), or if it "just works"...  These parts are amazing!  (There was an NXP part that went to 80 Msps, but it was BGA-only and very expensive -- so I passed that one by -- PIC32MK/GPK was the best I could find when I started, but the MCU discovery process always seems like black magic to me, especially across vendors!)
 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1911
  • Country: au
It looks like there is a dsPIC33A curiosity board available for $98, but no hint of parts themselves from microchip direct -- so no real clue about pricing...

There is web pricing, no idea how valid it is...
eg
DSPIC33AK32MC102-E/M7    114 $2.41
DSPIC33AK512MC506-E/M7   50  $5.64

 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
I currently pay $8.50 in 1000 quantity for PIC32MK/GPK!

Wow!
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Thant a very nice approach to app software.  Does it support Chrome on Windows/Mac/Linux?
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
Yes, Chrome, as well as Microsoft Edge and Samsung Internet and Opera -- on Windows, macOS, and Linux -- and Android and ChromeOS as well.

Unfortunately, not iPad and iPhone, since the USB port is walled off from the browser.

It's a dream-come-true to have platform-independent JavaScript rather than a half-dozen apps!

Here's a blurb on WebUSB/Web Serial: https://rtestardi.github.io/usbte/gadget.pdf

There are lots of examples in the repo -- even basic terminal emulators.
« Last Edit: July 17, 2024, 02:48:21 am by rich t »
 
The following users thanked this post: voltsandjolts, pardo-bsso

Offline robzy

  • Regular Contributor
  • *
  • Posts: 149
  • Country: au
Amazing work.

Would be amazing if it had sigrok integration too.

Also what would it take to make it dual channel?
 

Offline shabaz

  • Frequent Contributor
  • **
  • Posts: 436
I don't like trying to write native apps either; far better to just use JavaScript if possible, and eliminate the cross-platform hassle. The only "workaround" (not really since it uses a different technology) that I'm aware of for that Apple problem, is to use BLE for apps rather than USB Serial. Apple still prevents that, but, someone took basic browser source code with BLE, and turned it into an iOS app. Works nicely, it's called WebBLE. With that, any web app that supports BLE, can also be supported on iOS. The near-negligible downside is that WebBLE is pay software, but it's cheap (a couple of $). I wish someone would write a WebSERIAL app for iOS. Would solve the problem better!
 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1911
  • Country: au
Oh, the USB on PIC32MK/GPK is slow -- 12 Mbits/sec -- but that really doesn't matter because we set up trigger (there is well under 1us trigger delay) and capture while we're not using USB, and only after we capture data, then we send it over the USB to be displayed by the web-page -- we can get maybe 10 captures/second (with about 2000 points per capture) even with the slow USB, with a decent host, so you get a nicely animated display.
That's not super fast, so you may be able to consider a USB-UART, if there are no dsPIC33A variants coming with USB.

I've checked a few :
WCH CH347 - HS-USB TSSOP20  8MHz xtal to Dual 9 MBd UARTs,  12K bytes RX-FIFO and 4K bytes TX-FIFO for each UART.
WCH CH343 - FS-USB  Clock recovery 6MBd UART  QFN16  SO16N

upcoming : Prolific PL2523 QFN48 Dual HS-USB-UART, claims 24MBd, I've not located any real parts on this so far.
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
> Also what would it take to make it dual channel?

In a pinch, you can use "trigger out" of one Flea-Scope to trigger the other, and get them to within 1us of each other.  Unfortunately, you need to open two separate web-pages and talk to teh two Flea-Scopes independently (you can assign different hostnames to each Flea-Scope in deep-dive mode to keep them straight, in the GUI and USB).

> That's not super fast, so you may be able to consider a USB-UART, if there are no dsPIC33A variants coming with USB.

Yes, that's definitely possible!
 

Offline Grandchuck

  • Frequent Contributor
  • **
  • Posts: 712
  • Country: us
Hi Rich
There are 10s of millions of chromebook computers in student's hands.  I assume the fleascope will work with them.  Should be a great vehicle  for STEM classes.
 

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
Yes, it actually works great with chromebooks -- I test with one that was in the hundred dollar range...

(And it works with every Windows or Mac desktop -- all you need is a USB cable and you can use the scope and even interactively write and debug programs taking control of the MCU and all its pins, with just a web-page...)

The real challenge is finding teachers who really want to teach electronics -- wiring stuff together and such -- as opposed to just assembling prefab components together like in robotics classes...

The first step was just making it cheap enough, and I think I succeeded (my initial goal was $10, but I managed $18, including the retailer margin, and it should be able to self-sustain new unit production indefinitely -- especially if the MCU price does not increase).

So now I am trying to crack the second nut of getting it into students hands -- I knew this would be the harder part of the project, by far...

I have close to a thousand units I can give away if I find teachers who want to put them in their classes...
 

Offline Grandchuck

  • Frequent Contributor
  • **
  • Posts: 712
  • Country: us
Rich, I found lots of Colorado schools with STEM programs.  Please see the attached document.

I truly laud your efforts!
 
The following users thanked this post: rich t

Offline Grandchuck

  • Frequent Contributor
  • **
  • Posts: 712
  • Country: us



The real challenge is finding teachers who really want to teach electronics -- wiring stuff together and such -- as opposed to just assembling prefab components together like in robotics classes...

The first step was just making it cheap enough, and I think I succeeded (my initial goal was $10, but I managed $18, including the retailer margin, and it should be able to self-sustain new unit production indefinitely -- especially if the MCU price does not increase).

So now I am trying to crack the second nut of getting it into students hands -- I knew this would be the harder part of the project, by far...

I have close to a thousand units I can give away if I find teachers who want to put them in their classes...

I know that problem first hand.  My efforts at stimulating interest among youngsters have landed with a dull thud!  Robots are more fun than squiggles on a screen.  Teachers like/use robotics because there is more native interest there.  We are competing with cell phones, high definition video, and all sorts of "sensational" stuff. :'(
 
The following users thanked this post: rich t

Offline Martinn

  • Frequent Contributor
  • **
  • Posts: 328
  • Country: ch
Nice! Thanks for sharing, I just ordered one.

BTW some time ago I started developing a frontend for few MHz scopes, added some bells+whistles (compensated 1/10/100/1000 attenuators, switchable 50 ohms termination, AC/DC, wide offset, programmable low/highpass) but eventually stopped working on it as there is no open source scope software that could control it. Sigrok seems stale and I did not find any other option.
Maybe this could make a nice add-on to your design!

2314269-0
https://www.eevblog.com/forum/projects/need-stiff-low-noise-bias-voltage-for-scope-frontend/msg5009881/#msg5009881


Regards, Martin
« Last Edit: July 17, 2024, 05:46:40 pm by Martinn »
 
The following users thanked this post: ledtester, rich t

Offline rich tTopic starter

  • Contributor
  • Posts: 49
  • Country: us
    • rtestardi's github pages site
Nice!  I have been dreaming of adding a real front-end to measure sub-millivolt signals, but that definitely intimidates me some...  Any idea what the component cost is on what you did?
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 7211
  • Country: ca
  • Non-expert
Looks great, if you do another revision please consider changing the connector to type C.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline robzy

  • Regular Contributor
  • *
  • Posts: 149
  • Country: au
BTW some time ago I started developing a frontend for few MHz scopes, added some bells+whistles (compensated 1/10/100/1000 attenuators, switchable 50 ohms termination, AC/DC, wide offset, programmable low/highpass) but eventually stopped working on it as there is no open source scope software that could control it. Sigrok seems stale and I did not find any other option.
Sigrok isn't stale but it would really benefit from the creation of an open-source easily-implementable control protocol.

Currently, if you want sigrok to control your scope, you have to write a sigrok drivers for it. It would be far easier if you could just implement a protocol in your product and ask sigrok to use this protocol.

</soapbox>
« Last Edit: July 18, 2024, 02:27:00 am by robzy »
 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1911
  • Country: au
upcoming : Prolific PL2523 QFN48 Dual HS-USB-UART, claims 24MBd, I've not located any real parts on this so far.

I have an update on this

  • Yes, the PL2523 has been fully released and is available in production quantities.
  • Yes, there is an eval board and we have some in stock @ US$120 each.
No prices seen yet, but the part does seem to be real, tho the Eval board is a bit spenny !

Maybe we wait for someone like DSD Tech to do an adaptor, they already have PL2303GC versions ? 

The PL2523 24Mbd may be the fastest COM Port pathway I've seen.

The CH347 9Mbd COM port and has faster SPI, but SPI is only via DLL drivers, not COM port.

Whatever is chosen, it would be a good idea to allow for HW handshake control so it can be pushed to the system max easily.
The CH347 seems to sustain 9MBd duplex with no handshake lines on my system, on a low overhead terminal.

It may do less on a web-page ?
 
The following users thanked this post: rich t

Offline Phil1977

  • Frequent Contributor
  • **
  • Posts: 736
  • Country: de
Congrats for this little attractive tool! Do you have any plans to sell it in Europe?

Do you see an easy way to mod it to 4-channel with lower samplerate? Or can an external trigger be connected?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf