PlainDAQ needs transfer lots of data and it's gotta do it fast.
I wanted to test how fast I can tranfer data via USB. I used two raspberry pi pico's one of them doing the debugging and the other is doing the actual work.
Ultimately I am going to need to transfer 6MBit/s of data from pico to computer (12-bit 500ksps ADC = 6Mbits/s)
The Test Setup
![](https://cdn.hackaday.io/images/295071645541982821.jpg)
Pico on the lower side of the picture is debugging and the other is the DUT (device under test)
USB Speed Test
The USB is in bulk transfer mode. I don't really know much inner workings of the USB protocol, but it allows me to send 64 bytes at a time, and therefore I needed be clever about transferring 1000s of 64 bytes packages.
I imported the the example code provided in raspberry pi's github page and modified it in a way that I can receive multiple packages easily. To do that I erased every print statement (they are SLOW!) and implemented a counter to keep track of number of packages sent.
You can check my code here. I also included the python file to work with it as well.
And finally, here are the results:
![](https://cdn.hackaday.io/images/579221645543254195.jpg)
I can reach up to more than 7Mbits/s. The speed depends on your setup as well. For example, if you use a hub it's slower.
That's it for this update!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.