Shop OBEX P1 Docs P2 Docs Learn Events
Poor Man's Digital Oscilloscope (now with VGA option and screen capture to SD) - Page 2 — Parallax Forums

Poor Man's Digital Oscilloscope (now with VGA option and screen capture to SD)

2

Comments

  • RaymanRayman Posts: 13,970
    edited 2011-03-29 18:20
    Perry wrote: »
    You got me thinkin' about your PrintScreenVGA, with slight modification and simple_serial you can do a hex dump of the screen with only 180 longs.

    It should be easy modify this 'scope to run on VGA, I just don't have VGA connector on my proto board , so I can't test the changes !

    Perry, I think I did this already... There should be a thing called "Prop Monitor" (or something like that) on my website...
  • PerryPerry Posts: 253
    edited 2011-03-29 18:39
    MacTuxLin

    You made the correct changes, I had hoped it would just work, need to someone with more experience to check it.

    or I will have to breakdown an put a VGA connector on something.
  • PerryPerry Posts: 253
    edited 2011-03-29 19:03
    Rayman wrote: »
    Perry, I think I did this already... There should be a thing called "Prop Monitor" (or something like that) on my website...

    Could not find that, but the YModem page looks helpful.
    You should update your links ther to reference paralixinc for thos old threads though.
  • lonesocklonesock Posts: 917
    edited 2011-03-30 09:28
    Great stuff, Perry! I will be building up a protoboard just to play with this! [8^)

    btw, an idea I'm going to try is to modify the ADC circuit a tiny bit:

    * use a resistor on both the sense and feedback pin
    * different values (e.g. X and 2X)
    * that way I can switch their roles and have an instant change in the ADC range
    * assuming the sense pin's input impedance is high enough, the extra resistance in series shouldn't mess with the ADC's accuracy

    Jonathan
  • RaymanRayman Posts: 13,970
    edited 2011-03-30 09:41
    Jonathan, cool idea!

    Perry, Here's the link for PropMonitor: http://www.rayslogic.com/propeller/Programming/PropMonitor/PropMonitor.htm
  • PerryPerry Posts: 253
    edited 2011-03-30 10:58
    lonesock wrote: »
    Great stuff, Perry! I will be building up a protoboard just to play with this! [8^)

    btw, an idea I'm going to try is to modify the ADC circuit a tiny bit:

    * use a resistor on both the sense and feedback pin
    * different values (e.g. X and 2X)
    * that way I can switch their roles and have an instant change in the ADC range
    * assuming the sense pin's input impedance is high enough, the extra resistance in series shouldn't mess with the ADC's accuracy


    Jonathan

    This is good news. I really need someone to debug the VGA interface.

    on another note I am making progress with dumping the screen to the PC via serial port
    I always used B/W but have now has to get my head around color schemes

    Here's an example of a TV capture

    I use tinycore linux for OS
    brad's spin tool for development

    display BMP is uploaded to PC in binary form to CuteCom

    then I use gnupaint to convert to PNG format
    240 x 160 - 2K
  • PerryPerry Posts: 253
    edited 2011-03-30 11:07
    Rayman wrote: »

    Thanks RAY, but the only decent Windows system I have is used as a router. I will have to go offline to try it .

    but I have been successful in using the BMP dump you wrote to upload display to linux. need to get used to the wacky color schemes though. I have been using 8bit color or just B/W mostly.
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-03-30 12:41
    As soon as you connect the propeller to a PC you can use ViewPort from Hannoware as an oscilloscope.
    Not only for ADC but for ALL variables you would like to.

    Another possability is propterminal from insonix which can be used as a TV-emulator on the PC.

    best regards

    Stefan
  • PerryPerry Posts: 253
    edited 2011-03-30 18:56
    MacTuxLin wrote: »
    Hello Perry,
    I've tested but displayed nothing. The changes I've made were
    '  gr    : "TV_graphics"
       gr    : "VGA_graphics"    'Use for VGA screen.
    

    and
      'basepin  = 12                'Setting for Demo Board TV.
     'basepin  = 24                'Setting for Hydra TV.
     basepin  = 16                'Setting for Demo Board & Hydra VGA
    

    Are there anything I need to change as well? On the hardware side, I'm using prop proto-board with mounted VGA/PS2 KB/Mouse connector and base 16 was tested OK.

    Thanks a lot.

    I don't see where you have modified the A/D pins.

    I am convinced that the VGA should work. I did try the VGA settings with the new dump screen to PC code. I could not see anything 'cause I had no VGA hardware, but was able to dump and save a display image by hitting the correct keys. There is only on thing we overlooked that being the selection of the A/D pins.

    I will publish this new version when I am satisfied with the color choices for the dumped output.
      '  start ADC 
      SampleTime := 127
      InPinA     := 18    <---- change this
      oPinA      := 17   <-----  and this
      nAverageA  := 10
      nPeakA     := 1
      InPinB     := 8 <---- and maybe this
      opinB      := 10<----   and this
      nAverageB  := 10
      nPeakB     := 1
    

    inPinA and oPinA would conflict with the VGA setting. please choose pins other than those used already for the A/D converters and try again
  • MacTuxLinMacTuxLin Posts: 821
    edited 2011-03-30 21:28
    Perry wrote: »
    I don't see where you have modified the A/D pins.

    I am convinced that the VGA should work. I did try the VGA settings with the new dump screen to PC code. I could not see anything 'cause I had no VGA hardware, but was able to dump and save a display image by hitting the correct keys. There is only on thing we overlooked that being the selection of the A/D pins.

    I will publish this new version when I am satisfied with the color choices for the dumped output.
      '  start ADC 
      SampleTime := 127
      InPinA     := 18    <---- change this
      oPinA      := 17   <-----  and this
      nAverageA  := 10
      nPeakA     := 1
      InPinB     := 8 <---- and maybe this
      opinB      := 10<----   and this
      nAverageB  := 10
      nPeakB     := 1
    

    inPinA and oPinA would conflict with the VGA setting. please choose pins other than those used already for the A/D converters and try again


    It worked!!! OK, I've checked the schematic of proto-board & yes, those pin 17 & 18 were the culprits. Changed & it worked.
      'start ADC
      SampleTime := 127
      InPinA     := 6   '18
      opinA      := 7   '17
      nAverageA  := 10
      nPeakA     := 1
      InPinB     := 8
      opinB      := 10
      nAverageB  := 10
      nPeakB     := 1
    

    Cool in the extreme!!!! :cool: Thanks a lot!!!
    1024 x 768 - 72K
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-03-31 04:32
    I guess the maximum-sampling rate and precision is limited. But for a lot of purposes it will be enough.

    As we are a userforum and have no pressure to sell as much units as possible, how about doing some tests that show the limits of this oscilloscope?

    I mean some screenshots with a description of parameters. (rectangle-signal with a freq of x kHz/MHz
    measuring the rising-time of some digital signals shown on the PMO (poor man oscilloscope) compared to a screenshot of a high-end 5Gigasamples /second

    slow optocoupler, RC-circuit, fast IO (prop-pin itself)

    and as a medium perfomance oscilloscope two ADCs that were used in the IO dreamkit.
    again showing the limits of this kind of scope.

    So everybody can decide wich type of scope will be suitable for his needs

    best regards

    Stefan
  • MacTuxLinMacTuxLin Posts: 821
    edited 2011-03-31 08:24
    I'm think I'm fine in contributing images with this scope in the mist of my use.
  • PerryPerry Posts: 253
    edited 2011-03-31 13:24
    MacTuxLin wrote: »
    I'm think I'm fine in contributing images with this scope in the mist of my use.

    Don't get too carried away with this version. Just get your A/D working.

    The screen dump works good now.(maybe still need some color tweaking)

    I have decided to change the interface to use mostly function keys, instead of number keys, ( that was a throwback from when I mostly used input from infraRED controls)

    There is a new method that allows you to put in numbers to set variables maybe should also save settings to eeprom I still have over 100 longs to add functions even after loading a DDS

    Also you can move the two traces individually, as well as scaling them individually

    I have also decided there is enough room for one or two signal generator channels either with duty cycle on the audio outputs or with some other DDS.

    Will update online version of software soon.
    240 x 160 - 3K
  • MacTuxLinMacTuxLin Posts: 821
    edited 2011-03-31 19:02
    Perry wrote: »
    Don't get too carried away with this version. Just get your A/D working.

    :tongue: You're right, I had a number of old items that I wanted to check in the past...

    OK, just to feedback. In VGA_Graphics, I've selected the colorset:
      colorset      = $ccc00c00    'Light on dark: L, red;  R, blue.
    


    Because this one produces an orange background:
      colorset      = $2B_06_9C_92 '$de1d38dc  'Light on dark: L, red;  R, blue.
    

    Right, function keys would be best. I'll post some test screen shots later.
    819 x 614 - 90K
    819 x 614 - 103K
  • PerryPerry Posts: 253
    edited 2011-03-31 19:16
    Just updated the software on the first post of this thread to include dump screen to serial port and changes to allow inputs of numerical variables. Also independent controls of scaling and movment of each channel via shift for channel A and control for channel B.

    There is over 400 longs still available for functions (nearly 600 with BST extensions). I am beginning to get lots of new ideas for functionality. Use audio outputs with PLL for function generators, " lonesock" had a "Prop_Video_HW_DDS" post that nobody responded to that I have been wanting to try out for a long time. Also one should be able to use the TV video hardware to generate RF FM signals (I left an outline for a stereo FM idea I will work on)

    I still have to make the display accurately show timing information(Interger scaling arithmetic). There is a function that allows you to mark a set point and then move a pointer to tell you the time difference between points.

    Oh! and F12 dumps the video screen binary BMP data serially at 57600 baud thanks to" Rayman"

    F2,F3,F4 have preset times of 1,10,100, with F2 you can see the equalization pulses in the TV vertical sync. at the maximum recommended resolution of 1M samples/second.

    I thing I will make a minimum version just to show the basics of this codes usage for other possible uses.(... that shows about 1000 longs available)
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-03-31 22:16
    Noticing that this scope seems to miss a lot, is it possible that the capacitance of my breadboard is enough to smooth some of what I am trying to measure? It does not seem as though the small amount of capacitance of the breadboard conductors should have this effect, and if I compare what I get here with my main scope, after attaching the sample to the breadboard, and reading from the opposite end of the breadboard conductor, it does not seem to have such an effect. The distortions that are not showing up are 25% of the signal and slower than 500Hz. Any ideas why this could be?
  • PerryPerry Posts: 253
    edited 2011-04-01 19:21
    Noticing that this scope seems to miss a lot, is it possible that the capacitance of my breadboard is enough to smooth some of what I am trying to measure? It does not seem as though the small amount of capacitance of the breadboard conductors should have this effect, and if I compare what I get here with my main scope, after attaching the sample to the breadboard, and reading from the opposite end of the breadboard conductor, it does not seem to have such an effect. The distortions that are not showing up are 25% of the signal and slower than 500Hz. Any ideas why this could be?

    Haven't a clue, a schematic would be helpful, as well as data rate your using there are 4 presets F1,F2,F3,F5 that you should try
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-04-01 22:41
    The delta-sigma ADC with the propeller works only good if you

    1.) are using a prop in a QFN-package on a PCB
    2.) wires from prop-IO-pins to capacitors are less than one inch long
    3.) you don't use neighbourhooded prop-IO-pins f.e. prop-pin no 7 and 8 (to avoid cross-talking use prop-pin 7 and 12)

    A bread-board is definitely not good for this application


    Edit: anyway I'm highly interested what perfomance you can achieve if a DIP40 with capacitors soldered next to the Pro-IO-pins
    If I understand right the bit-resolution and sampletime depends on the frequency with which the IO-pins are switched

    best regards

    Stefan
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-01 22:53
    StefanL38:
    Thank you. I always like to test a circuit on breadboard before making a PCB, I guess this is one of those I have to risk (by going directly to PCB).
  • PerryPerry Posts: 253
    edited 2011-04-10 06:24
    I have updated the software on the first page

    Changes:
    new Config file contains all I/O information
    dump screen now writes to the SD card
    now using lonesock's Easy_ADC

    Perry

    Attached screen dumps show Chua's Chaotic Circuit in action
    576 x 480 - 34K
    576 x 480 - 21K
    576 x 480 - 26K
  • rymanryman Posts: 12
    edited 2011-04-13 08:28
    Perry,

    I cannot get you code to compile. I get Expected instruction or variable at

    PUB SetBuffer(argh,aBunch)
    buf_ptr := argh
  • SapiehaSapieha Posts: 2,964
    edited 2011-04-13 10:13
    Hi.

    I have same problems.
    Saw to at it is not all needed files in archive.

    ryman wrote: »
    Perry,

    I cannot get you code to compile. I get Expected instruction or variable at

    PUB SetBuffer(argh,aBunch)
    buf_ptr := argh
  • lonesocklonesock Posts: 917
    edited 2011-04-13 10:20
    SetBuffer actually isn't needed with EasyADC. I replaced it with my latest version (had to add in a parameter to specify if the data is filtered). I also had to remove a line about PrintScreen_serial (IIRC), and I had to modify my pin definitions in config.spin. After that, it worked fine.

    Jonathan
  • rymanryman Posts: 12
    edited 2011-04-13 12:28
    OK... so I just need to download your latest EasyADC? Where?
  • lonesocklonesock Posts: 917
    edited 2011-04-13 12:57
  • rymanryman Posts: 12
    edited 2011-04-13 13:44
    Thanks!!!!!!!
  • PerryPerry Posts: 253
    edited 2011-04-13 18:26
    New update on first post!

    Saved archive is set for VGA could someone try it and report results?

    I wimped out and used FloatMath and FloatString to show period information.

    added "f" key to use function generator
    Right now it's a simple square wave generator you can toggle on/off .

    Here is a scenario of usage.

    connection one channel to the function generator output pin
    Start PMDO
    hit down arrow(or up) key to get display near center
    hit "f" key to turn on function generator
    you should see a square wave
    hit "space" key to stop sampling
    hit "i" key to turn on Information display
    hit "F10" to move pointer to beginning of signal to measure
    hit "s" to set position
    hit "F11" to move pointer to end of period to measure
    hit "F12" key to dump screen to SD card
    screen will go blank for 8-10 seconds

    you will get a PMDO_100.BMP

    use whatever graphic tools you have to make the image more useful

    There is crosstalk in the test image only one channel should not see the square wave.
    I think I have a problem near the earphone connector I use to connect my propeller to the outside world
    576 x 480 - 29K
  • TharkunTharkun Posts: 67
    edited 2011-04-14 00:38
    Perry wrote: »

    Saved archive is set for VGA could someone try it and report results?

    Hi Perry,

    first of all: very nice project and good work !
    I could't compile this version, because object exceeds memory limit by 205 longs for vga-version, 230 longs for tv ?!?!

    Tharkun

    P.S. I'm working on a small case with 7"-Display for the PMDO using some buttons and encoder instead of keyboard,will post pictures when done.
  • PerryPerry Posts: 253
    edited 2011-04-14 05:12
    Tharkun wrote: »
    Hi Perry,


    I could't compile this version, because object exceeds memory limit by 205 longs for vga-version, 230 longs for tv ?!?!

    .

    I was afraid that
    I use "Brad's Spin Tool" which has a compiler option of "eliminate unused SPIN methods"
    you can get it here http://www.fnarfbargle.com/bst.html
  • MagIO2MagIO2 Posts: 2,243
    edited 2011-04-14 11:31
    Just my 2 cents ... maybe a specialized video / VGA driver could be created for OScope applications?! The grid can be generated programmatically, a top and a bottom line could be rendered by using the propeller font for displaying scales and other text info and for the signals a buffer which can be much smaller than the full frame-buffer could be used.

    This way the resolution could be increased to 800x600 or maybe 1024x768 while using less memory - giving more room for other functions.

    What do you think?
Sign In or Register to comment.