How can I interface BITalino with Matlab / Simulink?

Python, Java, Android OS, etc.
carlos arroyo
Posts: 8
Joined: Sun Feb 08, 2015 8:04 am

Re: How can I interface BITalino with Matlab / Simulink?

Postby carlos arroyo » Sun Mar 08, 2015 6:31 am

Hi there, I´m having the same problem as Ana, I am trying to acquire signals from 5 pressure sensors and the accelerometer for a football helmet app. so I am using all 6 analog inputs. The problem is that all signals behave the same and I´m getting some noise. do you guys have an idea why is this happening ?

carlos arroyo
Posts: 8
Joined: Sun Feb 08, 2015 8:04 am

Re: How can I interface BITalino with Matlab / Simulink?

Postby carlos arroyo » Sun Mar 08, 2015 8:03 am

I found out that if all analog channels are being read and a 1000 sampling frequency is being used, all the channels behave the same and you get some noise, this does not happen if you use a 100 sampling frequency though. that´s kind of interesting

BITalino
Site Admin
Posts: 567
Joined: Tue Aug 27, 2013 3:47 pm

Re: How can I interface BITalino with Matlab / Simulink?

Postby BITalino » Sun Mar 08, 2015 8:38 am

Hi,

That's a very odd behaviour indeed. We'll try to look into the existing Matlab API over the coming weeks to try and figure out what may be happening.

Best regards,
The BITalino Team

anaritam
Posts: 5
Joined: Fri Nov 07, 2014 8:21 pm

Re: How can I interface BITalino with Matlab / Simulink?

Postby anaritam » Mon Mar 09, 2015 1:10 pm

Hi again,

just to make sure: If i want to "convert" the acquired signal from a EMG sensor to voltade, I should just multiply it by 3,3mV (maximum value for the EMG sensor) and divide it by 1000 (the maximum value obtained when I plot a signal with the cables disconeted from any electrodes is around 990, so I assume the maximum value corresponding to 3,3 mV is 1000) ?

Thank you again,

Ana

BITalino
Site Admin
Posts: 567
Joined: Tue Aug 27, 2013 3:47 pm

Re: How can I interface BITalino with Matlab / Simulink?

Postby BITalino » Mon Mar 09, 2015 1:21 pm

Hi Ana,

You also need to remove the offset (given that the sensor is differential) and take into account the resolution of the channel you are using.

Its best that you use the transfer function listed on the sensor data sheet:
http://bitalino.com/datasheets/EMG_Sensor_Datasheet.pdf

Regarding the resolution of the channel, from the values you are mentioning it should be 10-bit, but it may vary (depending on the channel):
http://bitalino.com/datasheets/MCU_Block_Datasheet.pdf

Best regards,
The BITalino Team

BITalino
Site Admin
Posts: 567
Joined: Tue Aug 27, 2013 3:47 pm

Re: How can I interface BITalino with Matlab / Simulink?

Postby BITalino » Tue Mar 24, 2015 4:34 pm

Hi there,

Ideally you should put that code right after the call to the read(...) function. Note that BITalino streams the data in real time and therefore read(...) should be called within a loop (e.g. while or for).

Another important detail is the number of samples requested each time read(...) is called. Request too few (e.g. 1) and it will be highly resource-intensive; request too many (e.g. 10000) and read(...) will be blocked for a long period.

Of course it will depend on the requirements of your algorithm, but from our experience requesting between 100 and 200 samples provides a good compromise between real time feel and performance in the access to the device.

Also, bear in mind that your processing code should have time to complete between calls to read(...). Imagine that your code takes 150ms to complete (e.g.); if you request 100 samples (e.g.) at 1000 Hz sampling rate, this will introduce a delay in the data arrival and eventually loss of samples.

Finally, if you're looking into plotting your data in real time, more likely than not you will have to use the drawnow callback together with the call to the plot(...) function, otherwise Matlab won't refresh the current plot as expected.

Hope you find this information useful for the goals you are pursuing. Do feel free to contact us for any further question you may have.

Best regards,
The BITalino Team

BITalino
Site Admin
Posts: 567
Joined: Tue Aug 27, 2013 3:47 pm

Re: How can I interface BITalino with Matlab / Simulink?

Postby BITalino » Mon Nov 23, 2015 6:37 pm

Dear all,

We're very proud to announce that MathWorks has just released an official toolbox to support BITalino on MATLAB:
http://www.mathworks.com/matlabcentral/fileexchange/53983-bitalino-support-from-matlab

Best regards,
The BITalino Team

irfan_ahmadi
Posts: 2
Joined: Wed Feb 10, 2016 8:36 am

Re: How can I interface BITalino with Matlab / Simulink?

Postby irfan_ahmadi » Sun Feb 28, 2016 5:30 am

Hi all,

i use BITalina w/ mac: 98:D3:31:B2:BB:7D. i want to interface BITalino w/ Matlab 2015a and i downloaded Matlab APIs. i want to develop online data acquisition[/code] use emg from BITalino plugged kit. the problem is when i run the APIs , this always can't conected w/ divice, can you help me for this problem


best regards,
BITalino Team

BITalino
Site Admin
Posts: 567
Joined: Tue Aug 27, 2013 3:47 pm

Re: How can I interface BITalino with Matlab / Simulink?

Postby BITalino » Sun Feb 28, 2016 8:08 am

Hi,

Have you paired the device with your computer? When using our OpenSignals software are you able to communicate successfully with the device?

The Matlab API is officially maintained by the MathWorks IMTT... I'd suggest you post a comment on the following page (they usually reply fast):
http://www.mathworks.com/matlabcentral/fileexchange/53983-bitalino-support-from-matlab

Best regards,
The BITalino Team

irfan_ahmadi
Posts: 2
Joined: Wed Feb 10, 2016 8:36 am

Re: How can I interface BITalino with Matlab / Simulink?

Postby irfan_ahmadi » Sat Mar 05, 2016 2:00 pm

Hi,
Is Bitalino Toolbox possible to display in real time the acquired signals in matlab without Bitalino App? what's code?
Indeed, i'm working on a project where i need to acquire signals in real time ,
best regards


Return to “Programming APIs”




cron