Linux+Arduino open oscilloscope – Lxardoscope

lxardoscope

LXARDOSCOPE is an Arduino based oscilloscope for Linux, using the Xforms library.  This project that lets you use an Arduino as hardware input for a Linux-based oscilloscope display.  If you have a Arduino Main board that’s perfect, and you can direct start this project.

“LXARDOSCOPE is a software implementation of an oscilloscope in LINUX, using an Arduino UNO for data acquisition. The graphical interface was designed to be as intuitive as possible for users who are familiar with traditional hardware oscilloscopes….” wrote by Oskar Leuthold who provided LXARDOSCOPE  to us.

I just did some simple testing for it. Although he already has detailed the steps in README,  I’m going to add some missing or error-prone areas for beginners.

Beginners User Guide:

 Step one :  Material preparation

  • Linux version – Ubuntu8.04,  Oskar’s the program was been developed  tested on  Mint9 (32bit) with an Arduino UNO.  So we test on Ubuntu8.04. You also can use above version.
  • Arduino main board.  we used Freaduino with ATMega328 (100% Arduino compatible), which could direct used in this project. Actually you can use any Arduino main board.  Oskar is using an Arduino Uno for his testing. You’ll need to remove the ATmega chip from the Arduino board after flashing the code to it, and then build a circuit around it which includes a power source where -2.5V is ground and 2.5V is VCC. All in all, you’ll need a 16 Mhz crystal, HEF4069 hex inverter, ATmega8-family microcontroller, and a few passive components to build this on a breadboard……. This is a Low-cost solution, however not suitable to beginners which not so much hardware experience.

 

 Step two: Ubuntu LXARDOSCOPE  preparation

The downloaded file contains executables, which might work on your computer. After unpacking the downloaded file, check whether libforms.so exists on your computer:

  •  ls /usr/lib/libforms.so*.

If libforms.so does not exit, install

  • sudo cp libforms.so.1 /usr/lib
  • sudo ln ­s /usr/lib/libforms.so.1 /usr/lib/libforms.so 

To start LXARDSCOPE, type in the working directory:

  • ./lxardoscope 

For a general installation, type either

  •  sudo make install or sudo cp lxardoscope /usr/local/sbin 

system wide start command is

  • lxardoscope  

If libforms.so has exit, please also instead of the old library. You can backup the old library and then copy it.

  •  sudo mv /usr/lib/libforms.so.1 /usr/lib/liborms.so.1.bak

Step three: How to get started ??

Oskar wrote: ”

1. choose serial port at startup: type ” lxardoskope /dev/ttySX ” with X being the device number. The program tries to initialize this serial port, but others can be selected later.
2. choose serial port on GUI: type ” lxardoskope ” . After starting up, the “Device” pulldown of the GUI is populated with the port choices available from the /dev directory.  ”

That no problem, but if you direct use Arduino main board, please note there not use /dev/ttySX, but /dev/ttyUSB0. Mostly of Ubuntu kernel has the FT232 driver(FT232 is Arduino’s USBtoSerial chip).  You need make sure it as below:

  •  tail-f/var/log/messages 

Looking for the following message:

  • Oct 18 15:32:53 Ubuntu8 kernel: [75191.124294] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0

If you find similar as ” ftdi_sio” message, that’s means there is driver already. If not, please re-plug the USB and Arduino main board times or you need install the FT232’s Linux driver.

After you connect Arduino main board and install dirver. Let’s start the project. Please type:

  • sudo lxardoscope /dev/ttyUSB0   or   sudo ./lxardoscope /dev/ttyUSB0

On success, the START button under the waveform area is enabled. Click it to start acquiring and displaying the data. The pulse indicator changes color from grey,  and then blinks in response to the serial data stream from the Arduino.

At least some horizontal lines should be displayed, maybe already some waveforms. Then make the necessary adjustments to the timebase and vertical scale and position, as on a conventional oscilloscope.

In display mode ADD, position and scale are taken from channel 1; entries for channel 2 are disabled. In display mode X-Y, the selected trigger channel is  displayed in horizontal direction (independent whether triggering is enabled or not)……

LXARDOSCOPE starts up with 3000 samples per second.  It’s really not fast, but worth to play.

More details please reference README in lxardoscope_0.8.tar.gz.

 

VN:F [1.9.13_1145]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)

Related Posts

Go To Top