Interfacing arduino and matlab

Status
Not open for further replies.

abusid1170

Newbie level 5
Joined
May 13, 2013
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Chennai,India
Visit site
Activity points
1,344
Hey guys!
I am trying to read the output voltage value of TGS822 sensor using arduino's analog pins.
through serial communication i wish to plot it in the MATLAB.(I want to see the variation of the sensor value as a plot).That's my objective.
But the problem is,
*multimeter and the arduno's serial monitor shows different readings.
*normally sensor output value fluctuates between say(0.67 and .68) and it goes to next value.it wouldn't remain in a constant value.
but i dont want this fluctuation to be seen in my plot.
*if arduino shows the reading correctly ,then interfacing with the matlab stands as an another problem.It plots different values.

thanks for reply in advance.
If u hav another idea ,please putforward
 

In order to remove the fluctuation, you have two options.. one is u add a delay in ur arduino code to slow down the readings of adc.. or u could possibly use a software filter to filter out all those unnecesary fluctuations like by using a moving average filter etc..

also when u are transmitting the values from arduino, it is considered as a character stream.. u need to convert them back to integer or float..
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…