Go Down

Topic: Higher Precision scope (Mac based) (Read 7544 times) previous topic - next topic

Alvaro

Why do you need that faster serial baud rate ?

Álvaro

pole

Nobody has found mac arduinoscope app?

I need it!

Thank you

Pole


Alvaro

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

pix

#19
Apr 23, 2010, 12:57 am Last Edit: Apr 23, 2010, 01:45 am by pix Reason: 1
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 ;)

pix.


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

pix

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

pix.

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

pix

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.

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

pix

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

pix

Alvaro

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

pix

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.

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 :(

Alvaro

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

Go Up