Close
0%
0%

Flea-Scope USB Oscilloscope ($18, 18 Msps, WebUSB)

Flea-Scope™ is a very low-cost ($18 at Elecrow) and easy-to-use 18 Msps USB oscilloscope and mixed-signal logic analyzer.

Similar projects worth following
Flea-Scope™ is a very low-cost ($18 at Elecrow) and easy-to-use 18 million sample-per-second (Msps) USB oscilloscope and mixed-signal logic analyzer with a built-in waveform generator, and so much more, based on the PIC32MK MCU! Flea-Scope can be controlled by any Chromium-based web browser that supports WebUSB API or Web Serial API running on a computer, tablet, or phone (!!!), with no need for further software install – just plug it in and open a web-page and you are up and running!

My dream is to eventually get this into high-schools to get our kids really building stuff again -- not just assembling prefab components, but really designing and building -- like with transistors, op amps, motor control, etc.

You can even log into Flea-Scope using a different web-page and re-program it interactively in BASIC, using live debugging, taking control of all its pins, to use it as a fully re-programmable embedded system core -- see an unbelievable StickOS video in step 7.

You can now buy Flea-Scope for $18 at Elecrow!  You can get your scope probe and USB cable at the same time for $7 more!

The Flea-Scope User's Guide (including some "how it works" internals and full specifications) is here: https://rtestardi.github.io/usbte/flea-scope.pdf

A preliminary video introduction is here.

Look in the repo's for the newest versions of all files!

As a simple example showing how easy Flea-Scope is to re-program, to make an LED on pin "a4" blink at 10 Hz is as simple as logging into the deep-dive UI web-page in your browser and entering:

10 dim led as pin a4 for digital output
20 while 1 do
30   led = ! led
40   sleep 50 ms
50 endwhile
run

BTW, I just got assembled boards back from pcbway.com and they are beautiful and work on the first try!!! This is my first time doing PCB assembly and panelization -- I cannot believe how easy they made things! They confirmed BOM before I even ordered and identified a part that was not stocked (the MCU is ramping up production now) and we were able to find a suitable alternative (part with a bit more flash for an extra $0.30). Then they confirmed a component value I labeled as 4k when it was actually 4.02k -- they clearly checked and double-checked everything! Finally, they sent me pictures of component placements and confirmed pin 1's and rotations prior to final build. All the careful attention to detail of the pcbway.com team paid off! Thank you pcbway.com!  You can even order boards from them here (now that I know they work!).

pic32.X.27d.0x423c.production.hex

hex - 207.21 kB - 12/18/2023 at 20:31

Download

scope_gerber.27.zip

x-zip-compressed - 262.37 kB - 09/24/2023 at 16:51

Download

  • 1
    Supplies

    Inside "scope.gerber.27.zip", attached, is a bill of materials; alternately, you can get the bill of materials directly from mouser.com using this link: https://www.mouser.com/ProjectManager/ProjectDetail.aspx?AccessID=dad3ac0035

    You can get all the parts from mouser, or you can get the MCUs a bit cheaper from Microchip Direct.

    The "PIC32MK0512GPK064-I/MR" MCU part is brand new.  If you have trouble finding it, you can use the "GPK" (general purpose) or "MCM" (motor control) flavor, with identical firmware, and you can also use the "1024" (1024kB) or "0512" (512kB) flash size as well.  I find the PIC32MK MCU in its default QFN package with "/MR" suffix (much!) easier to use than the QFP with "/PT" suffix, but the gerbers can also be modified in minutes to use a QFP instead of a QFN -- all traces are laid out for the larger part already.

  • 2
    Order the PCB

    "scope.gerber.27.zip", attached, contains all the gerber, etc., files you will need to build the Flea-Scope printed circuit board (PCB).  You can just upload this zip file to a place like pcbway.com and have them fabricate empty PCBs for you in a week or so.

    As a side note, I have had great experiences with pcbway.com for both boards and non-framework stencils.  When using their website, be sure to click on "Quick-order PCB", so you can upload the zip file containing the gerbers, etc., first, and not have to manually enter any parameters like board dimensions.

  • 3
    Assemble the PCB

    I usually build the boards with a solder paste stencil (also from pcbway.com) using Chip Quik SMDLTLFP solder paste and a Kester 2331-ZX flux pen and Kester Pocket-Pak lead-free rosin-core solder for any rework; I clean boards after rework with isopropyl alcohol and a toothbrush followed by running water.

    Inside the zip is also an assembly drawing showing you where each component goes; the PCB silkscreen also locates each component value for easy hand-assembly (unlabeled caps are 0.1uF bypass).

    I reflow my boards in a toaster oven that is controlled by another Flea-Scope (see links -- I realize this is a chicken-and-egg problem -- you have to do the first board by hand -- just watch for the solder to melt).

View all 8 instructions

Enjoy this project?

Share

Discussions

OffGrid.Tech.Club wrote 07/27/2024 at 23:24 point

@Richard Testardi Awesome ! Just got my two Flea-Scopes . Now I have to figure out how to link them together for a dual channel setup hooked into an Raspberry Pi 5.

My goal is a highly mobile i2c debugging Cyber Deck. The two scopes are in a smaller project box with either standard USB cable or extended USB over Ethernet (200') that runs back to the RPi-5 that's mounted in a Pelican type case.

  Are you sure? yes | no

Richard Testardi wrote 07/28/2024 at 02:17 point

Cool!  This sounds interesting -- if you're doing i2c debugging, are you using the analog or digital capture?  The digital capture is much easier to work with (and gives you 9 channels per flea-scope), as there is no calibration that needs to be done (unfortunately, the analog channel has calibration in the web-page, rather than in the firmware, which I expect to fix if I ever spin new enhanced mosquito-scope).

I am afraid Chrome on Raspberry Pi might not support WebUSB or Web Serial -- at least it did not the last time I tested it -- but you can use a serial port talking to the CDC/ACM exposed by flea-scope, I expect, from python or other languages.

I am about to be offline for a few weeks as we move from Colorado to Michigan...

  Are you sure? yes | no

Richard Testardi wrote 07/28/2024 at 11:04 point

BTW, there is a bug with the digital capture where the weak input pull-ups are accidentally enabled, which can interfere with protocols that depend on pull-ups like i2c -- to fix that, you'll want to upgrade the firmware to v2.27h or v2.27j from the StickOS2 github repo in the "board" directory -- that will keep the pull-ups disabled unless you actually use StickOS BASIC deep-dive mode.

  Are you sure? yes | no

OffGrid.Tech.Club wrote 07/28/2024 at 14:46 point

Awesome, thanks Rich. I will try the digital inputs for the logic analyzer. Can the web GUI decode the i2c logic analyzer signals ? Or is it possible to push these signals to something like SIGROK to display decoded i2c data?

  Are you sure? yes | no

OffGrid.Tech.Club wrote 07/28/2024 at 14:48 point

I will look into upgrading the firmware process as well. Have a safe trip !

  Are you sure? yes | no

OffGrid.Tech.Club wrote 07/28/2024 at 20:17 point

I just tried it and the Raspberry Pi 5 running Chromium web browser Works out of the box with the Web GUI ! I'm capturing the signals from the onboard signal generator ! :D 

  Are you sure? yes | no

Richard Testardi wrote 07/28/2024 at 15:52 point

Sorry if this is out of order -- I can't seem to reply to a reply...

> Can the web GUI decode the i2c logic analyzer signals ?

Sorry, there is no protocol analysis -- just digital display.  You can invoke a "scope" command by python or something, and get the data yourself in binary -- I have an example of that in StickOS2 repo python/scope.py, but it is very rough.  (Analog has additional challenges of having to do calibration, but digital is easy.)

> Or is it possible to push these signals to something like SIGROK to display decoded i2c data?

That would be ideal, but I have no idea what it would involve, unfortunately.

> I will look into upgrading the firmware process as well.

You can find that procedure at the end of the user's guide: flea-scope.pdf (rtestardi.github.io)

> Have a safe trip !

Thanks -- it will be challenging as we are moving to a 1200 sf house that has never been lived in during winter (it was always drained of water and winterized), so we have to get it ready before winter hits or we will be camping in the snow!

  Are you sure? yes | no

OffGrid.Tech.Club wrote 07/28/2024 at 16:25 point

Awesome, I will be looking into these things. 

- Perhaps a Geo-Thermal mod to your heating system could give you a stable 65 degree winter. Or even Solar water collectors, they have also proven very beneficial for winter heating boosts.

An extremely interesting process I've recently discovered is Bio-Gas generation. It works from food scraps, or custom chambered septic tank systems that create safe methane cooking / heating gas. 

  Are you sure? yes | no

richard wrote 04/21/2024 at 18:36 point

I am considering doing my own layout.  I don't need the scope part as I just want the Basic software.  I will ground the input that came from the opamp.  Anything else I should know?

  Are you sure? yes | no

Richard Testardi wrote 04/21/2024 at 23:54 point

Nothing comes to mind -- most of the scope functionality is enabled when the webpage issues the "scope" command...  You will never do that, so BASIC should have access to all the pins (well, the 18 pins for a0-8 and b0-8 -- if you want more pins, you'd have to update pin.c in the firmware).

  Are you sure? yes | no

richard wrote 04/15/2024 at 17:12 point

Try JLCPCB for assembly.

  Are you sure? yes | no

richard wrote 04/15/2024 at 17:10 point

What is necessary to edit the gerbers for the larger package PIC?

  Are you sure? yes | no

Richard Testardi wrote 04/15/2024 at 20:17 point

You would install the free/trial version of DipTrace and then using the schematic program, you replace the MCU part (which starts out as PIC32MK_QFN in the user library) with PIC32MK_QFP also in the user library.  Then you open the PCB program and update the PCB from the "related schematic", the3n check design rules and then finally you export gerbers and pickplace, etc.  I believe I have done this for you here: https://github.com/rtestardi/StickOS2/blob/main/board/scope_gerber.experimental.qfp.27h.zip

  Are you sure? yes | no

Richard Testardi wrote 04/15/2024 at 20:18 point

PS BTW, I believe you can get boards assembled here this month: https://www.elecrow.com/flea-scopetm-usb-o-scope.html

  Are you sure? yes | no

Richard Testardi wrote 04/16/2024 at 11:39 point

Actually, this package is better and removes the solder paste from the flag under the QFP: https://github.com/rtestardi/StickOS2/blob/main/board/scope_gerber.experimental.qfp.27i.zip

  Are you sure? yes | no

klemen.zurga wrote 03/18/2024 at 10:41 point

Would it be possible to stack like 2 or 4 together to make a multichannel oscilloscope

  Are you sure? yes | no

Richard Testardi wrote 03/28/2024 at 17:27 point

Yes.  Each scope has a "trigger out" pin that can be used to trigger the other channels (nearly) simultaneously.  The only fly in the ointment is you have to open a separate webpage for each scope, so you're switching between windows to see the different channels.  You have to allow javascript to run for all the windows (normally javascript pauses any window that is not in foreground) -- you can do this either by tiling the windows or using the "background" button on the UI, which causes the webpage to make a small sound on each display frame, which prevents javascript from pausing).  If you do this, you'd want to use the "hostname" command in deep-dive mode to give each scope its own hostname, so you can differentiate them on the USB and in the web-page.

  Are you sure? yes | no

klemen.zurga wrote 03/29/2024 at 04:18 point

Interesting. Thank you for the information!

  Are you sure? yes | no

Richard Testardi wrote 03/30/2024 at 16:58 point

BTW, the GUI is completely open-source, so someone could make one that is more clever, and could talk to two flea-scopes at once!

  Are you sure? yes | no

[deleted]

[this comment has been deleted]

Richard Testardi wrote 10/16/2023 at 15:20 point

That is exactly what I am hoping for -- thanks for the encouragement!!!

  Are you sure? yes | no

Richard Testardi wrote 09/29/2023 at 21:05 point

PS And the schematic is in DipTrace currently -- the whole repos is on github and that is under the "board" directory -- I'd be thrilled to have it more broadly available -- I think SparkFun said they use Eagle, which DipTrace can export to (I imagine requiring significant touch-up by hand), IIRC.

  Are you sure? yes | no

Richard Testardi wrote 09/29/2023 at 19:35 point

Thanks, all.  The main thing I wanted here was a software-less oscilloscope, so that limited me to WebUSB (or Web Serial) from a web browser...  Secondly, I needed it to be cheap enough to be on every desk at a high school -- it was a really hard decision to add an op amp front end (for $1) and a negative supply rail (for another $1!), but in the end I decided normal oscilloscope probes and the ability to go x10 was worth it.  I'm still hoping to find someone with a pick-and-place machine to build them -- I'd buy the first 1000 if they were available!

This thing can do so much more than just be an oscilloscope, BTW -- you can interactively log into it, configure pins, single-step programs, etc., all with nothing but a web browser...

  Are you sure? yes | no

John Loeffler wrote 10/07/2023 at 22:06 point

Richard,  LCSC is a great resource for cheap opamps and Charge pump inverters.

Charge Pump

https://www.lcsc.com/product-detail/DC-DC-Converters_RENESAS-ICL7660SCBAZ-T_C357815.html

Negative LDO

https://www.lcsc.com/product-detail/Linear-Voltage-Regulators-LDO_HXY-MOSFET-79L05_C7543011.html

Opamps

https://www.lcsc.com/products/Operational-Amplifier_516.html

  Are you sure? yes | no

Olviae wrote 09/27/2023 at 08:41 point

How does it compare to the saleae 5usd copy?

  Are you sure? yes | no

tabbey01 wrote 09/27/2023 at 08:24 point

Any thoughts on making this compatible with Pulseview/sigrok? It would make a great addition to their compatible mixed signal analysers.

  Are you sure? yes | no

paulvdh wrote 09/27/2023 at 07:36 point

This looks like a quite nice project, but without an analog front end it is not very practical, but more of a test bed for the firmware.

When a front end with selectable attenuation / amplification is added, this can be a quite nice gadget. The DSO-Shell may be a nice example to add a frontend, that one uses a few opamps and 74hc4051 / 74c4053 for the range switching.

Also, the schematic and PCB seem to be designed in some not very well known program. If there is interest, I can spend some time to port the design to KiCad.

  Are you sure? yes | no

Jean P wrote 09/26/2023 at 21:19 point

Very cool !

Any plans to sell it on ebay ?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates