Author Topic: Light-weight usb oscilloscope with Matlab support?  (Read 7461 times)

0 Members and 1 Guest are viewing this topic.

Offline colorado.rob

  • Frequent Contributor
  • **
  • Posts: 419
  • Country: us
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #25 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.
 

Offline Peter GammaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ch
  • Meditation Research Institute (CH), Physiologist
    • www.petergamma.org
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #26 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

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

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.




 

Offline rodpp

  • Frequent Contributor
  • **
  • Posts: 307
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #27 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

 

Offline rodpp

  • Frequent Contributor
  • **
  • Posts: 307
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #28 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.
 

Offline Peter GammaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ch
  • Meditation Research Institute (CH), Physiologist
    • www.petergamma.org
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #29 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.
 

Offline colorado.rob

  • Frequent Contributor
  • **
  • Posts: 419
  • Country: us
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #30 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

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

This includes machine learning models for pattern analysis.
 

Offline Peter GammaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ch
  • Meditation Research Institute (CH), Physiologist
    • www.petergamma.org
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #31 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.
« Last Edit: October 04, 2019, 06:15:04 am by Peter Gamma »
 

Offline Peter GammaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ch
  • Meditation Research Institute (CH), Physiologist
    • www.petergamma.org
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #32 on: September 25, 2019, 05:53:23 am »
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.

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

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/

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?


 

Offline rodpp

  • Frequent Contributor
  • **
  • Posts: 307
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #33 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.
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #34 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.
 
The following users thanked this post: Peter Gamma

Offline Peter GammaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ch
  • Meditation Research Institute (CH), Physiologist
    • www.petergamma.org
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #35 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 :)?
 

Offline Peter GammaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ch
  • Meditation Research Institute (CH), Physiologist
    • www.petergamma.org
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #36 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

For 4 channels EEG, buy a Muse headband:

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

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

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



« Last Edit: October 10, 2019, 09:16:08 pm by Peter Gamma »
 

Offline Peter GammaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ch
  • Meditation Research Institute (CH), Physiologist
    • www.petergamma.org
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #37 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. 
« Last Edit: October 09, 2019, 11:22:36 am by Peter Gamma »
 

Offline Peter GammaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ch
  • Meditation Research Institute (CH), Physiologist
    • www.petergamma.org
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #38 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.
 

Offline Peter GammaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ch
  • Meditation Research Institute (CH), Physiologist
    • www.petergamma.org
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #39 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)/

2. owon-vds1022i to Matlab SCPI interface

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/

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

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

with the Owon software, Matlab or Phyton could be more suitable.
 

Offline Peter GammaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ch
  • Meditation Research Institute (CH), Physiologist
    • www.petergamma.org
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #40 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.
« Last Edit: November 16, 2019, 04:02:28 am by Peter Gamma »
 

Offline Peter GammaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ch
  • Meditation Research Institute (CH), Physiologist
    • www.petergamma.org
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #41 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

 

Offline Peter GammaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ch
  • Meditation Research Institute (CH), Physiologist
    • www.petergamma.org
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #42 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.
 

Offline Peter GammaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ch
  • Meditation Research Institute (CH), Physiologist
    • www.petergamma.org
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #43 on: January 16, 2020, 11:45:56 pm »
Labstreaminglayer can also interface with 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/    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?
« Last Edit: January 16, 2020, 11:49:26 pm by Peter Gamma »
 

Offline Peter GammaTopic starter

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: ch
  • Meditation Research Institute (CH), Physiologist
    • www.petergamma.org
Re: Light-weight usb oscilloscope with Matlab support?
« Reply #44 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

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


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf