Serial Data Plotting Programs - Arduino Stack Exchange
Serial Data Plotting Programs - Arduino Stack Exchange
sign up log in tour help
_
Arduino Stack Exchange is a question Here's how it works:
and answer site for developers of open
source hardware and software that is
compatible with Arduino. Join them; it
only takes a minute:
Anybody can ask Anybody can The best answers are voted
Sign up a question answer up and rise to the top
Serial Data Plotting Programs
I need to plot Serial Data from Arduino.
I require support for:
1. Various data formats (e.g. signed, unsigned, 8 bits, 16 bits);
2. Plots several data on the same axes;
3. Exports / Imports file data.
As plotting Serial Data from Arduino is a common need, my question is: What Programs/Utilities are available for plotting Serial Data from
Arduino that meet the needs above? What are the advantages / disadvantages of the method you have suggested?
serial
edited Jul 31 '14 at 22:26 asked Apr 15 '14 at 9:08
The Guy with The Hat akellyirl
1,663 2 14 43 1,131 1 5 18
I decided to reopen with your last edit. As this question stands, it seems to be on topic because it's specific. I'll be
clear to anyone (since there's not a lot of these types of questions): if this gets too off topic, I may have to step in.
However, the likelihood of that happening is rare. :) @JRobert If GnuPlot meets the requirements in the question,
post it. – Anonymous Penguin ♦ Apr 17 '14 at 20:47
1 The "Interfacing with Other Software" page on the Arduino Playground shows a bunch of ways to plot serial data
from an Arduino to an iPhone, a Windows PC, a Linux PC, etc. – David Cary Sep 24 '14 at 22:18
15 Answers
There are some good applications for visualizing the serial data, including:
MegunoLink ($29.95; Lite free) plotting, logging, programming, reporting and more.
MakerPlot ($39) digital & analog plotting, monitoring, custom interfaces and more.
http://arduino.stackexchange.com/questions/1180/serial-data-plotting-programs 1/10
27/08/2016 Serial Data Plotting Programs - Arduino Stack Exchange
ArduinoPlot (free) simple plotting.
Bridge Control Panel (free) logging, plotting, and more.
RealtimePlotter (free) 6 channels data plotting.
http://arduino.stackexchange.com/questions/1180/serial-data-plotting-programs 2/10
27/08/2016 Serial Data Plotting Programs - Arduino Stack Exchange
Real Time Serial Data Plotter (free) CSV data plotting, logging and more.
SimPlot (free) 4 channel plotting.
(This is a community wiki, you can expand the list.)
edited Feb 24 '15 at 1:34 community wiki
2 revs
niutech
I'm confused. I posted my own solution below but now I'm not sure if it wouldn't be better to edit your post since it's a
wiki. What do you think ? – Overdrivr Mar 1 at 15:51
@Overdrivr Sure, go extend this wiki for others' sake! – niutech Mar 1 at 20:47
I use Matplotlib for any plotting I need to do.
It's not arduino specific in any way, but it is a very excellent Python plotting toolkit.
I've built a number of applications that plot data from a variety of microcontrollers in realtime to
a graph, but that was really more of a twostep process: 1. Get data from device into computer,
2. plot realtime data.
Really, I think you should break your question into two parts:
How do you get data from an Arduino/Any serial device into a computer easily.
What is a good plotting library that is easy to use.
answered Apr 18 '14 at 1:13
Connor Wolf
1,834 3 14
+1. Does the "Arduino real time plot Matlab"[youtube.com/watch?v=ntHZsLmNkgw] video use that same technique? –
David Cary Sep 24 '14 at 21:27
Yep. It uses a call that reads the arduino data into a matlab variable, and then a call that updates the matlab plot with
the matlab variable. – Connor Wolf Sep 25 '14 at 0:12
Matplotlib is python, not matlab. – DaveP Feb 24 '15 at 6:33
I disagree with you, this question should not be divided in 2. There are solutions (such as the one I posted below) that
do take care of both, because it is annoying to reivent the wheel for remote monitoring and control of arduino
applications, and also because writing python code for real time plots is actually very far from trivial. Things can be
done with matplotlib but clearly there are better alternatives for that such as pyqtgraph. – Overdrivr Mar 1 at 15:48
GnuPlot
Advantages: It's very flexible, scriptable, and freely available.
Disadvantages: A bit complex to learn (but I figured out how to get started in a few minutes,
and quite functional in an hour or two), runs in a terminal window (if you consider that a
disadvantage).
Something I found very useful was to script it to reload my terminal program's logfile
periodically so i got a dynamic graph as my experiment progressed.
http://arduino.stackexchange.com/questions/1180/serial-data-plotting-programs 3/10
27/08/2016 Serial Data Plotting Programs - Arduino Stack Exchange
Edit: Here is the GnuPlot script that plots it:
#!/usr/local/bin/gnuplot -rv
# Note reverse video here ^^^ til I find a way to put it in the script
# gpFanCtl - Plots DiffThermo fan controller data (aloft, alow, Tdiff, fan-state).
# $Id: gpFanCtl,v 1.8 2014-04-28 09:40:51-04 jrobert Exp jrobert $
set grid
set ylabel 'Temperature, degC'
set y2label 'Tdiff, degC' textcolor rgb '#00CD63'
cd '/Users/jrobert/Desktop'
plot "Logfile.txt" using ($0*4):1 title "Aloft" with lines lc rgb "red",\
"Logfile.txt" using ($0*4):2 title "Alow" with lines lc rgb "#3982FF",\
"Logfile.txt" using ($0*4):3 title "Tdiff" with lines lc rgb "#00CD63" axis
x1y2,\
"Logfile.txt" using ($0*4):4 title "Fan" with lines lc rgb "orange" axis x1y2;
pause 4
refresh
reread
edited Sep 25 '14 at 16:20 answered Apr 18 '14 at 21:15
JRobert
5,101 1 6 24
1 This looks great. Could you add some demo code? – geometrikal Sep 25 '14 at 5:01
But it plots the data from Logfile.txt, not the realtime serial data. How to connect it to a serial port? – niutech Feb 24
'15 at 1:21
1 No, this script isn't "realtime" it could be up to around 4 seconds behind. Logfile.txt is the capture file output from a
terminal program. In my case, the data collection system samples and logs every 4 seconds and the GnuPlot script
replots the log file every 4 seconds. This is dynamic enough for what I'm doing with it (monitoring room
temperatures). – JRobert Feb 24 '15 at 16:18
You can try serialchart. It's pretty strait forward program. It does exactly what you asked. The
only disadvantage is that it requires data in CSV format (does not meet first point).
Screenshot from project page:
http://arduino.stackexchange.com/questions/1180/serial-data-plotting-programs 4/10
27/08/2016 Serial Data Plotting Programs - Arduino Stack Exchange
answered Sep 24 '14 at 1:10
ah01
51 1 1
Responding to my own question here.. I use Bridge Control Panel as mentioned.
Advantages: Lots of Features.
Disadvantages: Tricky to setup and very poor syntax/error reporting.
To use: You need to write the Arduino Data over the Serial Port one byte at a time. For an int
data type that would look as follows:
In Bridge the command to Read Data is:
RX8 is the read command [h=43] means the next valid byte is "C" in ASCII then the High Byte
of Key1 then the Low Byte of Key1
It looks like this in Bridge:
http://arduino.stackexchange.com/questions/1180/serial-data-plotting-programs 5/10
27/08/2016 Serial Data Plotting Programs - Arduino Stack Exchange
answered Apr 15 '14 at 9:16
akellyirl
1,131 1 5 18
You might be interested in Telemetry See on Github . It is a communication protocol, highly
simple to use, with a clean interface, that enables bidirectionnal communication with
Arduino/Mbed devices.
If you don't want to read this long post, see A walkthrough of all the awesome features in it
The power of this library comes from the desktop command line interface (that requires no
programming skills in python).
It is able to open highperformance plots (much higher that what can be done with matplotlib)
just by typing a command.
The protocol supports complexes data structures. For now arrays and sparse arrays can be
send from the embedded board.
The plots opened from the command line interface understand the type of data, and for arrays,
rather than plotting each sample versus time, sample will be plotted against its own index.
In a near future, it is planned to add support for spatial coordinates (xyz data), that will allow
you to plot immediately spatial data. Once, again the plots will figure everything out, plot your
data in 2D or 3D space and you can focus on developping your app.
I believe those features are simply unique for such a project.
pypi package 1.1.0
Pytelemetry CLI
Once installed with pip, the command line can be started with
pytlm
http://arduino.stackexchange.com/questions/1180/serial-data-plotting-programs 6/10
27/08/2016 Serial Data Plotting Programs - Arduino Stack Exchange
Get started
Wiki
PS : I am the author.
I developed it because I could not find a solution that would allow me to:
write quickly PC scripts to control an Arduino
debug quickly
plot complex data (not just a time varying value)
all of the above without using proprietary solutions or bloated GUIs.
Using this library, the time to setup a communication between Arduino and PC went from
usually half a day to 5 minutes.
answered Mar 1 at 11:07
Overdrivr
145 5
PS: logging of the serial port data in the python packages (raw data and decoded data) is also fully supported. I intend
to use it to implement an offline replay function (simulate serial data flow) – Overdrivr Mar 1 at 15:45
Nobody had mentioned Processing which is super versatile. You can do a lot more than just
plotting but if that's all you want to do you can use the gwoptics library; hook up Arduino and
Processing as directed here.
edited Mar 1 at 17:15 answered Feb 29 at 20:20
Avamander ♦ Sebastian Zeki
379 5 29 136 5
I made an equivalent tool in python that print real time data from ADXL345 accelerometer.
https://github.com/mba7/SerialPortRealTimeDataPlotter
may be it will be helpful for someone
http://arduino.stackexchange.com/questions/1180/serial-data-plotting-programs 7/10
27/08/2016 Serial Data Plotting Programs - Arduino Stack Exchange
Just choose the serial com and speed and sent a serial data on the following format:
3 inputs, every input is a 2 bytes (Two's complement )
6 bytes seperated by a space
the packet is a string terminated by '\n'
Could be easily adapted to change this format
edited Sep 29 '14 at 10:24 answered Sep 21 '14 at 15:09
mba7
21 2
Can you explain how to use this, and what the advantages and disadvantages of this are? – The Guy with The Hat
Sep 21 '14 at 23:17
You can try out the software I developed for that propose. It's aimed to be easy to use. See
SerialGraphicator Open Source Free Serial Port Client capable of graph values that are
received in JSON format.
edited Feb 21 at 4:58 answered Feb 21 at 4:50
Greenonline newtonis
1,184 3 6 30 21 1
While I haven't used it myself, "rqt_plot" running on the PC seems to be a popular way to plot
data on a PC that comes over a serial port from an Arduino running a sketch that includes the
rosserial_arduino library or the ros_arduino_bridge library.
Arduino Oscilloscope Tutorial
rosserial arduino
visualize everything using rqt_plot... my first arduino micro ros project
"7/24: Now that I have the Arduino set up using Kessel, I can visualize the data better
using ROS tools"
etc.
answered Sep 24 '14 at 22:06
David Cary
659 3 10
CSV format is most versatile for any data (signed/unsigned, various size and precision).
Crossplatform (written in Java/Scala) tool Scsvlog can receive/parse CSV strings from serial
port / socket, show values and draw charts (up to 8).
edited Nov 13 '15 at 17:57 answered Nov 10 '15 at 15:33
Greenonline ed82484954
1,184 3 6 30 11 2
http://arduino.stackexchange.com/questions/1180/serial-data-plotting-programs 8/10
27/08/2016 Serial Data Plotting Programs - Arduino Stack Exchange
You can use MATLAB Student Edition, this can save your time for further analysis, too. You
can just open the COM port in MATLAB and plot the received signal and/or save the signal in
the workspace or whatever. MATLAB makes everything easy!
edited Feb 23 '15 at 19:12 answered Jul 31 '14 at 8:09
niutech AHKh
203 3 5 19
2 Welcome to Arduino SE! Can you please edit your answer to add more information describing how it fits the OP's
needs and maybe a little other information like a link or a photo? Thanks! – Anonymous Penguin ♦ Jul 31 '14 at 13:58
I know this is a very old question, but I recently created a mac application that solves this
problem very well. You can find more information about it on www.bloonapp.com. There are
some demo videos on the website that you can check out.
answered Aug 4 at 16:43
Jazawe
1
I know you were probably after more advanced GUI output, but I managed to replicate a task
that one would normally do with an oscilloscope:
using the serial plotter in the Arduino IDE and an ADC module you can get for $3 on eBay. I
admit it's a bit crude, but it might be worth playing with the tool for a while, before you invest in
Python/Matlab/ect level solutions. It was exceedingly easy to use. It would not take much to
add SD card recording to the process.
See: https://edwardmallon.wordpress.com/2016/08/15/usingthearduinounoasabasicdata
acquisitionsystem/
answered Aug 17 at 18:43
Ed Mallon
11 1
almost useful. needs
1. logging serial data to a file OR
http://arduino.stackexchange.com/questions/1180/serial-data-plotting-programs 9/10
27/08/2016 Serial Data Plotting Programs - Arduino Stack Exchange
2. graphing from a file and updating every xxx milliseconds.
Live Graph is a better option and i use it in conjunction with tera term which gets the data via
the USB/serial link (and saves it to a log file which then Live Graph polls).
Live Graph is slightly buggy when caching data and i haven't found a way to set a moving
window to display results. also, showing multiple graphs requires manual scaling, but in spite
of all this, it's still very useful. it's written in java so you'll need the JRE. i prefer this over having
to install python like some of the other graphing programs do. another downside is that it
opens 4 different windows, which is a pain when i want to flip between it and tera term.
i've yet to find software that's
1. an executable (.EXE) so it has no external reliance
2. includes a terminal emulator or serial data logger
3. logs serial data
4. graphs multiple items from a csv
5. allows for csv AND tabdelimited data (which is way easier to read as it scrolls along while
simultaneously monitoring the graph.
6. allows setting of different scales for each overlaid graph without having to scale everything
to [0..1] or setting a multiplier, i.e. allowing setting an [y0..y1] range for each item graphed.
edited Mar 1 at 16:34 answered Feb 29 at 5:33
mahesh
1 1
1 Welcome to Arduino SE! Your answer is informative but could you please improve the formatting of the answer using
the markdown guide you can view by pressing the ? button in the editor. – Avamander ♦ Feb 29 at 15:15
http://arduino.stackexchange.com/questions/1180/serial-data-plotting-programs 10/10