9
\$\begingroup\$

I was thinking to make a simple oscilloscope which can measure at least 2MHz signals, that would be enough, and it will be connected to a PC, or Android device. First, I tought to use USB to connect the "oscilloscope" to the PC or Android USB Host capable device that would give me about 12Mbps transfer speed but I would like to do it whit bluetooth or on another RF way. I say some Bluetooth-UART modules and they are capable of 2Mbps transfer speed and Wi-Fi modules only about 300Kbps. I have a 512K RAM memory for buffering the samples from my 12MSPS ADC, so at 2Mbps it will take:

$$\frac{512000\ Kbytes}{2000000\ Mbps/8bits} = 2.048 seconds$$

So I will lose 2 seconds of samples until I send all the 512K buffer over bluetooth. Over USB it is about 330mS and it is too much I think. Is there any way to avoid this ? How does USB oscilloscope do it ?

\$\endgroup\$
5
\$\begingroup\$

If you treat the PDA as simply a display, then you can change your way of thinking about what data actually needs to be sent. It only needs a single trace of data, the width of the display, up to 30 times per second. If we assume 8 bit samples, and a retina display width of 960 columns, then you only need to send 960 bytes 30 times a second, or 28.8kbytes per second. If you are fine with 10Hz update rates, then the link only needs to handle 9,600 bytes per second. When the user zooms in, or changes any of the parameters of the measurement, send the new parameters to the microcontroller, and have the microcontroller prepare the data so you only need a low data rate stream to display the data.

If you want to do analysis on the PDA, then you'll have to send a whole chunk of data, and that's simply going to be slow.

But the more analysis you do on the microcontroller side, the less data you have to send, and the more frequently you can update the display.

Keep in mind that fast bluetooth data links will not connect to iOS devices (iPod touch, iPhone, iPad) without fulfilling the requirements of the Apple Made For iPod program, or jailbreaking the iOS device. This is why many similar devices are using wifi.

If you cannot reduce your data rate, and need the PDA to have full access to all the data with no breaks, you should skip bluetooth entirely and use wifi. Inexpensive wifi adaptors might only handle low data rates, but there are wifi modules that will provide more bandwidth.

\$\endgroup\$
6
\$\begingroup\$

There is no way to avoid this, you simply have to send less data.

Most scopes (including USB scopes running above the USB data rate) do not sample continuously. On triggering they fill a smallish buffer and send to display, then wait for another trigger, fill buffer, send to display and so on.

So you will have to work out your buffer size according to your screen update rate - aim for >20 refreshes per second. For example, if you want 20 screens of 1024 samples, then 20KB of (8-bit per sample) data is sent per second. If you have a "single shot" function then obviously you can use a much larger buffer.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.