Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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
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
 

Hi,
Please have a look at the bit-rate, parity and byte length.


Thanks
 

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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top