Pages: [1] 2 3   Go Down
Author Topic: arduino oscilloscope, a nice one :-)  (Read 21864 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 1
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I wrote a nice front end that works with arduino and also Parallax USB scopes..

more info:

http://codinglab.blogspot.com/2010/09/arduino-oscilloscope-and-parallax.html

Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5570
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This is pretty cool - I might have to try it out. I currently have a Tek 2213 analog scope, but I also have a couple of the Parallax scopes, and the only thing holding me back from using them was the fact of no software for Linux, other than some Python (or was it Perl?) code I found.

I thought about writing my own driver/software using the code I did find as a base, but I have yet to even think about getting 'round to it...

This sounds like it might be interesting to play with! Thanks for posting it!

 smiley
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Portugal
Offline Offline
God Member
*****
Karma: 6
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the biggest frequency that you can get with an arduino?
Logged

Melbourne, Australia
Offline Offline
Full Member
***
Karma: 1
Posts: 226
Cyborg-in-progress
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Nice. That software + firmware would drop right on to the hardware described in this project: http://www.practicalarduino.com/projects/scope-logic-analyzer

I'll add a link to your project from that page in a moment.
--
Jon
Logged

Portugal
Offline Offline
God Member
*****
Karma: 6
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

But the atmega 328 datasheet clearly states that the adc clock must be between 50Khz and 200KHz, how can this code put and the adc at 1Mhz and still get good values?
Logged

Melbourne, Australia
Offline Offline
Full Member
***
Karma: 1
Posts: 226
Cyborg-in-progress
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
how can this code put and the adc at 1Mhz and still get good values?

It's a trade-off. It's all explained in detail starting around page 194 of "Practical Arduino", but the basic summary is that the MCU's ADC is rated for optimal precision with a clock between 50 and 200KHz, but is designed to handle up to a 1MHz clock with minimal degradation. The ADC uses a successive approximation technique to read each bit of resolution sequentially, and changing the pre-scaler to force the ADC clock right up to 1MHz makes it complete each sample *much* faster (16 microseconds per read instead of 111 microseconds) at the cost of a little accuracy.

All the details (and explanation of how to manage the ADC pre-scaler flags) are in Practical Arduino.
--
Jon
Practical Arduino: www.practicalarduino.com
Logged

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

And going back to the original topic....

Has anyone tried it yet? was it easy to use?  I'd like to hear your feedback...

Thanks!
« Last Edit: September 30, 2010, 06:42:21 am by xchip » Logged

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

Some traffic stats about my post:  (yeah kind of off topic)

From the 300 people that read this thread only 100 went to my blog entry, and from there only 45 went to the project page..

I hope this stats are helpful to you, one would expect that 100% of the people that read this post bother to click twice in order to read the full details...
« Last Edit: September 30, 2010, 11:52:51 am by xchip » Logged

SF Bay Area
Offline Offline
Full Member
***
Karma: 1
Posts: 182
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks nice.

I have something similar, but rudimentary, working in Processing. I would have been tempted to try it, if it was in java as I have other code in java that I'd like to take advantage of.
« Last Edit: September 30, 2010, 12:11:40 pm by oscarcar » Logged

0
Offline Offline
Jr. Member
**
Karma: 4
Posts: 65
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

wow, good timing.  I'm learning Arduino and electronics at the same time.. the first thing I wanted is some kind of logic analyzer and scope.

I have Jonathan's excellent book and have been working to tweak the Processing to my liking....this will speed my progress.

thanks!!!
Logged

Kauai
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Amani 64 CPLD Shield
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow really nice!  A good use for my old arduino!  smiley
Logged

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

that's so sweet!
Logged

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

can't open the .pde file here...

got this error:

Code:
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0
      at processing.app.Sketch.setCurrentCode(Unknown Source)
      at processing.app.Sketch.load(Unknown Source)
      at processing.app.Sketch.<init>(Unknown Source)
      at processing.app.Editor.handleOpenInternal(Unknown Source)
      at processing.app.Editor.<init>(Unknown Source)
      at processing.app.Base.handleOpen(Unknown Source)
      at processing.app.Base.handleOpen(Unknown Source)
      at processing.app.Base.handleOpenPrompt(Unknown Source)
      at processing.app.Base$3.actionPerformed(Unknown Source)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
      at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
      at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
      at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
      at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1225)
      at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1266)
      at java.awt.Component.processMouseEvent(Component.java:6263)
      at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
      at java.awt.Component.processEvent(Component.java:6028)
      at java.awt.Container.processEvent(Container.java:2041)
      at java.awt.Component.dispatchEventImpl(Component.java:4630)
      at java.awt.Container.dispatchEventImpl(Container.java:2099)
      at java.awt.Component.dispatchEvent(Component.java:4460)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
      at java.awt.Container.dispatchEventImpl(Container.java:2085)
      at java.awt.Component.dispatchEvent(Component.java:4460)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Logged

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

the PDE is not Processing code, is arduino code.

Let me know how it goes...
Logged

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

i know that pde is arduino code, the error is from the arduino IDE
Logged

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