jeromil / arduinoscope

Automatically exported from code.google.com/p/arduinoscope
0 stars 0 forks source link

More oscilloscope-ish features #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I needed triggers and faster updates so I wrote a Mac app that is similar.

main differences:
 - single channel
 - up to 360,000 samples/sec
 - triggers
    + internal rising/falling and auto
    + external via digital #12

I'm adjusting the ADC clock setting to get faster sampling and running the
serial port at 2Mbaud to handle the datarates.

I started a forum at:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1242967991/2#2

There is a video at:
http://gabuku.com/scope/scope.swf

You can grab files from:
http://gabuku.com/scope/

Original issue reported on code.google.com by gabebear@gmail.com on 22 May 2009 at 2:04

GoogleCodeExporter commented 8 years ago
Uh, this isn't really an issue. Your project looks nice, though.

You should make a google code project for it, so users can submit bug reports 
(and
advertisements like this one,) and you can host your versioned sourcecode.

I don't own a mac, so it's sort of useless for me, other then inspiration.

Mine is really more of a demo app of the oscilliscope widget I wrote for 
processing.
I think our projects have a different intended audience. Mine is a way for 
people to
make their own custom cross-platform oscilliscope, more easily.

Maybe I'll port mine to SDL, or something, so everyone can use it. 

Original comment by david.ko...@gmail.com on 1 Jul 2009 at 3:25

GoogleCodeExporter commented 8 years ago
Also, I put a link to your project in the
[http://code.google.com/p/arduinoscope/wiki/Usage Usage] wiki page. You have 
some
great ideas about getting the data transport more efficient. Maybe I'll add 
them to
my demo application, at some point.

As a sidenote, you may want to look at
[http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1208715493/11 this thread] for 
some
more ideas on speed stuff.

Original comment by david.ko...@gmail.com on 1 Jul 2009 at 4:50

GoogleCodeExporter commented 8 years ago
I've updated a couple things since then, but I haven't posted any of it yet. I 
found
a bug in my serial-receive routine which cuts my error rates way down. Only
1/1000000ish bytes is corrupted now... stupid mistake. I'm thinking about 
rewriting
the whole thing... The timing on the Arduino side could be better and it would 
be
nice to be cross-platform.

What I'm spending time on now is a subsampling mode that will allow you to see
repetitive signals up to ~1Mhz(maybe up to 3Mhz). Basically, I'm trying to 
recreate a
signal from the aliases it leaves when sampled at lower frequencies. The timing
involved is pretty exacting. I'm shooting for a 8MS/s rate where the samples 
overlap
by about 33% (effectively 6MS/s).

I've also successfully pulled off a 3Mbaud connection on a 16Mhz Arduino, which 
helps
get the data back fast enough... but it requires a frequency divider. You can 
take a
sample 300k/sec on the Arduino, but can only send bytes at 200k/sec at 2Mbaud. 
Might
be good for an oscilloscope shield, or any shield that needs super fast data
throughput to a computer.

Original comment by gabebear@gmail.com on 1 Jul 2009 at 5:41

GoogleCodeExporter commented 8 years ago
Have you ever seen anything that might make an oscilloscope shield for the 
Arduino?

A shield that just did over-voltage / over-current protection would be handy. 
The
closest thing I've seen is http://www.ruggedcircuits.com/html/mb324p.html

Original comment by gabebear@gmail.com on 1 Jul 2009 at 5:57

GoogleCodeExporter commented 8 years ago
Cool! Do you have any specs on accuracy?  I'm not sure how I would even begin 
to test
this, but it is my understanding that Atmegas uses some pretty crappy 
approximation
in their A2D, which reduces it's accuracy below 10-bit. You are also 
far-exceeding
the specs for the recommended rates, which also decreases accuracy. I figured 
it's
not too big of a deal for my applications (they aren't so fast, anyway, and not
really meant to be super-precise, on the arduino end) but at higher
bandwidths/accuracy-needs this might start to be a more serious problem.

What about something like this?
http://www.nxp.com/acrobat_download/datasheets/TDA8767_3.pdf

It would give us higher precision (12-bit), at high speeds. It includes a 
regulator,
and sample-and-hold circuit and buffering.

Combine that with a shield PCB, and some protection circuitry, possibly with 
range
knob, and you'd have a fancy little high-speed oscilloscope for cheap (compared 
to a
store-bought computer oscilloscope)

I haven't seen anything like a voltage protection shield, but it sounds pretty 
useful.

Original comment by david.ko...@gmail.com on 3 Jul 2009 at 9:07

GoogleCodeExporter commented 8 years ago
Also, have you seen this very old project?
http://xoscope.sourceforge.net/

You can use a soundcard, parallel port, bitscope or others to collect data.  
Might
provide some inspiration for both of us.

They made a nice little buffer/protection circuit for using with soundcard:
http://xoscope.sourceforge.net/hardware/hardware.html

Original comment by david.ko...@gmail.com on 3 Jul 2009 at 9:18

GoogleCodeExporter commented 8 years ago
Ya, I have xoscope installed on my laptop, but I haven't really used it. I was
thinking about buying a bitscope for awhile, which is why I checked out 
xoscope. The
Bitscope 310 looks like it is one of the best semi-expensive/semi-professional 
scopes
currently available.

I don't think strapping a better ADC to a Arduino will help much, the 
bottleneck I'm
running into is data throughput on the Arduino. While it's not exactly spelled 
out in
the datasheet, you can definitely clock the ADC at 1Mhz with minimal precision 
loss,
which will get you about 66kS/s. Even getting this data back to the computer to 
be
displayed is difficult. The resolution at 8Mhz still looks good, which gives 
~300kS/s. 

What I would like to do is strap a high-speed ADC to a pci-express slot or 
gigbit
ethernet. Some interface that is fast enough that you basically wouldn't need a
buffer to sustain several hundred MS/s.

Original comment by gabebear@gmail.com on 4 Jul 2009 at 11:57

GoogleCodeExporter commented 8 years ago
There is a cheap($12) 2.5Gbs PCIe 1x interface

http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=296-20664-ND

which gives a serial interface to 16bits @ 125Mhz or 8bits @ 250Mhz. If this 
were
paired with a cheap(~$50) high-quality serial ADC

http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=KAD5514P-12Q48-
ND

I think you would really have something. I don't have the expertise to make 
something
like that though...

Original comment by gabebear@gmail.com on 4 Jul 2009 at 12:48

GoogleCodeExporter commented 8 years ago
Hey gabebear, what licence is your arduino scope firmware released under? I'm 
working 
on an OpenFrameworks (on Ubuntu) viewer for the output and I might release a 
slightly 
modified version of the firmware too. Also, to test robustness, I modified the 
firmware to output a fixed sawtooth wave, and monitored for dropped packets on 
the PC 
side. Even though the error rate was very low, each single "error" actually 
represents a long sequence of dropped samples. Have you ever run a similar test 
on 
the Mac? Maybe the Mac usb-serial is more efficient than on Linux? On my 1Ghz 
EeePC I 
was able to get 100% accuracy in prescale-2 (124khz) in a C program that reads 
only, 
with no output unless errors are detected. If I so much as touch the mouse, the 
errors start flying in.

Original comment by thatpix...@gmail.com on 17 Apr 2010 at 11:39