MATLAB Arduino Tutorial 16 - Force Sensitive Resistor (FSR) Calibration and Visualization

preview_player
Показать описание
This video demonstrates how to calibrate and visualize a Force Sensitive Resistor (FSR) using the Arduino UNO board and MATLAB. The UNO board logs real-time FSR data. This data is then acquired by MATLAB and visualized using hgtransform.

Configuration:
- Matlab R2012a
- Arduino 1.0.1
- USB 2.0
- Force Sensitive Resistor (FSR)

Рекомендации по теме
Комментарии
Автор

I just tried the code and it is working perfect. Thanks so much...

alejandromartinezarrieta
Автор

I know this video is old but for anyone have trouble with the sphere does not change size, the problem is in line 55 with the code "axis equal". Comment this line of code out and your figure should behave normally. This line is basically keeping all 3 axes from changing in length :)

aaronphan
Автор

interesting...🤔 would like more details and can this be done using a free version of matlab? 🙂 for a hobby budget. 😏

qzorn
Автор

Congrats for the video. Where can I get matlab codes please? Thanks

CAQM
Автор

Can you do a tutorial for rpm sensor?plot a rpm graph versus time.?

nazrinsyahmi
Автор

Are you suppose to run all of the m files in the order that you introduced them or just run the fsr.m file?

davian
Автор


I am kind of new to Arduino and Matlab but in the past month I managed to built up a sensing matrix with the help of Multiplexer.
The serial output can be collected using all back-to-basic codes with pin switch using the combination of 3 digital I/O pins. 

const byte addressA = 2; // the multiplexer address select lines (A/B/C)
const byte addressB = 3;
const byte addressC = 4;
byte numberOfSensors = 56;

XXX
  digitalWrite (addressA, (sensorI & 1) ? HIGH:LOW);
  digitalWrite (addressB, (sensorI & 2) ? HIGH:LOW);
  digitalWrite (addressC, (sensorI & 4) ? HIGH:LOW);
  // now read the sensor at A0
  return analogRead (sensorM1);

However the next step is a truly pain for me because I'm trying to shift all of these to Matlab for some further data processing like Neural network. 
I clearly understand that the a. analogRead() but it's been hard to get the data from Arduino 


Hardware: 7*8 Force sensitive resistors 
Arduino MEGA 2560
Interface: Matlab 2012a

Would you be so kind to give me some clue/ break through?
Thank you in advance

hanglu
Автор

Hi, in the function setupSerial(comPort),   what does it mean the sentence
fscanf(s, '%u'); at the end of the code ?. Will be Ok only with the expression fprintf(s, '%c', 'a') ?

aitorsierra
Автор

hi, thank you for your useful lesson. I copied every single detail of the programs in Matlab and Arduino IDE, but after putting the weights on FSR and after the end of calibration, a sphere appears and its volume and Z position are fixed, they don't change like the one in your video. what could the problem be? can you plz help me.

amirtabrizi
Автор

when I do run the readFSR.m file I get an error saying
??? Input argument "out" is undefined.

Error in ==> readfsr2 at 4
fprintf(out.s, 'F');
 
??? Input argument "out" is undefined.

Error in ==> readfsr2 at 4
         fprintf(out.s, 'F');

Am I suppose to acquire an arduino library that will allow me to use the "out" function?
 

davian
Автор

hi  may i know if i can use this force sensor to measure impact forces? i.e. something dropped from a low height onto this force sensitive resistor. i will not be pressing on the force sensitive resistor manually or stacking weights on it but simply will be using drop-test, which is the impact method. can someone please elucidate ?

secondly, how much force can this force sensitive resistor withstand?

 lastly, does this method works for other kinds of force sensors like the piezoelectric version etc? thanks!

dailymotion
Автор

Hey MatLab, i am trying to write down this program through MatLab, but i am having trouble with the weighing portion, when the program askes for me to place 20 grams of weight. I do so, but then the other window only shows M1 = 0 in one column 11 zeros. saying there is an error in the "FSR at 39" M1 (i) = readFSR (fsr) i would really appreciate it if you can contact me ASAP.

EdwardxMarquez
Автор

may i know what the block diagram of this ckt look like

jombieslayer
Автор

Please may someone help me with this. A response in a timely manner would be very much appreciated since I need to complete this soon. Thank you!

davian
Автор

That circuit will never work. It will always read zero as A0 is tied to GND. It should be,
The green wire from A0 should go to the other side of the resistor, 1K, where it meets with another green wire is coming from FSR.

Allindays