Pages: 1 [2] 3   Go Down
Author Topic: Higher Precision scope (Mac based)  (Read 6952 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 126
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Why do you need that faster serial baud rate ?

Álvaro
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Nobody has found mac arduinoscope app?

I need it!

Thank you

Pole
Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

it looks like best arduino scope will be now found here http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1256923269
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 126
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
it looks like best arduino scope will be now found here http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1256923269
Not best, but definitely different. Just uploaded a java testing version, please take a look.

Álvaro
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there,

I'm working on an OpenFrameworks-based viewer for the output of gabebear's super-fast oscilloscope firmware, for the non-Mac people. I'm developing on Ubuntu but OpenFrameworks code should compile on Windows (and Mac too).

The normal OpenFrameworks serial library can't seem to handle "non-standard" serial speeds (like 2Mbaud) and it doesn't let you control the DTR line for resetting the Arduino (which this firmware makes heavy use of). I've got around this on Ubuntu with a wrapper script which sets up the 2Mbaud serial speed as a "custom speed" (using "setserial spd_cust divisor 12") and makes the DTR line respond to opening and closing the serial port (using "stty hup"). I'm not sure how to do the same tricks on Windows however, any Windows serial gurus out there?

So far I've been focussing on getting the code able to read the 10bits@124khz mode of gabebear's firmware (it can go up to 3.5bit@360khz, but I haven't written code to handle the different data-format that uses). At first I had a lot of trouble consuming the data fast enough on the PC side (using an EeePC), but now with separate threads for reading and display, I get a very stable signal. By the way, this speed issue is the reason I didn't just hack on one of the Processing-based Arduino Oscilloscope projects.

At some point I think it would be worth adding some more features to gabebear's firmware, like optionally reading two channels of input (at a reduced speed).

It's still pretty raw, so I haven't made the code public, but I thought I would mention I have been working on it in case anyone was interested. I plan to put the code online somewhere when it is more usable, but PM me if you are brave enough for unusable software smiley-wink

pix.

« Last Edit: April 22, 2010, 06:45:48 pm by pix » Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Woudl you happen to have complete code of gagebear (see previous posts on this thread) ?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As far as I can tell it's all here: http://gabuku.com/scope/

pix.
Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't think gagebear's Mac App is on that server but I could be wrong !
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm pretty sure that http://gabuku.com/scope/ArduinoScope-source.zip is the source that produces http://gabuku.com/scope/Macduinoscope.app.zip .

I haven't compiled it to check though, as I don't use a Mac, but I used it as a guide to write the serial-handling parts of my app.

For completeness, http://gabuku.com/scope/arduinoScope.pde is the Arduino sketch sourcecode.

pix.
Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

ok, I use a Mac & thought you're using a Mac... Sorry
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is the code on that site incomplete? It looks pretty complete to me, but I'm no compiler smiley-wink

pix
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 126
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Pix: can I add support for my scope to your viewer ? I'm trying to drop my java version, so it would be nice to have a java viewer for it.

Some notes: You cannot get accurate ADC values beyond the specified ADC bandwitdh - which is very low (see datasheet). Regarding the FTDI drivers in Linux, I can hack one to use a different method so to extract data faster from arduino, but we're still limited to its small internal TX buffer. I cannot however do the same for the mac FTDI driver.

Álvaro
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Pix: can I add support for my scope to your viewer ? I'm trying to drop my java version, so it would be nice to have a java viewer for it.

OpenFrameworks isn't Java, it's a cross platform C++ library. But I'll have a look at your firmware, if using it will save me hacking muli-channel into gabebear's I might start using it myself. At the moment my app definitely isn't as featureful as yours seems to be.

Quote
Some notes: You cannot get accurate ADC values beyond the specified ADC bandwitdh - which is very low (see datasheet).

Yes, I take it that the real "DANGER!!!" in using the low prescale settings in gabebear's app is that they are running faster than the bandwidth of the ADC.

Quote
Regarding the FTDI drivers in Linux, I can hack one to use a different method so to extract data faster from arduino, but we're still limited to its small internal TX buffer. I cannot however do the same for the mac FTDI driver.

I looked into this a little bit (there is libftdi for linux and OSX) but as it needed root access to the device, a method of blacklisting the usb-serial module, and extra libraries to be installed, I decided against it and used the setserial/stty wrapper instead. If there isn;'t much sense in trying to read the lower prescale rates, then I'm already managing to read the data fast enough with the built in serial driver.

pix.
Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 262
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I've finally figure out how to fully compile the Mac application from http://gabuku.com/scope/.

The arduino pde compiles & load OK on my mega board.

Using Xcode on my iMac running under Tiger runs OK now but some manipulation is need to store Macduinoscope special file under Xcode hierarchy folders.

Bad news: it launches but then it abort saying
Quote
[Session started at 2010-04-23 18:24:24 +0200.]

Macduinoscope has exited due to signal 10 (SIGBUS).
Maybe it is because it is because I use Mega board & pde is made for duamilanove smiley-sad
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 126
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
OpenFrameworks isn't Java, it's a cross platform C++ library.
.

Yes, and my only cross-platform version for scope is in java, and I'm trying to drop it. I'd love it to be C++ (like the GTK+ one and pde itself).

That would allow me to use the serpro library as-is (it's also C++).

Álvaro
Logged

Pages: 1 [2] 3   Go Up
Jump to: