BASIC digital"oscilloscope"/logic analys

Yes... I've checked the archive!

Has someone invented this wheel already?

In another post, I told someone to try to look at something with an oscilloscope. Ha! There are a lot of people who won't have access. Why not make an "oscilloscope" with an Arduino?

"All" we need for some jobs is a way to take a high resolution snapshot of the ons and offs of one (or two or more!) digital signal. Shouldn't be hard?

I'm not looking for something that could give a real time display.

A "trigger on first edge" feature would be nice. Should be possible to offer user choice between the first positive or first negative edge, yes?

Even a "character graphics" output would do, e.g....

----___

(Maybe ...---..---..--- would be better, even though less visually appealing? Easy to count "offs", and width of characters more similar.))

So! Has this been done? In a SIMPLE form? (There are some nice, more complex answers out there.)

I'd rather not have to "fool with" more than the basic Arduino IDE on my PC, which I would expect to be part of the SIMPLE digital "scope" answer.

You mean a logic analyser? (sometimes mispelled "analyzer")

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1258704574

Yes... that would be the proper name for what I was thinking about... but I was looking for a simpler implementation. My implementation might be TOO simple to be of any use, but it would cost (next to) nothing to try. I think, for instance, that even my basic logic analyser would help the person with the questions about his RF xmitter/receiver pair.

Congratulations to those with the energy to produce quality items, like the one the earlier link points to, none-the-less!

Has someone invented this wheel already?

Many many times.

Just put "arduino scope" into google. There are lots of variants from stand alone with simple LED displays, dot matrix displays and even LCD displays.
The the simplest type are those that have an arduino and Processing contents where the arduino gathers the samples and ships them off to the PC to display them.

sometimes mispelled "analyzer"

This must be one of those "british" things; what is interesting is, that if put into Google, it will ask if you wanted "analyzer" if you put in "analyser"; but the first hit for "analyser" is a wiki article, with a sub-hit wiki article on "spectrum analyzer"...

bah - spell it how you want; maybe look both up!

:slight_smile:

As far as your question is concerned, tkbyd, as others have noted, many people have done this. I was just looking this up a few days ago, and found this interesting version:

http://www.arduino.cc/playground/Main/LogicAnalyzer

Which seems to do direct-port reads using inline assembler in what is known as an "unrolled loop" fashion for maximum speed (only 1024 samples, though - but of 8 pins per sample, it looks like?).

Many other examples can be found - also google "arduino logic analyzer" for several hits.

Something to realize is that a logic analyzer is not necessarily the same as an oscilloscope; they both measure waveforms, but the logic analyzer is more concerned with a number of waveforms (digital square waves) and their timing in relation to each other, while an oscilloscope measures characteristics about the wave and its form itself over time (perhaps in relationship to other input waves as well, though once you get past 2 channels, scopes get really, really expensive - I've seen some four-channel scopes that would have you mortgaging your house; most oscilloscopes you see though are 2 channel max, with maybe a third "Z" channel on occasion - generally for triggering).

As you can tell, you can build such a scope (logic analyzer or oscope) with an Arduino, and there is enough speed available to make it useful for sub-MHz measurements; you might even be able to approach the MHz barrier if you set certain limits and write very tight assembler code (I would look at Udo's example above as a model), but ultimately the ATMega8/168/328 is limited for the task.

Things get much more interesting though, as you move up the ladder of Atmel's offerings. For instance, the JYE Tech oscilloscope uses such a better processor (can't recall which):

http://www.jyetech.com/Products/LcdScope/eDSO062.php

It has (supposedly) 1 MHz of bandwidth for $49.00, which is a steal for a single channel scope. For most hobby uses, this is enough. Plenty for checking servo timings and the like.

If you want to go beyond this, though, you have to spend some money, unfortunately (though there are plenty of options available under $500.00 - both standalone scopes and USB scopes - in the 10-40 MHz range).

:slight_smile:

Hi,

My first post, so nothing on Arduino yet.
But I DID stumble on another promising approach
for a logic analySer :wink: or even a full blown digital
oscilloscope.

you can create one using an FPGA and high speed ADC.
and there seems to be one that is feasible for nitwits
like me, and within my budget.
In fact I bought one a long time ago.
100 Msps !!

sorry, no link on first post.
I got it here :
http://www.fpga4fun.com/Hands-on_Flashy.html