Shop OBEX P1 Docs P2 Docs Learn Events
DIY PropScope? — Parallax Forums

DIY PropScope?

average joeaverage joe Posts: 795
edited 2012-05-25 22:20 in Propeller 1
Hey guys, I'm looking for some advice on possibly building a propscope equivalent. Now let me note, I'm just trying to put together something for testing and debugging of projects. I have several props laying around and thought this could be a good use for one. It would be nice to have TV out to display waveforms, and dual channel would be very helpful. I don't need GHZ sampling rates or anything. 16-pin logic analyzer functions would be very helpful too but could be a second module if necessary. I am mostly debugging propeller chip circuits. So, with those criteria do you think the propeller is a good choice? What ADC's would you recommend? Any comments? thoughts? suggestions? would be greatly appreciated!

Comments

  • RaymanRayman Posts: 14,827
    edited 2012-05-24 08:32
    Well, I'm thinking about doing a logic analyzer using the DVI Graphics Shield...

    Plan is to use the 8-bit bus to capture data to the free memory of the SSD1963.
    When in 640x480x24-bit color VGA output mode, there is about 300kB of free space...
    Just need to add an 8-bit buffer to the system so that one can control when 8-bits of scope data are allowed to occupy the bus.
    Maybe could use multiple buffers to look at 16 or 24 bits of interleaved channels.
    Could also hook to an 8-bit ADC instead of logic...

    Anyway, I think I can clock in data at up to about 100 MHz.

    Then, can display on DVI, VGA or touchscreen...

    But, this is probably a bit more complex than what you want, right?
  • average joeaverage joe Posts: 795
    edited 2012-05-24 09:01
    Maybe a bit more complex, but a great idea nonetheless! I have the SSD1289 and I will have an extra but was thinking tv would be better since the higher resolution.
    Mostly I'm just looking for a viable solution to spending a couple hundred for an old scope on ebay.
  • turbosupraturbosupra Posts: 1,088
    edited 2012-05-24 09:07
    If you can display 4 channels instead of 2, as the current propscope does ... I'd be interested in duplicating this!
  • average joeaverage joe Posts: 795
    edited 2012-05-24 11:26
    4 channels would be nice, but probably unnecessary for my needs. I'm thinking about a couple 8-bit ADC's directly to a prop, 4 resistor video circuit and maybe even an SD card for logging? When not using the scope, the 16 data bits from the ADC could be logic analyzer inputs? I'm sure something like this is possible but not sure how to implement such a design.

    ADC selection would be a big part of the project IMO. The coding should be fairly simple.
    As I said, I'm not looking for anything too complex. I'd like to use as few components as possible to keep cost down. I had thought about using SigmaDelta, but I doubt this would work very well at higher frequencies. *above 5MHZ* 8 bit resolution should be fine. I would like to do 10-20 MHZ sample rate, higher if possible. 100MHZ would be wonderful to have so the more I think about it, the more interested I get Rayman's idea.

    As I said, I'm just looking for a tool to help in debugging. All I have for testing are 2 cheap meters *1 analog, 1 digital* and some leds. :(
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-24 12:12
    Hanno uses the ADC08100 ADC chip in his video capture method.

    I was pleased at how easiy it was to use Hanno's code with these chips.

    The datasheet states 8-bits, 20Msps to 100Msps.

    Have you seen some of the other Prop oscilloscopes done by forum members? Post #5 of my index lists some of the oscilloscope and logic analyzers I've seen on the forum (under "Propeller Tools").
  • average joeaverage joe Posts: 795
    edited 2012-05-24 12:40
    Duane, thanks for the link, that was exactly what I was looking for. I've seen the propalyser but couldn't remember the name. Looks perfect for what I need. Just need to think about board requirements. Seems Sigma-Delta is giving better results than I though so i may just test this out. Beau's code looks promising. So does Poor Man's Oscope. I have a couple small boards so I will probably build the LA first, then an Oscope. *Usually my googlefoo gets me what I'm looking for but I was drawing a blank!*
  • average joeaverage joe Posts: 795
    edited 2012-05-24 13:20
    Hey Steve, I've been thinking about it and will probably build your LA in the next few days. I'm just trying to wrap my head around fitting it on perfBoard. Shouldn't be too hard, the problem is connecting to the test unit. I have no room on top of the prop in test and the pin-headers are at the 4 corners. I just need some time to wrap my head around the implementation.
    Thanks for all your help guys!
  • TubularTubular Posts: 4,706
    edited 2012-05-24 14:21
    Duane Degn wrote: »
    Hanno uses the ADC08100 ADC chip in his video capture method.

    I was pleased at how easiy it was to use Hanno's code with these chips.

    The datasheet states 8-bits, 20Msps to 100Msps.

    Have you seen some of the other Prop oscilloscopes done by forum members? Post #5 of my index lists some of the oscilloscope and logic analyzers I've seen on the forum (under "Propeller Tools").

    On the Smorgasboard there is the "IO Dreamkit" by Hanno / Bill Henning / Sapieha / uController.com ( I think thats right)

    It uses the ADC08100 for up to 100Msps capture.
  • jmgjmg Posts: 15,183
    edited 2012-05-24 15:41
    Seems Sigma-Delta is giving better results than I though so i may just test this out.

    Sigma-delta comes essentially for free, so it is well worth 'pushing into the corners' - it's effectively a 80Mhz (100MHz?) D FF sampler, so you get naturally better resolution at lower frequencies where it matters more.

    I think you would want a switchable integrator for wide frequency range.

    Good triggering is vital, so a DAC to bias a proper Analog trigger would make up for the ADC limitations, and it should work equally well on a digital waveform, and have the desired wide bandwidth. (DC - 100MHz)

    I did work out how to get a genuine edge WAIT, on Prop hardware, at a small resource cost - you config a pair of pins as Counter Feedback (aka d FF) and then wait on the 01 or 10 on the pair of pins.
    Easier software, and higher fMax / smaller min trigger width.

    I also hate losing resolution, so a natural fit would be a time-delta logic analyzer - ie it stores the time of any transition, not a simple memory-fill.
    This gives a very wide dynamic range, and has natural compression.
    WAITPNE with a wide field, does this naturally, and you can store the time of any edge to ~10ns - the highest 'follow rate' will be a software determined.
    Even a COG could store precision samples, of maybe 40 bytes of serial data using a 23b Timestamp and 8b wide captures, or around 400 edges of any data.

    24b wraps at ~ 160ms, so a trade off of Time:Chans, would allow 1.34s wrap, for 5 chans, for example.
    That would capture a GPS 1pps signal, which is a good test pulse.
  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-05-24 20:08
    Maybe a bit more complex, but a great idea nonetheless! I have the SSD1289 and I will have an extra but was thinking tv would be better since the higher resolution.
    Mostly I'm just looking for a viable solution to spending a couple hundred for an old scope on ebay.

    If you are looking to learn, design it, build it, test it, push the limit. But if you want the functionality, go to ebay or used test equipment sellers and get what you need. DIY here will be more costly and less tolerant of technique. Also remember that that 100 mhz sample rate may translate into a 50 mhz bandwidth (nyquist), how many samples you can take per time will make a difference in how the captured waveform looks. So if you can get 1Gsps you will have better approximation of the 50 mhz waveform. Look at the specs on new DSOs and notice the relation between their bandwidth and samples per second. Modern DSOs also use other tricks for cleaning up periodic waveforms as well. Sample averaging comes to mind...

    I vote ebay. Just avoid the scopes using CCD analog capture channels. These parts are nearly impossible to find. Hang out on the yahoo tek scope group andothers before going to ebay. Ihave one of the affore mentioned scopes and great both channels below 1mhz above, a crystal clear, b sucks ... $225.00. 2247A 4ch nonstorage perfect shape, ultraclean trace $175.00. 2230 analog perfect, digital one channel goofy in chop, perfect in alt, $60.00, easy fix when I find the time. buying these was a learning experience. Not as expensive as it could have been.
  • RaymanRayman Posts: 14,827
    edited 2012-05-25 06:54
    I kinda have to agree with Frank to some extent...

    There's a tiny little scope for sale on Amazon.com for $78:

    http://www.amazon.com/SainSmart-Pocket-Sized-Digital-Oscilloscope-VERSION/dp/B004Y3QHZ6/ref=sr_1_5?s=industrial&ie=UTF8&qid=1337953973&sr=1-5
  • jmgjmg Posts: 15,183
    edited 2012-05-25 14:25
    Rayman wrote: »
    I kinda have to agree with Frank to some extent...

    There's a tiny little scope for sale on Amazon.com for $78:

    and there are also
    ~$300+ Uni-Trend UTD2102CEL, and variants : 100MHz, 7" LCD, 1Gsps, on ebay
    as well as the imtemediate
    ~$175 DSO203 - small handheld LCD 4 channels, 72Mhz sampling, with some analog compromises.

    While it is clear on the basis on [Results / One persons time], you will be better to 'just buy a scope', there are things Vanilla Scope miss.
    A Good counter and pulse detector is one.

    Plus, a lot of uC work is digital, so a Good Logic Analyzer can be a lot of use, and fortunately a Prop finds that easier.
    Then we need to keep an eye on Prop 2, and it can push the 'do-able' a little further.
  • average joeaverage joe Posts: 795
    edited 2012-05-25 14:43
    Thanks for all your input guys. I've started working on a logic analyzer based on the PropAlizer. This should help me figure out what is going on with some of these circuits. A VOM and LEDs are just not cutting it. Unfortunately I will have to wait on the scope till my finances look better, or I simply can't get any farther without one.
    Thanks again guys!
    Joe
  • bee_manbee_man Posts: 109
    edited 2012-05-25 20:11
    I have written a spin front end for an Ardunio based scope program called Xoscillo. I have it working with 1 channel and 6 bit logit analyzer on the PropBOE now. As soon as we get the assembly ADC code for the PropBOE (Andy is working on it now) I should be able to get it going to a 4 channel scope and 8 channel analyzer. I hope to get at least 10K sampling just for educational purposes to be able to use the Understanding Signals text with the PropBOE.

    I have used Propalyzer and that is a great program especially with the QuickStart. I put a header on a second QuickStart with just the data and ground lines and when piggybacked to another QuickStart you can observe all the data lines of the 1st QuickStart with the Propalyzer program. Very cool!
  • jmgjmg Posts: 15,183
    edited 2012-05-25 22:20
    Xoscillo looks a good base for the PC end,
    http://code.google.com/p/xoscillo/

    The Prop should be able to capture (sparse) Digital edges to 12.5ns/10ns precision, and use compression to store just the edge-times.
    For narrow pulse timings, ( Freq < 1MHz) pulses with a preamble (front porch?) > ~ 500ns will have the time stamp precise, and (Assuming overclock to 10ns) slightly narrower 100-500ns pulses would capture the second edge, but not quite at the right time stamp.
    Extremely narrow pulses, 10-100ns, could possibly be detected/inferred on single pins, with special software.
    - A stored Time value, with no apparent Data change, would be from a very narrow pulse.

    A separate COG should be used for Frequency Counter (choose a channel), and perhaps another COG for Time Interval ChA-ChB difference measurements. One can never have too much information ;)

    I think a 40MHz(50MHz) reciprocal counter should be do-able, and time intervals to 12.5ns(10ns) precision doable, with a min-time of around 100ns
Sign In or Register to comment.