MATLAB Arduino Tutorial 16 - Force Sensitive Resistor (FSR) Calibration and Visualization
ฝัง
- เผยแพร่เมื่อ 4 พ.ย. 2013
- 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.
For more details visit matlabarduino.org
Configuration:
- Matlab R2012a
- Arduino 1.0.1
- USB 2.0
- Force Sensitive Resistor (FSR)
Read more about this channel here: goo.gl/QghhbN
I just tried the code and it is working perfect. Thanks so much...
hi do you have the code? can you send it to me nabill.uthm@gmail.com tq
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') ?
Are you suppose to run all of the m files in the order that you introduced them or just run the fsr.m file?
Can you do a tutorial for rpm sensor?plot a rpm graph versus time.?
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 :)
Congrats for the video. Where can I get matlab codes please? Thanks
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!
may i know what the block diagram of this ckt look like
do you write programs ?
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?
is it work on window os
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.
hi amir do you have the code? can you send it to me nabill.uthm@gmail.com tq
hello friend I wanted to know if you can give me the complete code to execute it is that it does not work for me I already tried it and I have no results
interesting...🤔 would like more details and can this be done using a free version of matlab? 🙂 for a hobby budget. 😏
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
Did you use arduino and simulink?
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!
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.
Hi! We are trying to do this and we are having the same problem! Do you already know how to solve it?
The error seems to be: The 's' property name is ambiguous for serial port objects.
Many thanks!!
yeah i did this with a team for my senior project for college.
What do you need?
Ana Silva Hi! I'm actually having the same problem. Did you finally solved it? I know it's been a while since you post this but I would really appreciate any help.
Thank you!!
+Edward Marquez I'm having the same problem as well, are you able to help?
I had the same problem but fixed it by wiring it up differently. The way it is shown at the beginning of the video means that the AD0 pin is always 0V. It needs to be wired up like a potential divider with the AD0 pin reading between the FSR and the resistor.
Another way to think of it is to have the resistor between ground and AD0
Hi Matlab Arduino,
I tried these codes and it works for me. Would you mind If I share the codes on GitHub?
The green wire should connect A0 and the right hand side of the resistor. (In the tutorial: the green wire connected A0 and the left hand side of the resistor)
Sir, please, i need the code
Be the first to know about our new venture - www.pythonarduino.org
+Matlab Arduino -74% coupon to Learn Matlab Udemy course
Couponcode: ML25
www.udemy.com/learn-matlab/?couponCode=ML25
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.
Yeah... that's what i though as well!