How to plot serial data from Serial port or Arduino

Sometimes there is a need to visualize data from serial port in real time, like I had in my USB Accelerometer sensor project. The goal can be reach hard way by writing your own software but there is no need to do so. Smart people already write many good and free solutions and in this post I want to show you how to use them in your electronic project. For these who want to code this functionality by their own I will show how to plot serial data in Python and Matlab at the very end of this article.

1. SerialPlot

SerialPlot is my favorite project that has many configuration features and it is easy to use. It is a Qt based software for plotting data from serial port in real time. It can be installed in Linux and Windows! Here is the hackday website of the project:

SerialPlot accepts 3 different types of data input:

  • Simple binary stream, supports different number formats (unsigned/signed – 8/16/32 bits and float)
  •  ASCII data in CSV format
  • User defined custom frame format (frame start byte, frame size, checksum etc..)

2. CuteCom

CuteCom is a graphical serial terminal, like minicom. It can not plot the data but it is very useful for debugging and communicating with embedded device. Currently it runs on Linux, FreeBSD and Mac OS X. Website of the project


USB accelerometer sensor, tilt sensor

Nowadays everyone has accelerometer sensor in its own smartphone. It’s there for several reasons. First of all it’s used for detection of screen orientation relative to the gravity field. This is the sensor which gives your phone information when the screen should be switched from landscape mode to portrait. Beside this there are many other ideas how to use accelerometer.

One of them is pedometer. An app or device which uses accelerometer to track your steps. Application tries to analyse real time data from sensor to find peaks witch corresponding to human steps. Knowing average step length the program is able to calculate traveled distance.

Some guy from Hackday even made mechanical vibrations spectrum analyser using accelerometer and fourier transform decomposition. As you can see usefulness of this type of sensors is bounded only by your imagination 🙂

Such sensor may work as spirit level or angle reader to make something like ball on plate controlling machine just like this one bellow.

I though that it would be nice to have such a sensor in ordinary PC or Rasperry Pi computer for similar purposes so I designed one. My version is small, compact and Plug & Play.  You don’t need any Arduino or embedded coding. It’s just Plug & Play device which communicates with computer by USB port. If you are interested you can purchase it in electromake store.

USB Accelerometer fatures

  • The device uses well known ADXL345 accelerometer
  • USB bus communication
  • USB powered
  • This USB dongle following ADXL345 has user-selectable resolution
  • Fixed 10-bit resolution (from -512 to +511)
  • It is compatible with Linux and Windows OS
  • It is compatible with Raspberry Pi