Flea-Scope™ USB Oscilloscope, Logic Analyzer, and more ($18, 18 Msps, WebUSB) - Page 1
Forum section: electronics / projects

author: rich t
author_rank: Contributor
timestamp: July 16, 2024, 09:35:06 pm
content: 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-webusbThe full User's Guide with specifications (and a "how it works" section) is here:https://rtestardi.github.io/usbte/flea-scope.pdfI 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

author: shabaz
author_rank: Frequent Contributor
timestamp: July 16, 2024, 10:44:46 pm
content: 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).

author: rich t
author_rank: Contributor
timestamp: July 16, 2024, 10:53:39 pm
content: 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!

author: PCB.Wiz
author_rank: Super Contributor
timestamp: July 16, 2024, 10:57:05 pm
content: 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

author: rich t
author_rank: Contributor
timestamp: July 16, 2024, 11:14:24 pm
content: 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.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: July 16, 2024, 11:27:15 pm
content: Quote from: rich t on July 16, 2024, 11:14:24 pmhttps://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 TRAYWhat data rates does the current model manage on USB ?

author: rich t
author_rank: Contributor
timestamp: July 16, 2024, 11:42:13 pm
content: 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!)

author: PCB.Wiz
author_rank: Super Contributor
timestamp: July 16, 2024, 11:54:45 pm
content: Quote from: rich t on July 16, 2024, 11:42:13 pmThere is web pricing, no idea how valid it is...egDSPIC33AK32MC102-E/M7 114 $2.41DSPIC33AK512MC506-E/M7 50 $5.64

author: rich t
author_rank: Contributor
timestamp: July 17, 2024, 12:09:37 am
content: I currently pay $8.50 in 1000 quantity for PIC32MK/GPK!Wow!

author: zapta
author_rank: Super Contributor
timestamp: July 17, 2024, 01:27:58 am
content: Thant a very nice approach to app software. Does it support Chrome on Windows/Mac/Linux?

author: rich t
author_rank: Contributor
timestamp: July 17, 2024, 02:34:20 am
content: 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.pdfThere are lots of examples in the repo -- even basic terminal emulators.

author: robzy
author_rank: Regular Contributor
timestamp: July 17, 2024, 03:30:44 am
content: Amazing work.Would be amazing if it had sigrok integration too.Also what would it take to make it dual channel?

author: shabaz
author_rank: Frequent Contributor
timestamp: July 17, 2024, 03:57:46 am
content: 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 calledWebBLE. 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!

author: PCB.Wiz
author_rank: Super Contributor
timestamp: July 17, 2024, 05:38:29 am
content: Quote from: rich t on July 16, 2024, 11:42:13 pmThat'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 SO16Nupcoming : Prolific PL2523 QFN48 Dual HS-USB-UART, claims 24MBd, I've not located any real parts on this so far.

author: rich t
author_rank: Contributor
timestamp: July 17, 2024, 12:10:58 pm
content: > 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!

author: Grandchuck
author_rank: Super Contributor
timestamp: July 17, 2024, 01:24:40 pm
content: Hi RichThere 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.

author: rich t
author_rank: Contributor
timestamp: July 17, 2024, 02:09:22 pm
content: 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...

author: Grandchuck
author_rank: Super Contributor
timestamp: July 17, 2024, 02:45:31 pm
content: Rich, I found lots of Colorado schools with STEM programs. Please see the attached document.I truly laud your efforts!

author: Grandchuck
author_rank: Super Contributor
timestamp: July 17, 2024, 03:47:53 pm
content: Quote from: rich t on July 17, 2024, 02:09:22 pmI 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. :'(

author: Martinn
author_rank: Frequent Contributor
timestamp: July 17, 2024, 05:21:53 pm
content: 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!https://www.eevblog.com/forum/projects/need-stiff-low-noise-bias-voltage-for-scope-frontend/msg5009881/#msg5009881Regards, Martin

author: rich t
author_rank: Contributor
timestamp: July 17, 2024, 07:57:41 pm
content: 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?

author: thm_w
author_rank: Super Contributor
timestamp: July 17, 2024, 11:50:37 pm
content: Looks great, if you do another revision please consider changing the connector to type C.

author: robzy
author_rank: Regular Contributor
timestamp: July 18, 2024, 02:14:56 am
content: Quote from: Martinn on July 17, 2024, 05:21:53 pmSigrok 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>

author: PCB.Wiz
author_rank: Super Contributor
timestamp: July 18, 2024, 03:33:43 am
content: Quote from: PCB.Wiz on July 17, 2024, 05:38:29 amI have an update on thisYes, 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 ?

author: Phil1977
author_rank: Frequent Contributor
timestamp: July 18, 2024, 03:11:19 pm
content: 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?

author: rich t
author_rank: Contributor
timestamp: July 18, 2024, 04:39:53 pm
content: > Do you have any plans to sell it in Europe?I believe Elecrow will ship anywhere -- they built the boards and fulfill orders from their end:https://www.elecrow.com/flea-scopetm-usb-o-scope.html> Do you see an easy way to mod it to 4-channel with lower samplerate? Or can an external trigger be connected?I am interleaving 5 ADCs to get the 18 Msps... Conceivably, you could run them separately at 3.6 Msps and have separate channels, but I have not looked into that.What I have done on the rare occasion I have needed two channels is just use "trigger out" of one Flea-Scope to trigger the other, and I have to have two separate web-pages open (one for each channel).The trigger delay is under a microsecond, so this works fairly well.You can use the "hostname" command in "deep dive" mode to change the names of the scopes (like to "channel1" and "channel2") to keep them straight in the GUI and USB.But I realize that's more clunky than having multiple analog channels on the same web-page.> Looks great, if you do another revision please consider changing the connector to type C.Definitely, that is on my list!

author: PCB.Wiz
author_rank: Super Contributor
timestamp: July 18, 2024, 09:16:55 pm
content: Quote from: rich t on July 16, 2024, 09:35:06 pmI gave this a quick try, with 2 dual port attached, with mixed results :https://rtestardi.github.io/usbte/flea-scope.htmlGives no compatible devices foundhttps://armmbed.github.io/dapjs-web-demo/Gives no compatible devices foundbut then I tried intel's google suggested page :https://intel.github.io/zephyr.js/webusb/shows list of items, and  givesConnected Devices:Added: wch.cn USB Dual_Serial - This is CH347, COM6,COM7 but unclear which port it choseStatus: ConnectedConnected Devices:Added: STC STC-USB-Link1D ( This is WCH Dual Serial VCP - COM9 COM10, but unclear which port it chose 1.7.2023.2 )Status: ConnectedConnected Devices:Added: Prolific Technology Inc. USB-Serial Controller ( this is PL2303GC, never shows connected, but does show paired )Status: DisconnectedConnected Devices:Added: null USB Single Serial ( this is WCH CH9102 , never shows connected, but does show paired 1.7.2023.2 )Status: DisconnectedConnected Devices:Added: Silicon Labs CP2102N USB to UART Bridge Controller ( never shows connected, but does show paired )Status: DisconnectedHmm.. seems not all WEB USB test pages are equal, and it not clear if it can handle a dual serial port. It does not show them separately.Strangely, whenever it claims 'connected' I can still open both ports in a terminal. Their 'connected' may mean something different ?The WCH CH9102 seems to use the identical driver to the WCH CH347, but CH347 connects and CH9102 does not ?

author: rich t
author_rank: Contributor
timestamp: July 18, 2024, 09:37:26 pm
content: >https://rtestardi.github.io/usbte/flea-scope.htmlGives no compatible devices foundDid you have a Flea-Scope?That (flea-scope.html) webpage filters via USB VID/PID to only show "compatible" devices, i.e., Flea-Scopes.Notice the "filters" in the code at the bottom of this post -- those are the Flea-Scope VID/PIDs (only one of which is used now, the last one).Also, if a higher level driver has already claimed the device (like the serial driver claiming a CDC/ACM port), then you won't be able to claim it with WebUSB -- since only one driver can own a device.This is why if a serial driver exists on the platform, you have to use Web Serial instead of WebUSB.Lots of intro is here:https://rtestardi.github.io/usbte/gadget.pdfCode:// the user wants to connect to a USB device's bulk endpoints directlyasync function Usb(){var filter = [{ vendorId: 0x0403, productId: 0xA660 },{ vendorId: 0x1b4f, productId: 0xA660 },{ vendorId: 0x1b4f, productId: 0xE66E },{ vendorId: 0x04D8, productId: 0xE66E },];usb = undefined;comm = undefined;reader = undefined;writer = undefined;if ('usb' in navigator) {try {usb = await navigator.usb.requestDevice({ filters: filter });await usb.open();await usb.selectConfiguration(1);await usb.claimInterface(1);document.getElementById("config").hidden = true;document.getElementById("help").hidden = true;document.getElementById("canvas").hidden = false;discard = 1;setTimeout(Receive, 1);Send(String.fromCharCode(3)); // Ctrl-Cawait new Promise(r => setTimeout(r, 200)); // allow autorun program to stop?Send("echo off\n"); // XXX -- figure out how to undo?Send("prompt off\n"); // XXX -- figure out how to undo?Send("dim unused as flash\n");Send("dim cal_zero_x1 as flash, cal_3v3_x1 as flash\n");Send("dim cal_zero_x10 as flash, cal_3v3_x10 as flash\n");Wave();discarded = false;setTimeout(Discard, 200);} catch(err) {document.getElementById("help").innerHTML += "<p><font color='red'>" + err.message.replace(/</g,'&lt;').replace(/>/g,'&gt;') + "</font></p>";}} else {document.getElementById("help").innerHTML += "<p><font color='red'>WebUSB API not found.</font></p>";}}// the user wants to connect to an emulated COM portasync function Comm(){var filter = [{ usbVendorId: 0x0403, usbProductId: 0xA660 },{ usbVendorId: 0x1b4f, usbProductId: 0xA660 },{ usbVendorId: 0x1b4f, usbProductId: 0xE66E },{ usbVendorId: 0x04D8, usbProductId: 0xE66E },];usb = undefined;comm = undefined;reader = undefined;writer = undefined;if ('serial' in navigator) {try {comm = await navigator.serial.requestPort({ filters: filter });await comm.open({ baudRate: 115200, bufferSize: bytes });reader = comm.readable.getReader();writer = comm.writable.getWriter();document.getElementById("config").hidden = true;document.getElementById("help").hidden = true;document.getElementById("canvas").hidden = false;discard = 1;setTimeout(Receive, 1);Send(String.fromCharCode(3)); // Ctrl-Cawait new Promise(r => setTimeout(r, 200)); // allow autorun program to stop?Send("echo off\n"); // XXX -- figure out how to undo?Send("prompt off\n"); // XXX -- figure out how to undo?Send("dim unused as flash\n");Send("dim cal_zero_x1 as flash, cal_3v3_x1 as flash\n");Send("dim cal_zero_x10 as flash, cal_3v3_x10 as flash\n");Wave();discarded = false;setTimeout(Discard, 200);} catch(err) {document.getElementById("help").innerHTML += "<p><font color='red'>" + err.message.replace(/</g,'&lt;').replace(/>/g,'&gt;') + "</font></p>";}} else {document.getElementById("help").innerHTML += "<p><font color='red'>Web Serial API not found.</font></p>";}}

author: rich t
author_rank: Contributor
timestamp: July 18, 2024, 09:48:38 pm
content: BTW, if you just want a simple terminal emulator (without actual emulation) to any USB serial port, try:https://rtestardi.github.io/usbte/usbte.htmlAgain, if there is a serial driver on the system, you have to connect to the COM port; otherwise, you can connect to USB directly (you must know your endpoint numbers).PS this one is even more minimal:https://rtestardi.github.io/usbte/usbte.minimal.html

author: PCB.Wiz
author_rank: Super Contributor
timestamp: July 18, 2024, 10:24:51 pm
content: Quote from: rich t on July 18, 2024, 09:48:38 pmThat's useful - Different results :I can connect to CP2102N ok and CH9102 ok and shows separate COMn on Link1D, but it failed to see CH347, until I unplugged/plug ?The serial terminal and device manager showed COM6, COM7 fine at all times, usbte.html needed the fresh replugThe good news is all serial ports seem to be (eventually) correctly visible here, and connectable.Minor points :There is no disconnect button, you need to exit the webpage ?It also does not show which port is connected, once connected ?The screen area for echo is not clearly labeled, once you have an echo you know it can display one.Addit : and there is no baud rate option, but it is a useful 'Can I connect' test toolQuote from: rich t on July 18, 2024, 09:37:26 pmAhh, ok.If you allowed general serial connect and published the data format, the nifty web-page graphical interface could give a useful debug pathway for general MCU development.

author: shabaz
author_rank: Frequent Contributor
timestamp: July 18, 2024, 10:26:24 pm
content: Quote from: rich t on July 18, 2024, 09:48:38 pmI've ordered a couple of Flea-Scopes : ) FWIW, I have a CY7C65213 USB-UART here, and tried it with the usbte.html page. With Chrome on desktop (Win 11), clicking on the COM button is successful. I tried on mobile Chrome (on Samsung S22 Ultra) and that responds 'The Web serial API needs to be enabled..' so I enabled the experimental-web-platform-features, and restarted the mobile Chrome browser, but it still emits that message : ( I tried setting epin to 2 and epout to 1 (I believe that's what the CY7C65213 needs, according to lsusb -v on a Linux box) and clicking on USB, and I see 'https://rtestardigithub.iowants to connect' and 'USB-UART LP', and clicking on that and pressing connect results in 'Failed to execute 'claimInterface' on 'USBDevice' : Unable to claim interface.I'm not sure, but am thinking there's a chance this isn't currently supported on Chrome on my phone unfortunately : ( but will try with the actual device once it arrives!Code:Bus 002 Device 008: ID 04b4:0003 Cypress Semiconductor Corp. USB-UART LPDevice Descriptor:bLength 18bDescriptorType 1bcdUSB 2.00bDeviceClass 0bDeviceSubClass 0bDeviceProtocol 0bMaxPacketSize0 8idVendor 0x04b4 Cypress Semiconductor Corp.idProduct 0x0003bcdDevice 0.00iManufacturer 1 Cypress SemiconductoriProduct 2 USB-UART LPiSerial 0bNumConfigurations 1Configuration Descriptor:bLength 9bDescriptorType 2wTotalLength 0x0054bNumInterfaces 3bConfigurationValue 1iConfiguration 0bmAttributes 0xa0(Bus Powered)Remote WakeupMaxPower 100mAInterface Association:bLength 8bDescriptorType 11bFirstInterface 0bInterfaceCount 2bFunctionClass 2 CommunicationsbFunctionSubClass 2 Abstract (modem)bFunctionProtocol 1 AT-commands (v.25ter)iFunction 0Interface Descriptor:bLength 9bDescriptorType 4bInterfaceNumber 0bAlternateSetting 0bNumEndpoints 1bInterfaceClass 2 CommunicationsbInterfaceSubClass 2 Abstract (modem)bInterfaceProtocol 1 AT-commands (v.25ter)iInterface 0CDC Header:bcdCDC 1.10CDC ACM:bmCapabilities 0x02line coding and serial stateCDC Union:bMasterInterface 0bSlaveInterface 1CDC Call Management:bmCapabilities 0x00bDataInterface 1Endpoint Descriptor:bLength 7bDescriptorType 5bEndpointAddress 0x83 EP 3 INbmAttributes 3Transfer Type InterruptSynch Type NoneUsage Type DatawMaxPacketSize 0x0040 1x 64 bytesbInterval 10Interface Descriptor:bLength 9bDescriptorType 4bInterfaceNumber 1bAlternateSetting 0bNumEndpoints 2bInterfaceClass 10 CDC DatabInterfaceSubClass 0bInterfaceProtocol 0iInterface 0Endpoint Descriptor:bLength 7bDescriptorType 5bEndpointAddress 0x01 EP 1 OUTbmAttributes 2Transfer Type BulkSynch Type NoneUsage Type DatawMaxPacketSize 0x0040 1x 64 bytesbInterval 0Endpoint Descriptor:bLength 7bDescriptorType 5bEndpointAddress 0x82 EP 2 INbmAttributes 2Transfer Type BulkSynch Type NoneUsage Type DatawMaxPacketSize 0x0040 1x 64 bytesbInterval 0Interface Descriptor:bLength 9bDescriptorType 4bInterfaceNumber 2bAlternateSetting 0bNumEndpoints 0bInterfaceClass 255 Vendor Specific ClassbInterfaceSubClass 5bInterfaceProtocol 0iInterface 0Device Status: 0x0000(Bus Powered)

author: rich t
author_rank: Contributor
timestamp: July 18, 2024, 10:55:58 pm
content: There is a challenge on Samsung -- the platform binds a serial driver to the device, but Web Serial is not exposed into the browser, so you can't access it via JavaScript.For Flea-Scope, I released a firmware upgrade to work around this -- v2.27j -- if you tie pin a0 to ground on boot, then rather than exposing CDC/ACM (which the Samsung serial driver claims), I expose a vendor unique class 0xff, which then will only be claimed by WebUSB. You then have to use the "manual" flavor of the Flea-Scope web-pages, and tell them to use WebUSB instead of Web Serial, and then it works.Unfortunately, this means you need firmware support to work on Samsung phones -- at least the two of them I have tried -- because Web Serial is not exposed into the browser. It would be really nice if folks could get Samsung to either stop claiming devices with the serial driver, or add Web Serial support for their browsers. Or do the real fix and have the serial driver back off when WebUSB wants to claim the device -- this is how Mac works.

author: rich t
author_rank: Contributor
timestamp: July 19, 2024, 03:10:58 am
content: Sorry, I missed these questions:> There is no disconnect button, you need to exit the webpage ?> It also does not show which port is connected, once connected ?> The screen area for echo is not clearly labeled, once you have an echo you know it can display one.> Addit : and there is no baud rate option, but it is a useful 'Can I connect' test toolYes, refreshing or closing the webpage is the disconnect button. :-)Yeah, showing which port is connected might be nice -- when you connect to the flea-scope, I do show the hostname you connected to -- so you can set the hostname different for different flea-scopes (like the one that controls my toaster oven is named "toaster") and in that way keep them straight... If you want to see how to control a toaster oven, see:https://rtestardi.github.io/usbte/toaster.pdfYou can also connect to real uarts that need a baud rate or other signaling options -- here is an example that I use:https://rtestardi.github.io/usbte/usbte.retro.htmlThat connects to a homebrew 32032 computer that has been running for 36 years -- here it is:https://rtestardi.github.io/retro/retro.pdf

author: PCB.Wiz
author_rank: Super Contributor
timestamp: July 19, 2024, 03:28:21 am
content: Quote from: rich t on July 19, 2024, 03:10:58 amHow does that set Baud etc ? - it seems to connect, but has no baud choice ?It seems to use the windows driver defaults, but windows only has a short baud picklist under driver, that limits to a feeble 128k

author: PCB.Wiz
author_rank: Super Contributor
timestamp: July 19, 2024, 03:55:57 am
content: Quote from: rich t on July 18, 2024, 09:48:38 pmBecause this seems to connect ok, at least at some default bud value, I refreshed my info on fast UARTS, that might be useful to talk to thisProlific new PL2303Gx series - can set to 12MBd max, has 768 Byte RX Buffer and 256 Tx buffer.At 12MBd from FT232H, it seems ok with 1024 byte bursts and starts to drop characters at 1280 byte blocks (no handshake used)At 8Mbd, 1280 blocks look ok.For large packets, one way, 6MBd looks ok and 8Mbd.N.1 starts to drop characters, and 8M.n.2 gains a bit more time, so looks better eg 12Mbytes no dropped chars..Cheapest PL2303GS module I can locate with all hand shake lines & TTL ishttps://seengreat.com/product/233/usb-to-uart-pl2303uses PL2303GS US$3.99CH347 is a HS-USB module with 12k buffers and higher sustainable UART speed, and 2 UART channelsAliexpress has some at reasonable pricehttps://www.aliexpress.com/item/1005006449193713.htmlCH347 module $US4.44Newest firmware I have supports bauds of 144M/N for N = 16,17,18 (9M, 8.470588M,8MBd) 120M/N, for N >= 16 and N <= 60 (ie 7.5Mbd ~ 2Mbd )Below 2Mbd, the baud formula becomes much more granular, and appears to be 6MHz/N (except in special cases )

author: Hawaka
author_rank: Regular Contributor
timestamp: July 19, 2024, 08:39:00 am
content: Are you using https? If so, how does https works with the certificate if the device you are connected to does not have access to internet?

author: rich t
author_rank: Contributor
timestamp: July 19, 2024, 03:50:08 pm
content: > How does that set Baud etc ? - it seems to connect, but has no baud choice ?No choice, since the hardware I'm connecting to only works at 9600 baud -- the rate is set in the JavaScript:comm = await navigator.serial.requestPort({ filters: filter });await comm.open({ baudRate: 9600, dataBits: 7, parity: "even", stopBits: 2, bufferSize: 1024 });You can of course change the JavaScript and make it as generic as you want.> Are you using https? If so, how does https works with the certificate if the device you are connected to does not have access to internet?The web-page is on the internet to begin with, so the fact that you could download it from github is a good sign.However, if you copy the web-page locally, you can use it even without Internet connectivity.Then you are not using http or https, but a local file path -- see attached image: Untitled.png.

author: Martinn
author_rank: Frequent Contributor
timestamp: July 20, 2024, 05:35:54 pm
content: Quote from: rich t on July 17, 2024, 07:57:41 pmAssembly of two of those boards at JLCPCB cost $53, which includes a lot of setup costs for extended components. I guess for a decent front-end around $10 in parts cost might be realistic.The question is what would be necessary. For a typical beginner/arduino/maker/embedded programmer your scope as is will be sufficient for 90% of all use cases.I also started to look at a small, cheap USB scope (pretty much as you did) and thought how one could make this other than just cheap. One benefit of having a low sample rate (and maybe 10 MHz bandwidth only) is that you can afford higher gains (I aimed for 0.5 mV/div), for which a selectable filter makes sense as well (otherwise you risk amplifying noise only). On top I also wanted an ultra wide DC offset range - see mV signals on top of 10 V.I decided not to support 1:10 passive probes. These work as capacitive dividers above a few kHz, so need to be properly tuned to the scope input capacitance. If you want a switchable attenuator, it needs tuning both for input capacitance and for gain flatness, tyically requiring two trimmer capacitors ($1/pc) per stage. Instead I put a 1/10/100/1000 divider at front to get a wide input range.Anyway I would not use it as is as you have both control over hardware and software, so probably a single (e.g. 1/30) divider with switchable gain afterwards might suffice (saving $1 for the relay plus $2 for trimmers).Here's what I have. It is not finished - I found no GUI software I could work with (I could not even find out how to compile Sigrok) and did not want to do my own.If you are interested, I can help you with a front-end. This is not my main line of work so this was a learning experience for me also. Front-end design is a league of its own, getting real challenging at frequencies of 100 MHz and above. For lower frequencies, it stays more manageable. I think I went for 10 MHz analog bandwidth. For your board, one could think of either a reasonably stripped down version - or an optional add-on board people could attach for more options.

author: rich t
author_rank: Contributor
timestamp: July 21, 2024, 01:05:12 am
content: > so probably a single (e.g. 1/30) divider with switchable gain afterwards might suffice (saving $1 for the relay plus $2 for trimmers).That is exactly the kind of thing I was thinking -- also because "calibration" gets harder if you have more choices (today I depend on calibration values as trimmers are way too expensive -- I was shocked beyond belief). One thing I have been wondering is if digipots might work for me, but I never looked into it -- they also seem to be frequency limited to the megahertz range, which might or might not be OK.> On top I also wanted an ultra wide DC offset range - see mV signals on top of 10 V.One thing I was pleasantly surprised with is how well "digital AC coupling" works -- I just run the same average that I run for the RMS calculation, and offset the whole display by that, allowing the user to zoom in on the noise above/below the average. The catch is you can't use this beyond the DC range of the scope, so that is part of why having a larger DC range is nice.> or an optional add-on board people could attach for more options.Yes, exactly -- and I have the digital I/O already exposed that could control it... But again, never got beyond the dreaming phase -- we'll see if the basic scope takes off, and definitely enhance it if it does! :-)

author: Martinn
author_rank: Frequent Contributor
timestamp: July 21, 2024, 01:11:34 pm
content: Quote from: rich t on July 21, 2024, 01:05:12 amIf you modify the firmware/GUI, I'll adapt my front-end to fit your scope design. I think I'd go back to one attenuator stage, but support 1:10 passive probes instead. Apart from that I'd keep all in, so you could experiment with it and try out what/if to keep for an add-on or integrate into your design. What do you think?For the offset, the current design would best need two DAC channels (or PWM), which would also enable an autocalibration of the gains.

author: rich t
author_rank: Contributor
timestamp: July 21, 2024, 02:33:53 pm
content: The 10x probes were easy to support as they have a variable compensation capacitor (maybe 10-30pF) so are designed to work with a range of scopes... My input capacitance (14pF) was on the low end for some of the cheaper probes to compensate for -- but the worst case scenario (which I never actually encountered, even with the cheapest probe I found) would be that you just have to *add* some capacitance to the Flea-Scope (like 5pF) at a couple of through-holes that already exist on the board, so I thought this was livable. If I spin the boards ever, I planned on increasing the dummy load capacitor c8 (in parallel with the capacitive/resistive voltage divider on the input) from 3pF to 6.8pF for exactly this reason.I'm not sure the firmware and web-page could be shared with the original scope, unfortunately -- as I implemented "calibration" in the web-page itself (even though the calibration values are persisted in the firmware using "flash variables" that already existed in the underlying BASIC OS), hoping to avoid firmware spins for calibration bugs. So I think any change there would have to be a new product with a new web-page -- trying to weave new calibration functionality into the old design would be pretty risky, IMO. I've been waiting to see if there is actual interest before diving into that... Possibly if we end up with an 80 Msps MCU, that would *all* be part of the new product -- informally, I've been referring to that as Mosquito-Scope... :-)I definitely like the idea of auto-calibration -- right now we do manual calibration as the last step of the manufacturing process, which puts us right at our "1 minute" of allowable touch per board, including programming the firmware...The part I am using has 3 DAC's, but I use two of them already (so only one is available, and I'm not even sure if its pins are connected) -- one DAC is used for the scope trigger voltage (which runs into an internal analog comparator which does the edge and level detection on the input signal for the trigger modes) and the other is used for the waveform generator. I wish I had thought of using the DACs for the input range selection, but that thought never crossed my mind... :-) I do have 5 PWMs available, but currently they are all controlled by the BASIC OS if the user goes into "deep-dive" mode and takes control of the pins... So this would definitely involve "weaving"...I am thinking the best way to have an add-on board would be to be able to choose between the built-in front-end and no front-end at all (so the add-on board *is* the front-end, rather than has to augment the existing one) -- otherwise the add-on has to fight the noise floor of the built-in front end... Right now I route everything thru an internal (to the MCU) op-amp before going into the 5 interleaved ADCs (because the ADCs have quight high capacitive load requirements) -- that seems to be the point we'd want to make the choice...Unfortunately, I'm also imminently taking some time off -- we are moving next month to a 3-season house in Michigan, which I have to get ready for winter before the first winter -- so my life will be in boxes (hopefully not frozen!) for a while...

author: shabaz
author_rank: Frequent Contributor
timestamp: July 24, 2024, 04:11:30 pm
content: They arrived very quickly..I purchased one standalone, and one with USB-C cable and a 'scope probe. Looking forward to trying it out!

author: Martinn
author_rank: Frequent Contributor
timestamp: July 24, 2024, 04:31:59 pm
content: Quote from: shabaz on July 24, 2024, 04:11:30 pmMine also arrived today. In the probe bag there was a small disc capacitor - 10p? Was this accidental or is it thought as "dummy load capacitor c8" to bring the x10 attenuator capacitance ratio into the adjustment range of the probe?

author: shabaz
author_rank: Frequent Contributor
timestamp: July 24, 2024, 04:36:50 pm
content: Hi,Interesting.. mine has a ceramic disc cap too. I still have it, I thought maybe it was an accidental addition inside the bag! I don't know it's purpose. Maybe it's documented on the GitHub site, I've yet to read it more thoroughly.

author: rich t
author_rank: Contributor
timestamp: July 24, 2024, 07:15:53 pm
content: The capacitor is if you use a cheap 10x probe that can't compensate down to 14pF of the Flea-Scope.You can add it as described in the user's guide to increase the Flea-Scope input capacitance if needed.But the probes from Elecrow seem to be good enough without it -- a lot better than some from ali express.Quote from the UG

author: rich t
author_rank: Contributor
timestamp: July 24, 2024, 07:26:11 pm
content: PS in case anyone has not found it yet, the User's Guide is here:https://rtestardi.github.io/usbte/flea-scope.pdfThe main GUI web-page is here:https://rtestardi.github.io/usbte/flea-scope.htmlAnd the deep-dive command-line UI web-page is here (close the GUI first before using the command-line):https://rtestardi.github.io/usbte/stickos-basic.html

author: Martinn
author_rank: Frequent Contributor
timestamp: July 28, 2024, 05:42:13 pm
content: Just plugged it in - first thing that is noticeable is that the LEDs are painfully bright, near impossible to look at the PCB without getting retina burns... I use 10k as default current limiting for modern chip type (0603) LEDs. I'll have to put black tape over them or exchange the LED resistors.

author: rich t
author_rank: Contributor
timestamp: July 28, 2024, 06:06:29 pm
content: Oh, sorry to hear -- I actually drive the LEDs at less than 1/10 their max current... One assembly house swapped LEDs w/o telling me (making them much dimmer), but I am pretty sure Elecrow used the specified LEDs.If all 3 LEDs are at the same visual intensity, you likely have the right ones.You can actually turn all LEDs off in deep-dive mode if you want...To turn off the blue one, use "pins heartbeat none"...To turn off the red and green, write a tiny BASIC program, save it, and turn autorun on, like:10 dim red as pin e3 for digital output20 dim green as pin e2 for digital output30 red = 0, green = 0saveautorun onThat should cover you.To undo, you can use "pins heartbeat e1" and then "new" to wipe out the BASIC program.

author: rich t
author_rank: Contributor
timestamp: July 28, 2024, 07:47:36 pm
content: Of if you want to wire your own LED to pin "a8", you can use "pins heartbeat a8" and use it as the heartbeat indicator.

author: RAPo
author_rank: Super Contributor
timestamp: July 29, 2024, 06:00:35 pm
content: My fle-scope from Elecrow arrived today.The leds are much to bright. They have the same intensity.Will try the program tomorrow.Quote from: rich t on July 28, 2024, 06:06:29 pm

author: theoldwizard1
author_rank: Regular Contributor
timestamp: August 05, 2024, 06:54:45 pm
content: It appear that I have the same "Failed to execute 'claimInterface' on 'USBDevice' : Unable to claim interface" thatshabazhas but on a Amazon Fire Max 11 running Chrome. I suspect it is the same problem as you mentioned ("the platform binds a serial driver to the device").Would his work around solve this problem on the Max 11 ?

author: rich t
author_rank: Contributor
timestamp: August 06, 2024, 12:22:59 pm
content: The first thing to try is the "manual" flavor of the web-page...The automatic web-page (which decides on using WebUSB or Web Serial based on the navigator.userAgent) only works for the platforms I have tested on.So start by opening this:https://rtestardi.github.io/usbte/flea-scope.manual.htmlAnd then try "Start Connect Comm" and "Start Connect USB" one at a time.If neither of them work, then it is possible you are hitting this issue:https://github.com/rtestardi/usbte/issues/5The solution to that is to force your Flea-Scope to expose a non-CDC/ACM endpoint, so the serial driver will not attach to it.You have to start with a firmware upgrade (instructions in user's guide and you need v2.27j):https://rtestardi.github.io/usbte/flea-scope.pdfhttps://github.com/rtestardi/StickOS2/blob/main/board/pic32.X.27j.0x39ca.production.hexThen you need to ground pin a0 on boot -- this will tell Flea-Scope to expose a non-CDC/ACM endpoint.Then the serial driver won't attach to it so you have to always use "Start Connect USB" on the manual flavor web-page:https://rtestardi.github.io/usbte/flea-scope.manual.htmlhttps://rtestardi.github.io/usbte/stickos-basic.manual.htmlIt is unfortunate that some platforms have serial drivers but do not expose Web Serial into the browser -- the only one I knew of before was Samsung.Possibly Fire is a second.Sorry for the trouble.

author: RAPo
author_rank: Super Contributor
timestamp: August 06, 2024, 05:05:51 pm
content: I've ordered a second flea-scope, This time with an USB-mini->USB-C cable. Connecting it to my phones (I have two Androids) doesn't deliver any power to the flea-scope.A desktop PC works well.Is there any reason it is not working on my phones?

author: rich t
author_rank: Contributor
timestamp: August 07, 2024, 02:55:19 pm
content: I have never had an experience where the phone does not deliver power -- is your phone capable of powering and connecting to USB devices, or might the USB port be only for charging the phone? Flea-Scope is a USB 1.1 device operating at 12 Mbit/sec (aka full speed). One guy could not get the phone to connect until he switched to a real data cable -- many cables nowadays are power-only. But as long as you get a cable rated for data (which has more wires, typically 4), it should work -- there is nothing special about the cable from elecrow (well, except I have tested with it :-).

author: RAPo
author_rank: Super Contributor
timestamp: August 08, 2024, 01:52:30 pm
content: I also tried the neighbour's phone. I'm still having no luck. The cable seems all right (see the attached photo).Tested phone brands:Huawei P smart ZHuawei P30 LiteUlefone Note 18 UltraMoto G62 5Gand a Lenovo Duet Chromebook.All devices can synchronize data with a standard data cable.Quote from: rich t on August 07, 2024, 02:55:19 pm

author: PlainName
author_rank: Super Contributor
timestamp: August 08, 2024, 02:31:17 pm
content: They probably need an OTG cable, which isn't a normal one. There is an additional pin with resistor, which is missing in your photo (ID).I had the same issue: phone didn't work with a normal cable plus A adapter. But an OTG splitter (two A socckets, one for external power unused for this experiment) did work fine.

author: RAPo
author_rank: Super Contributor
timestamp: August 08, 2024, 04:56:27 pm
content: Many thanks—that did the trick, even without a USB splitter. I had an old OTG cable lying around, and it connected with power on the first try at each of the above-mentioned devices.So should the elecrow cable be an OTG or do I have a bad specimen?Quote from: PlainName on August 08, 2024, 02:31:17 pm

author: PlainName
author_rank: Super Contributor
timestamp: August 08, 2024, 05:40:36 pm
content: QuoteDepends if it's being sold for use with a PC or phone. Personally I'd expect an A to micro-B to be normal data, and C to micro-B to be OTG (why else would you want a C at the host end). But I'm not involved in any way, so...

author: RAPo
author_rank: Super Contributor
timestamp: August 08, 2024, 06:05:45 pm
content: It was sold as an add-on to the flea-scope ;-)Quote from: PlainName on August 08, 2024, 05:40:36 pm

author: theoldwizard1
author_rank: Regular Contributor
timestamp: January 21, 2025, 01:16:15 am
content: Quote from: theoldwizard1 on August 05, 2024, 06:54:45 pmWell, the Flea-Scope got put on the back burner, but I dragged it out the other day.Quote from: rich t on August 06, 2024, 12:22:59 pmNo joy !Quote from: rich t on August 06, 2024, 12:22:59 pmYep, I was running v2.27gQuote from: rich t on August 06, 2024, 12:22:59 pmBingo ! Problem solved !!