Arduino FIO 2 Channel LCD Oscilloscope

After using my Arduino Fio to make an Arduino LCD oscilloscope, I wanted to try adding a second channel. Using the single channel Arduino FIO LCD Oscilloscope code as a template, I modified the project and added a second channel.

Arduino-Fio-2-Channel-LCD-Oscilloscope

Here’s a short demonstration video of the new two channel project:



Click through the break to check out the code.

The project used an Arduino Fio (available on Amazon.com) and the mini12864 128×64 pixel graphical LCD (available on dx.com & Amazon.com).

The basic modification was to include a second set of variables that is used to store the second channel’s readings. A more elegant solution would have been to make each variable an N-channel array (so that one could easily scale to more channels), but the low-resolution monochrome display really limits the possibilities, unfortunately. In addition, the sampling rate for the single channel oscilloscope was already quite low (with a maximum sampling rate of approximately 28kHz), but two channels could allow for some interesting possibilities as long as one can deal with the slower acquisition speed.

The display refresh is triggered by a rising signal (useThreshold == 1) on the channel A input (analog pin 7, as defined by theAnalogPinA = 7), but you could easily modify the code to make this switchable so that either channel acts as the trigger. The code is very similar to my previous code, including the serial port parameter controls, so I recommend taking a look at that post first, if you have any questions: Arduino FIO LCD Oscilloscope

As with the previous single channel project, you need to make sure that you have the u8glib library installed to compile the code.

Here’s the Arduino sketch for the oscilloscope:

3 thoughts on “Arduino FIO 2 Channel LCD Oscilloscope

  1. Thank you very much for sharing this. Nice work and very useful. I got it working on arduino uno on a cheap, no-name chinese LCD 128×64 screen (model: 12864zw) with literaly minor changes in your code. Modifications with your code were just to support my screen and some replacement strings for html special codes(copy+paste issue i guess :)).

    In order to support the cheapo lcd 1264zw I’ve used the instructions given here:
    http://www.bajdi.com/cheap-128×64-graphic-lcd-12864zw/

    Thanks a lot and if you want me I would be willing to post a video, pics and links … just say so 🙂

Leave a Reply