Forum Rule: Always post complete source code & details to reproduce any issue!
Page 1 of 2 1 2 LastLast
Results 1 to 25 of 43

Thread: Teensy 3 as a osciloscope and logic analizer.

  1. #1

    Teensy 3 as a osciloscope and logic analizer.

    After endless searching for a cheap oscilloscope for small hobby projects I came across the following link.
    http://www.gabotronics.com/developme...-xprotolab.htm

    I noticed he's using a Atmel 32 16MHz..
    Got me thinking if my teensy3.0 could do the same?
    If anything it should have more resolution and accuracy right?
    Could really use some advice.
    Last edited by Xeon; 08-06-2013 at 04:37 PM.

  2. #2
    Senior Member Constantin's Avatar
    Join Date
    Nov 2012
    Location
    In the yard with a 17' Dia. Ferris Wheel
    Posts
    1,408
    I would not bother. IMO, you need to take a long hard look at what you need and then buy the hardware to fit the need. If it costs extra, so be it.

    For example, I bought the QA100 mixed oscilloscope from QuantAsylum. A unit with great specifications hobbled by a horrible UI. I am still kicking myself for not plunking down a little extra cash and buying a proper Oscilloscope and a separate Logic Analyzer. Similarly, I seriously question the stated results of the ADC in the K20 ARM chip - you'd probably be lucky to get anything near that and then only if you have done a lot of on-board conditioning to get the signals into a format that a SAR ADC like the one in the K20 can handle. I went with a dedicated ADC instead, have not looked back. Less cost, better performance.

    Then the question becomes how much time you want to spend developing tools vs. other projects. There is nothing wrong with developing tools - many machinist apprentices learn the hard way how to make perfect cubes, etc. But I'd rather spend the time working on projects that interest me, leave tool development to others. The key thing is to understand what kinds of tools are needed in the first place. Ie. being somewhat familiar with issues such as Mr. Nyquist when it comes to sampling data, etc.

    For example, despite the relatively low max sampling rate of 24MHz, I find the Saleae Logic 8 to be a great logic analyzer, even if the current Linux implementation is terrible (ask Paul). On the Mac, the thing is intuitive, easy to use. Some Asian outfits even produce knock-offs that use the same hardware but ask you to download the software from Saleae (something I don't do or condone - how else encourage folk to develop that kind of software / hardware?)!!! ... for the same cost as your display there.

    Saelig.com offers a wide range of Oscilloscopes and analyzers. Have a look at the reviews / etc. there to see which one fits your needs best. Like a good camera, a good piece of equipment won't make you an expert user overnight but it improves the chances that you'll get it right.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,821
    For an oscilloscope, the low-end Rigol DS1052E scope at about $320 is probably the least expensive scope available today that's genuinely useful for a wide range of projects. It may seem tempting to buy something for only $50, but my advise would be to just save up for a real scope.

    Probably the cheapest scope available today that offers pretty good performance would be the Agilent DSOX2004A, at about $1900. 4 channels, a fast waveform update rate, a reasonably long record length, and fast user interface really are incredibly useful features. A "large" screen (large by oscilloscope standards anyway) is also pretty useful. Sadly, nobody makes such a thing in the hobbyist or student price range.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,821
    Last edited by PaulStoffregen; 08-06-2013 at 09:33 PM.

  5. #5
    Senior Member Constantin's Avatar
    Join Date
    Nov 2012
    Location
    In the yard with a 17' Dia. Ferris Wheel
    Posts
    1,408
    Quote Originally Posted by PaulStoffregen View Post
    Dave's a great resource, no wonder he's become as popular as he has with his online tutorials, reviews, and so on.

    I do wonder though whether the 2000 series isn't complete overkill for a hobbyist. I guess it depends on the kinds of signals one is trying to process! I am currently tempted by a slightly different scope, the SDS7102. It offers a bigger screen than the Rigol 1102 or 1052 it competes against, can be operated from a battery, and otherwise has pretty similar or better specifications, as best as I can tell.

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,821
    I have not personally used an Owan scope. Is there any info about whether it does intensity graded rendering (aka "digital phosphor") and the number of wafeforms/second it can process?

    It claims to have a 10M record length. I wonder how its speed is while using longer records? On high-end scopes like an Agilent 3000/4000, the scope always uses the full record length. You can't even tell them to use less (or if there is any way, I've never seen it... and I have spent quite a bit of time using those scopes). At any time, you can press stop or if the trigger source stops, you can do deep zooming because it captured a high speed to the full record length. But on cheaper scopes, they make it menu option, where you'll typically use a short length so the scope is more responsive. Budget scopes can run slowly when using more memory. Usually the full memory is only used for a single-shot or segmented capture you set up in advance and do once. You might have noticed in that video that Dave used both scopes, even the DS2000, mostly with only a small fraction of their full memory.

    My point is just because a budget scope has impressive specs on a feature list doesn't necessarily mean it really implements those features in the very useful ways. Buyer beware.

  7. #7
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    I bought a Hantek DS2090 - it's a box with a USB connection to a PC which does the display and GUI.
    Bought direct from a China seller for $149. I see them on eBay now for even less. http://www.ebay.com/bhp/dso-2090
    It's excellent. Omitting the built-in color LCD saves bucks.

  8. #8
    Let me put it this way.
    Other people have girl friends, family, kids, wife's.

    I have free time and electronics.
    In any case.. no fun unless u learn something.

    Sorry i'm a bit noob-ish but i'm a quick learner.
    I just want to try make some tools of my own.

    I really cannot afford a expensive oscilloscope.
    And many of the cheap ones are lacking simple features.
    Last edited by Xeon; 08-07-2013 at 07:51 AM.

  9. #9
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    I bought a used Owon 5022s for $225 off of eBay and it has served its purpose (and continues do do so) in helping to solve I2C bus issues. That's what I bought it for!
    Dave's eev blog is an excellent source and I really enjoyed the video, but my comment would be that what tool is needed depends on the job at hand. The Owon did for me what was needed but more complicated waveforms and higher frequency stuff would definitely require a better instrument. That's what eBay is for. Get yourself something used and reasonably priced and see if it fits your needs, and if it does not then sell it and get something better later.
    It apparently does not make sense to pay high dollars for higher end features in an Oscilloscope that you may only need in a few years (once your expertise has increased to the level that you can actually use these features) as features can be had for much less money down the road.

  10. #10
    Quote Originally Posted by Headroom View Post
    I bought a used Owon 5022s for $225 off of eBay and it has served its purpose (and continues do do so) in helping to solve I2C bus issues. That's what I bought it for!
    Dave's eev blog is an excellent source and I really enjoyed the video, but my comment would be that what tool is needed depends on the job at hand. The Owon did for me what was needed but more complicated waveforms and higher frequency stuff would definitely require a better instrument. That's what eBay is for. Get yourself something used and reasonably priced and see if it fits your needs, and if it does not then sell it and get something better later.
    It apparently does not make sense to pay high dollars for higher end features in an Oscilloscope that you may only need in a few years (once your expertise has increased to the level that you can actually use these features) as features can be had for much less money down the road.
    Ah I understand.
    Well considering my idea's I don't really need a massive scope.
    I would love to own a proper scope but it's way out of my budget limit.

    Building a small scope using a 164x128 tft lcd and a teensy 3.0 sounds like fun.
    Last edited by Xeon; 08-08-2013 at 12:52 PM.

  11. #11
    Junior Member
    Join Date
    Aug 2013
    Posts
    4
    Hi,

    May I suggest you have a look at this page: http://www.mccauslandcenter.sc.edu/C...s/oscilloscope

    Lots of cool stuff there, although I prefer the idea of a Firmata based scope such as this: https://github.com/konsumer/arduinoscope
    Unfortunately, as far as I can tell, Firmata on the Teensy 3 doesn't seem to support the resolution or speed hinted at on the former page.

    Honestly, this (Arduinoscope + resolution and performance of Teensy 3) would be more than enough for me for what I currently do, and I could tweak the client software with whatever features I wanted after I got past the initial learning curve. And most importantly it would be free, as I already have a Teensy 3 and cannot afford to spend any money for the foreseeable future.

    Regards,
    Michal

  12. #12
    Quote Originally Posted by michal View Post
    Hi,

    May I suggest you have a look at this page: http://www.mccauslandcenter.sc.edu/C...s/oscilloscope

    Lots of cool stuff there, although I prefer the idea of a Firmata based scope such as this: https://github.com/konsumer/arduinoscope
    Unfortunately, as far as I can tell, Firmata on the Teensy 3 doesn't seem to support the resolution or speed hinted at on the former page.

    Honestly, this (Arduinoscope + resolution and performance of Teensy 3) would be more than enough for me for what I currently do, and I could tweak the client software with whatever features I wanted after I got past the initial learning curve. And most importantly it would be free, as I already have a Teensy 3 and cannot afford to spend any money for the foreseeable future.

    Regards,
    Michal
    Ahh handy links there thanks.

  13. #13
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    Is the USB 'scope as in post #7 - viable? Needs laptop or PC. I'm very pleased with the 2 channel bandw3idth and what it does vs. its low cost.

  14. #14
    Junior Member
    Join Date
    Aug 2013
    Posts
    4
    It looks interesting, but it sounds like the software lets it down a bit. It's also way out of my price range for the foreseeable future.
    Having said that, it's not really comparable to a Teensy 3 based oscilloscope which is only 2Mhz at best (though with many more channels).

  15. #15

  16. #16

  17. #17
    Junior Member
    Join Date
    Aug 2013
    Posts
    4
    Apparently the ADC used in that one was more complicated to wire, a bit glitchy and also not produced anymore.
    It would be interesting to see what someone could come up with if they combined the best aspects of all these attempts into one clean system.

  18. #18
    Gona mess about and try build the poormans super scope.

  19. #19
    Member AverageGuy's Avatar
    Join Date
    Aug 2013
    Location
    Atlanta
    Posts
    54
    Hm, so I guess I'm a dinosaur with my Tektronix 465? It seems to do all I need to do. I live a simple life.

    Jim.

  20. #20
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,821
    I have an old Tek 475 here. I used to love that old scope.

    But I haven't used it in years. There's just so many important things you can't do. You can't acquire a single-shot event. The old polaroid cameras don't count as the film is no longer manufactured. Even if you photograph the screen, you can't see pre-trigger waveform which is really essential for debugging modern problems where you know where your code crashes, so you pulse a pin to trigger right before the crash, but what you really need to see are the events that led up to that fateful moment.

    You also can't trigger on things like pulse width, rise times, data patterns on common protocols and all sorts of other advanced triggering capability modern (but expensive) scopes have. So far I've only used it a couple times, but the new "zone triggering" feature is really awesome for debugging intermittent problems. You define an area on the screen that augments the normal triggering, so the scope only updates when a waveform based on the normal triggering either does or does not pass through that area. So if you have something that's working 99999 times out of 100000 (perhaps an interrupt delays some response but only in highly unlucky cases), you can set up the zones so the scope ignores all 99999 of the normal waveforms and then shows you just that 1 where things happened differently.

    I guess you could say I live a complicated life... :|

  21. #21
    Member AverageGuy's Avatar
    Join Date
    Aug 2013
    Location
    Atlanta
    Posts
    54
    Quote Originally Posted by PaulStoffregen View Post
    I have an old Tek 475 here. I used to love that old scope.

    But I haven't used it in years. There's just so many important things you can't do. You can't acquire a single-shot event. The old polaroid cameras don't count as the film is no longer manufactured. Even if you photograph the screen, you can't see pre-trigger waveform which is really essential for debugging modern problems where you know where your code crashes, so you pulse a pin to trigger right before the crash, but what you really need to see are the events that led up to that fateful moment.

    <snip good stuff>
    I guess you could say I live a complicated life... :|
    I recognize the desirability of the advanced scopes of today. They would have made my life much easier in an earlier life even though we had storage scopes. At this point in my life where electronics is my hobby rather than my occupation, I haven't found any reason for the upgrade. Most of the time I'm happy with a digital multimeter. Obviously I'm not doing any cutting edge stuff. I'll let you guys break new ground, I'm happy using what trails you've blazed. At this point, I have a lot of solutions, but am just waiting around looking for problems and it's fun.

    Jim.

  22. #22
    Truly wish I could afford a quality scope.
    Been looking at prices here and so far it's not looking good, even a really basic scope is bloody expensive.

    you guys have no idea how lucky you are.

  23. #23
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    $135 is too much?

  24. #24
    In south africa that's $259

  25. #25
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,821
    Quote Originally Posted by Xeon View Post
    Nice.
    this one caught my attention.
    http://bobdavis321.blogspot.com.au/2...mples-per.html
    I wonder if a really high performance (for a microcontroller) version of this could be built using the DMA controller in Teensy 3.0?

    Of course, this only acquires digital signals. The cheapest way to do that is with the Cypress FX2 USB chip, which Saleae sells as a an 8 channel logic analyzer for $150, but lots of very cheap knock-offs are available (none of them developing or publishing any software of course... they all send you over to Saleae for the software).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •