EEVblog Electronics Community Forum

Products => Test Equipment => Topic started by: Peter Gamma on May 29, 2019, 07:59:27 pm

Title: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on May 29, 2019, 07:59:27 pm
I'm looking for a portable light-weight usb oscilloscope with Matlab support, with sensitivty 0-100 mV for a respiration belt sensor. The oscilloscope will be carried around 24 *7.

Which oscilloscope do you recommend?
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: thm_w on May 29, 2019, 08:52:53 pm
Thats more of a battery powered data logger, not oscilloscope. Most should save to a csv file that would be compatible with matlab.
What is the bandwidth requirement?
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on May 30, 2019, 05:15:08 am
No, a battery powered data logger is not suitable, since I need a life stream of data into Matlab. It s for training monitoring analyse purposes.

Here is the data sheet of the sensor i already own: 

http://m-cdn.adinstruments.com/product-data-cards/TN1132-DCW-18A.pdf (http://m-cdn.adinstruments.com/product-data-cards/TN1132-DCW-18A.pdf) 

It´s from Adinstrumens. They also have data recorders with Matlab support. The data aqisition can be plotted and analysed live in Matlab. And also Iworx have data recorders which can do that. I found here one on ebay:

https://www.ebay.ch/itm/iWorx-IWX-214-4-Channel-Data-Recorder/382898311178?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m1438.l2649 (https://www.ebay.ch/itm/iWorx-IWX-214-4-Channel-Data-Recorder/382898311178?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m1438.l2649)

Unfortunately, these data recorders from Adinstruments and Iworx are heavy weight, and I m looking for a light weight. 

Any recommendations?
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: DaJMasta on May 30, 2019, 05:49:04 am
I think this is data logger territory, not for the ability to store, but for the ability to digitize and directly transfer to a host PC (so an acquisition card/module), but required bandwidth and sample rate is the important part of this equation.  If it's low enough, then you need a suitable ADC on the end of a USB or other connection that will software interface with matlab (and I'd imagine there are some options), if you start needing more bandwidth or sample rate than a direct recorder can handle, then maybe a scope with acquisition memory and lower transfer speeds to the host could be viable (like capturing fast, short bursts to send after an acquisition).  If you need a lot of samples per second, more than USB can handle continuously, your best bet is probably a scope running a PC OS that you can load matlab onto, but that's not likely to be all that portable.

Would something like NI's USB DAQ devices work for you?  There are quite a few variants and quite a few other vendors, but that's the type of device your application suggests to me, unless there are requirements it can't fulfill.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on May 30, 2019, 04:58:12 pm
Thank you for your recommendation, DaJMasta , very helpful. I m not a specialyst for oscilloscopes and data loggers. I changed my point of view. I have to explore the data logger territory, which is new for me.

Do the NI's USB DAQ  you mentioned have Matlab support? And is it possible to live stream from a sensor via NI's USB DAQ to Matlab? And do they have a buffer, so that it is not necessary to have them always connected to a PC?
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: DaJMasta on May 30, 2019, 07:08:04 pm
Haven't used them with matlab myself, so can't say for sure, but a quick google reveals a number of devices and software advertising support for matlab.  Notably, the Data Acquisition Toolbox, which supports https://www.mathworks.com/help/daq/data-acquisition-toolbox-supported-hardware.html (https://www.mathworks.com/help/daq/data-acquisition-toolbox-supported-hardware.html)

I believe most of the NI DAQ series are just for streaming with little or no recording capability, but there are many devices for that as well.  An interesting mention on that support page which could be very relevant... you can probably use a PC sound card for your data acquisition.  Maybe with a simple amplifier to make full use of a line input channel, an integrated PC sound card will probably get you 16 bits or so worth of dynamic range with at least 48kHz of sample rate on two channels, so it could be as simple as configuring your PC's sound input system to feed into matlab and plugging your signal into the input.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on May 30, 2019, 08:33:48 pm
I’m checking several options for a setup, at the moment. Since the setup I’m assembling is for a mobile application, I would prefer a mini PC for data aquisition rather than a PC soundcard.

On my search, I found

https://learn.adafruit.com/adafruit-data-logger-shield/overview (https://learn.adafruit.com/adafruit-data-logger-shield/overview)

It would be nice, to have a minicomputer for a data logger, which is flexible. And the Arduino is supported by Matlab.

The Limitation of my setup is probably given by the sensor I use. It’s a Respiratory Belt Transducer from Adinstruments.

http://m-cdn.adinstruments.com/product-data-cards/TN1132-DCW-18A.pdf (http://m-cdn.adinstruments.com/product-data-cards/TN1132-DCW-18A.pdf)

The data logger must be in the sensitive enough for this sensor. What about a combination of a high quality usb data logger for signal aquisition attached to an Arduino for Data buffering and streaming to Matlab?
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on May 31, 2019, 10:02:47 am
From the Picotech Support, I got the information, that I don't need an oscilloscope (and also no data logger?) to connect my Adinstruments Respiratory belt transducer for instance to a rasperry pi, which is very helpful information.
 
Rather I need a small Analog-to-Digital converter to connect the respiratory belt sensor to the Rasperri Pi.

Any recommendations what kind of Analog-to-Digital converter could be suitable to connect the respiratory belt sensor to the Rasperri Pi?
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on June 05, 2019, 04:38:58 am
My concept for a low-cost and lightweight usb oscilloscope, usb data grabber, usb analog to digital converter with Matlab support is the following:

1. owon-vds1022i

https://www.eevblog.com/forum/testgear/owon-vds1022i-quick-teardown-(versus-the-hantek-6022be)/ (https://www.eevblog.com/forum/testgear/owon-vds1022i-quick-teardown-(versus-the-hantek-6022be)/)

2. owon-vds1022i to Matlab SCPI interface

https://www.eevblog.com/forum/testgear/owon-ag-1012-awg-matlab/ (https://www.eevblog.com/forum/testgear/owon-ag-1012-awg-matlab/)

try to modify the example for Rigol, ask the Owon support for help, or ask the community here and the Matlab community for help until we got a working solution.

3. Rasperri Pi with Owon Software for Linux

as data buffer and for streaming to PC

https://www.eevblog.com/forum/testgear/owon-vds1022i-quick-teardown-(versus-the-hantek-6022be)/300/ (https://www.eevblog.com/forum/testgear/owon-vds1022i-quick-teardown-(versus-the-hantek-6022be)/300/)

4. PC with Matlab

Should work theoretically.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on September 04, 2019, 09:36:58 pm
you can probably use a PC sound card for your data acquisition.  Maybe with a simple amplifier to make full use of a line input channel, an integrated PC sound card will probably get you 16 bits or so worth of dynamic range with at least 48kHz of sample rate on two channels, so it could be as simple as configuring your PC's sound input system to feed into matlab and plugging your signal into the input.
Did not test the Owon oscilloscope with SCPI and Matlab yet. The Owon oscilloscope has only a resolution of 8 bit. The idea to use a PC sound card for data acquisition is interesting, since a resolution of 16 bit or higher would be fine.

I found with Google Oscilloscope software which can read out 16 bit from a PC sound card. And also in Matlab there is support to read out from a PC sound card.

I thought about buying a high quality sound card to get a higher resolution than 16 bit. Does someone has experience with PC sound cards for data acquisition with bitrates higher than 16 bit? Does it work, and is it worth buying?

Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on September 20, 2019, 02:33:26 pm
I bought a soundblaster sound card on ebay with 24 bit  and 192 kHz of sample rate for 40 USD and tested it with a ecg sensor I bought on aliexpress:

https://de.aliexpress.com/item/32228816701.html?spm=a2g0s.9042311.0.0.3cb14c4djZ3Uk5 (https://de.aliexpress.com/item/32228816701.html?spm=a2g0s.9042311.0.0.3cb14c4djZ3Uk5)

Since the ecg sensor has 3 leads I did a "brute force" test and plugged the ecg sensor in the mic-in port of the soundcard, to test whether the included board with the sensor might be unnecessary. Unfortunately, there was only noise when I recorded the signal from the mic-in with audacity.

Then I found this video on Youtube:

https://www.youtube.com/watch?v=sP_-f5nsOEo (https://www.youtube.com/watch?v=sP_-f5nsOEo)

This looks like the solution I m looking for, low-cost and high quality. When it works with ecg sensors, it should also work with respiration sensors. It s the best solution I could find for my needs to this day. Thank you all for your support :-+!
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: rstofer on September 21, 2019, 01:10:37 am
Answering only the question of a portable scope that connect via USB to MATLAB

https://www.mathworks.com/hardware-support/digilent-analog-discovery.html (https://www.mathworks.com/hardware-support/digilent-analog-discovery.html)
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on September 21, 2019, 03:34:03 am
Thank you. There are also usb sound cards with 24 bit resolution. And Matlab has soundcard support. But does it work with multiple inputs? The easiest solution is probably to use several PCs with a single sound card for multiple inputs and stream the signal to one PC with Matlab. Still more affordable than a Adinstruments equipement for thousands of $$$.

For a mobile solution, I found the low-cost biomedical tool-kit Bitalino:

https://bitalino.com/en/

Bitalino has only 8 bit resolution, but as a mobile solution it is the best I could find :-+.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on September 21, 2019, 04:37:01 pm

Do be precise, the Bitalino revolution board has 4 analog ports with 10-bit and another 2 with 6-bit:

https://bitalino.com/datasheets/REVOLUTION_BITalino_Board_Kit_Datasheet.pdf
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on September 21, 2019, 08:55:31 pm
One more problem solved. For more than one channel input, use a sound mixer device with multiple inputs and this:

https://ch.mathworks.com/help/daq/multichannel-audio-input-and-output-1.html

You can have a whole "Halleluja chorus" in Matlab  :).
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on September 23, 2019, 01:02:46 pm
I did not find an affordable sound mixer which connects the individual channels to a PC. Has someone experience with connecting several usb sound cards to a PC?
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Old Printer on September 23, 2019, 04:10:20 pm
Have you run the Owon software on Linux on the Raspberry Pi yet? Or maybe you have moved past that. Software is a notorious weak point on the low end USB scopes. The Analog Discovery usb scope is 12 bit and will run on the Raspberry Pi according to Atila , the Digilent tech wiz.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on September 23, 2019, 07:52:41 pm
I dropped the Owon software on Linux on the Raspberry Pi option, and have become a soundcard freak, because of simplicity. Soundcards have normally 16 bit resolution, as far as I know, and with a PC solution with Matlab there is almost any software option availabe.

Maybe dividing the project in two options is more simple: One for stationary use with a PC, and one for mobile use with a Bitalino. But also for a mobile solution I can imagine to use a mini-PC like this one:

https://de.aliexpress.com/item/33063507615.html?spm=a2g0o.productlist.0.0.7eac42c2thZOKA&algo_pvid=d366485e-b3df-499e-b72b-bc1fb2f556f6&algo_expid=d366485e-b3df-499e-b72b-bc1fb2f556f6-40&btsid=78419bef-3a89-4d7a-8e10-6ce684449b47&ws_ab_test=searchweb0_0,searchweb201602_5,searchweb201603_52

These mini-PC dont have a mic-in, but they can probably also be used with a usb sound card like this one:

https://de.aliexpress.com/item/32492176855.html?spm=a2g0o.productlist.0.0.6d3d13bdJFIbH7&algo_pvid=22504589-b9eb-48af-87de-24cdd6192d6f&algo_expid=22504589-b9eb-48af-87de-24cdd6192d6f-0&btsid=85f8b440-6523-44f6-bab5-cbf8294ed861&ws_ab_test=searchweb0_0,searchweb201602_5,searchweb201603_52

And if several sensors are needed, more soundcards could be attached. Has someone experience in using a multi-soundcard setup with a PC?







 
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: rodpp on September 23, 2019, 11:32:09 pm
Maybe you can provide more information about your application, so that we can help with some hint about the hardware needed.

- How many channels are you going to acquire;
- Single ended or differential;
- Sample rate;
- Resolution;
- Portable powered by a battery, or could be connected in a PC.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on September 24, 2019, 02:34:18 am
Data sheet of the sensor i already own: 

http://m-cdn.adinstruments.com/product-data-cards/TN1132-DCW-18A.pdf (http://m-cdn.adinstruments.com/product-data-cards/TN1132-DCW-18A.pdf) 

Then I ve got a second sensor as the one used in this video:

https://youtu.be/sP_-f5nsOEo (https://youtu.be/sP_-f5nsOEo)

- At least one channel is necessary
- It s for breathing sensors, heart rate sensor, evtl. eeg sensors, so only a single end is necessary
- Sample rate of 48kHz of sample should be sufficient
- It s for calculating breathing rate, heart rate, and other biosignals. This should work with 10 bit resolution, but a higher resolution would be better.
- I think it s easier to have both a portable and a stationary device. A stationary device with higher quality, and a mobile device with lower resolution.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: rstofer on September 24, 2019, 02:48:52 am
I would consider using a BLE Bluetooth enabled micro to run the sensors and then blast the results to a Bluetooth enabled device,  PC, cell phone, tablet, whatever.  The Cypress PSoC 6 is a very low power dual core device with BLE.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: rodpp on September 24, 2019, 04:03:24 am
Ok, these specs are not much demanding.

If you have no problems buying used items, search for "National Instruments DAQ" on Ebay. They have a big range of DAQ solutions, almost all of them with Matlab support. Usually the best offers (cheaper) are for PCI boards. If you can have a legacy PC that has PCI slots, it doesn't cost much money to have a high performance DAQ platform. The last motherboard that I bought with PCI slots was a Biostar B350GT5, for AMD Ryzen CPUs. So you can have support for PCI boards in the current AMD CPUs. But probably it is the last generation that will have motherboards with PCI support.

For around USD500 you can buy an used PCI 6281 board: 16 AI (18-Bit, 625 kS/s aggregated), 2 AO (2.8 MS/s), 24 DIO

For around USD150 you can buy an used USB 6009 board: 8 AI (14-Bit, 48 kS/s), 2 AO (150 Hz), 13 DIO


But for your application, considering the portability, the National Instruments MyRIO fits well. It is a educational oriented product that you can program to run alone. It has a processor, a FPGA, ADCs, DACs, DIOs, etc: http://www.ni.com/pdf/manuals/376047c.pdf (http://www.ni.com/pdf/manuals/376047c.pdf)

(http://pubs.sciepub.com/automation/5/2/2/bigimage/fig4.png)

Look at this example: https://www.youtube.com/watch?v=3nf3O3YS_fI (https://www.youtube.com/watch?v=3nf3O3YS_fI)

It is more than you need, but will allow you start your project very fast. And maybe you can find other uses to it.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on September 24, 2019, 04:35:37 am
Thank you both for your suggestions, I have to check this out.

@rstofer: a BLE Bluetooth enabled micro is a brilliant idea, I have to have a closer look at this option.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Henrik_V on September 24, 2019, 09:03:44 am
I would also go for a BT mic device if some ms delay doesn't matter.
If you open it and look at in input, it should be possible to locate the internal 15Hz to 25Hz highpass filter.
If that filter affect your measurements:

Q&D: Add a bigger capacitor in the HP filter to bring down the HP freq.

Like most soundcard ADCs, I assume you will find a ADC input biased to 1.25V (or so).  (and a 1.25V ref voltage pin (or 2.5V))
I used a INA217 and a Buffer OP for the Bias ref to read geophones with a soundcard (0.2Hz to 200Hz).
 
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on September 24, 2019, 01:23:40 pm
Thanks for these detailed information. I think it s really someting to have a closer look at and it s worth developing for it. To have a solution to stream  from a data channel over audio bluetooth to Matlab and have there a list of all the "sound cards" with all the data channels would be great.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: colorado.rob on September 24, 2019, 01:50:56 pm
Have you considered using Python instead of Matlab for this?  This sort of stuff is easy to do on so many levels in Python.  Whether using scipy to stream in audio data or access lab equipment using SCPI, these operations are just trivial.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on September 24, 2019, 05:30:44 pm
But for your application, considering the portability, the National Instruments MyRIO fits well. It is a educational oriented product that you can program to run alone. It has a processor, a FPGA, ADCs, DACs, DIOs, etc: http://www.ni.com/pdf/manuals/376047c.pdf (http://www.ni.com/pdf/manuals/376047c.pdf)

Thanks for your detailed proposual. I already studied the many features of the low-cost biomedical toolkit Bitalino

https://bitalino.com/en/ (https://bitalino.com/en/)

for a while, which is comparable to your proposal. Bitalino is low-cost and flexible. It takes a little bit of time to go though all the features of the Bitalino, but I think it s worth it. They have a responsive support which is on the academic level, and I think it is really a mature product, which can be used for educational purposes, but also for scientific purposes. From the pyton libraries to program the chipsets to the housing you can find almoust anything there. it is a mature product, and it is ready to go.

But on the long-therm, I think it s worth looking at a bluetooth sound-card alternative project to Bitalino, which might be simpler once it is established.




Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: rodpp on September 24, 2019, 05:49:51 pm
Yes, definitely the bitalino solution suits best for your needs.

I have never heard of it before, i just watched a video from the page you linked, it's very nice:

https://youtu.be/LOFUTNEgrv4

Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: rodpp on September 24, 2019, 06:11:43 pm
According with the bitalino datasheet (https://bitalino.com/datasheets/REVOLUTION_BITalino_Board_Kit_Datasheet.pdf), the specification of the data acquisition in this board is very modest:

Sampling Rate: 1, 10, 100 or 1000Hz

Analog Ports: 4 in (10-bit) + 2 in (6-bit) +
 1 auxiliary in (battery) + 1 out (8-bit)

Digital Ports: 2 in (1-bit) + 2 out (1-bit)

I have no knowledge in this biological sensing area, but probably it will be enough as showed in the above video.

However, such low resolution and very slow sample rate (1KHz) will be limiting if you try something a little more demanding.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on September 24, 2019, 07:44:24 pm
Have you considered using Python instead of Matlab for this?  This sort of stuff is easy to do on so many levels in Python.  Whether using scipy to stream in audio data or access lab equipment using SCPI, these operations are just trivial.

Yes, Python might also be an alternative. What is attractive about Matlab is for using EEG sensors the EEGLAB toolbox

https://sccn.ucsd.edu/eeglab/index.php

is the most attractive option to me, and for using EEGLAB is is better to choose Matlab.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: colorado.rob on September 24, 2019, 08:24:53 pm
Have you considered using Python instead of Matlab for this?  This sort of stuff is easy to do on so many levels in Python.  Whether using scipy to stream in audio data or access lab equipment using SCPI, these operations are just trivial.

Yes, Python might also be an alternative. What is attractive about Matlab is for using EEG sensors the EEGLAB toolbox

https://sccn.ucsd.edu/eeglab/index.php (https://sccn.ucsd.edu/eeglab/index.php)

is the most attractive option to me, and for using EEGLAB is is better to choose Matlab.

Have you seen this Python alternative?

https://www.nmr.mgh.harvard.edu/mne/stable/index.html (https://www.nmr.mgh.harvard.edu/mne/stable/index.html)

This includes machine learning models for pattern analysis.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on September 24, 2019, 10:49:26 pm
Machine learning models for pattern analysis is fine. But what for me personally makes EEGLAB attractive is the fact that EEGLAB developer and Neuroscientist Arnaud Delorme could demonstrate with such a simple device as the Muse headband with only EEG 4 channels (and therefore also for Bitalino with up to 18 electrodes) significant differences in brain waves when a person has the eyes closed vs when a person has the eyes open:

https://forum.bitalino.com/viewtopic.php?f=13&p=2016&sid=f1f78543c224b0f7fa36cb27e1962ead#p2016

This makes EEGLAB a helpful tool for meditation training and also a helpful tool for entry devices for meditation research like the muse headband or Bitalino.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on September 25, 2019, 05:53:23 am
According with the bitalino datasheet (https://bitalino.com/datasheets/REVOLUTION_BITalino_Board_Kit_Datasheet.pdf (https://bitalino.com/datasheets/REVOLUTION_BITalino_Board_Kit_Datasheet.pdf)), the specification of the data acquisition in this board is very modest:

Sampling Rate: 1, 10, 100 or 1000Hz

Analog Ports: 4 in (10-bit) + 2 in (6-bit) +
 1 auxiliary in (battery) + 1 out (8-bit)

Digital Ports: 2 in (1-bit) + 2 out (1-bit)

I have no knowledge in this biological sensing area, but probably it will be enough as showed in the above video.

However, such low resolution and very slow sample rate (1KHz) will be limiting if you try something a little more demanding.

I agree. Bitalino argues, the limitation for Bitalino for EEG sensors is 3 Bitalino boards with up to 18 EEG channels. More devices could create instability:

https://forum.bitalino.com/viewtopic.php?f=13&p=2016&sid=f1f78543c224b0f7fa36cb27e1962ead#p2016 (https://forum.bitalino.com/viewtopic.php?f=13&p=2016&sid=f1f78543c224b0f7fa36cb27e1962ead#p2016)

For instance for 18 EEG channels, is it not better to connect the EEG sensors directly to a PC with for instance usb sound cards as Scott Harden demonstrated with an ECG?:

https://www.swharden.com/wp/2019-03-15-sound-card-ecg-with-ad8232/ (https://www.swharden.com/wp/2019-03-15-sound-card-ecg-with-ad8232/)

And is it not better to stay with a wired sound card solution generally, rather than with a bluetooth solution, which might cause problems with time-delays and cause problems to keep the signals synchronized?


Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: rodpp on September 25, 2019, 11:24:39 am
Maybe you should start experimenting with the sound card of a PC, focusing in the software side. The sample rate and resolution of a sound card is much better than of the bitalino, so after acquisition you can "degrade" the signal in the software to simulate a bitalino acquired signal. Then you can verify what specs are really needed to achieve your objectives.

For example, compare the results of the signal analysis using different resolutions, 6 bits and 10 bits (the resolutions of bitalino board) and using higher resolutions too.

Do the same with the sample rate.

It is very important to consider the signal conditioning before the ADC. You want to use a Low Pass Filter to avoid aliasing, and amplify/attenuate the signal to make better use of the ADC input range.

If you are going to need that much channels (18 or more), maybe a dedicated DAQ board is better than the multiple sound cards approach.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Bassman59 on September 25, 2019, 11:47:09 pm
I did not find an affordable sound mixer which connects the individual channels to a PC. Has someone experience with connecting several usb sound cards to a PC?

You'll hate me for saying this, but macOS has for a long time had a feature called "Aggregate Audio Devices," where you can combine multiple audio devices (can be USB, FireWire, Thunderbolt, whatever) and they appear as one device to your applications. Works like a champ, too.

Any application which can talk to standard Core Audio devices will work with this. Matlab runs on Macs, too.

I do not know if Windows supports this idea.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on September 26, 2019, 09:05:03 am
There are long discussion threats of musicians about methods how to solve the problem of multiple sound cards. 

The Matla Data Acquisition Toolbox™ supports audio channels for devices that work with DirectSound interface:

https://ch.mathworks.com/help/daq/multichannel-audio-input-and-output-1.html

As far as I know it works with Windows and Mac. There is a command  "audio devices installed on your system" in Matlab:

d = daq.getDevices

If this works with usb sound cards, then It s great. Are there any musicians here in this forum experienced with this toolbox :)?
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on October 08, 2019, 09:55:29 pm
For those who are interested in low-cost EEG devices, there are good news. I found two interesting papers from the Department of Physics of the University of Indonesia.

Here my recommendation:

For 1 channel EEG, modify Scott W Hardens setup:

https://openbci.com/forum/index.php?p=/discussion/1663/greentek-gelfree-s-eeg-cap/p2 (https://openbci.com/forum/index.php?p=/discussion/1663/greentek-gelfree-s-eeg-cap/p2)

For 4 channels EEG, buy a Muse headband:

https://choosemuse.com/ (https://choosemuse.com/)

For 8 channels EEG, see this paper from Indonesian physicists:

https://www.researchgate.net/publication/325635924_Design_of_EEG_Data_Acquisition_System_based_on_Raspberry_Pi_3_for_Acute_Ischemic_Stroke_Identification (https://www.researchgate.net/publication/325635924_Design_of_EEG_Data_Acquisition_System_based_on_Raspberry_Pi_3_for_Acute_Ischemic_Stroke_Identification)

For 32 channels EEG, see this paper from Indonesian physicists:

https://www.researchgate.net/publication/332321992_Development_of_Electroencephalography_EEG_Data_Acquisition_System_based_on_FPGA_PYNQ (https://www.researchgate.net/publication/332321992_Development_of_Electroencephalography_EEG_Data_Acquisition_System_based_on_FPGA_PYNQ)

For 256 channels EEG, wait for a while, if you don t want to spent 40'000 USD.



Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on October 09, 2019, 11:20:52 am
I ve seen that the Indonesian solution need a ADS1299EEG-FE board which is about 200 USD for each 8 channel. So OpenBCI EEG and Bitalino EEG are still in the business. 
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on October 11, 2019, 02:48:33 pm
To be clear, I meant the solution from Texas Instruments with the ADS1299EEG-FE demonstrated by the Department of Physics of the University of Indonesia.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on November 14, 2019, 05:40:11 am
My concept for a low-cost and lightweight usb oscilloscope, usb data grabber, usb analog to digital converter with Matlab support is the following:

1. owon-vds1022i

https://www.eevblog.com/forum/testgear/owon-vds1022i-quick-teardown-(versus-the-hantek-6022be)/ (https://www.eevblog.com/forum/testgear/owon-vds1022i-quick-teardown-(versus-the-hantek-6022be)/)

2. owon-vds1022i to Matlab SCPI interface

https://www.eevblog.com/forum/testgear/owon-ag-1012-awg-matlab/ (https://www.eevblog.com/forum/testgear/owon-ag-1012-awg-matlab/)

try to modify the example for Rigol, ask the Owon support for help, or ask the community here and the Matlab community for help until we got a working solution.

3. Rasperri Pi with Owon Software for Linux

as data buffer and for streaming to PC

https://www.eevblog.com/forum/testgear/owon-vds1022i-quick-teardown-(versus-the-hantek-6022be)/300/ (https://www.eevblog.com/forum/testgear/owon-vds1022i-quick-teardown-(versus-the-hantek-6022be)/300/)

4. PC with Matlab

Should work theoretically.

1. The Owon SCPI Matlab problem is near to a solution:

https://www.eevblog.com/forum/testgear/owon-ag-1012-awg-matlab/msg2782596/#msg2782596 (https://www.eevblog.com/forum/testgear/owon-ag-1012-awg-matlab/msg2782596/#msg2782596)

2. Rather than choosing a Rasperry Pi with the Owon software, a mini PC stick like this:

https://de.aliexpress.com/item/33014992760.html?spm=a2g0o.cart.0.0.206d3c00U1XllY&mp=1 (https://de.aliexpress.com/item/33014992760.html?spm=a2g0o.cart.0.0.206d3c00U1XllY&mp=1)

with the Owon software, Matlab or Phyton could be more suitable.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on November 14, 2019, 01:09:56 pm
An option, and a eventually simpler option than windows 10 PC sticks for a mobile testing solution could also be Trekstor Surfbook E11B or Jumper Ezbook 3 pro notebooks (they have low-cost 4 Giga 64 bit Windows systems which is required for most Matlab editions. I tested both with Matlab, it works on both systems, both can be tuned by copying the OS to an optional SSD). Unfortunately, they don t have replaceable batteries.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on December 30, 2019, 11:36:10 am
For the time being, I will not continue this project. A respiration sensor is not urgently necessary for my needs, a GARMIN  watch is sufficient. These setups are more promising for my project:

https://www.eevblog.com/forum/cloud-computing/garmin-watch-connectiq-watch-iot-microsoft-azure-platform/msg2828468/#msg2828468 (https://www.eevblog.com/forum/cloud-computing/garmin-watch-connectiq-watch-iot-microsoft-azure-platform/msg2828468/#msg2828468)

Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on January 16, 2020, 10:43:50 pm
Labstreaminglayer has support for DirectX-compatible joysticks, wheels, gamepads and other controllers:

https://labstreaminglayer.readthedocs.io/info/supported_devices.html

DirectX-compatible sound cards could eventually work with Labstreaminglayer. And Labstreaminglayer can interface with Matlab.
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on January 16, 2020, 11:45:56 pm
Labstreaminglayer can also interface with Python:

https://github.com/labstreaminglayer/liblsl-Python (https://github.com/labstreaminglayer/liblsl-Python)


The DIY ECG with AD8232 and Sound Card as a multiple usb sound card data aquisition system for Matlab or Python :

https://www.swharden.com/wp/2019-03-15-sound-card-ecg-with-ad8232/ (https://www.swharden.com/wp/2019-03-15-sound-card-ecg-with-ad8232/)    USB Sound Card Channel Recorder, low-cost and high quality :) .


I really miss such a device. I m only a person with skills in scripting and debugging of Matlab scripts, I m not a device developer. Where are those device developers?
Title: Re: Light-weight usb oscilloscope with Matlab support?
Post by: Peter Gamma on January 17, 2020, 03:48:21 pm
Scott W Harden s Sound Card ECG  needs soldering. I found this ECG Card on Aliexpress:

https://www.aliexpress.com/item/32816599124.html?spm=a2g0o.cart.0.0.206d3c00D7AIoj&mp=1 (https://www.aliexpress.com/item/32816599124.html?spm=a2g0o.cart.0.0.206d3c00D7AIoj&mp=1)

Can this card be used as a Sound Card ECG device instead of Scott s device?