Arduino XY Display on a Oscilloscope Shield

3,949

34

18

Posted in TechnologyArduino

Introduction: Arduino XY Display on a Oscilloscope Shield

About: An IT Professio​nal from the West Midlands, with an interest in history, food, wine and all things technical​.

Over the years I have often taken a oscilloscope displaying logo's and text using the x y mode to events my Makerspace has been helping at. Normally driving it using the PWM pins on a Ardiuno and a RC circuit to smooth out the jitter.

A couple of years ago i came across an excellent youtube video by Alan Wolke, in which he used a R2R ladder as DAC this improved refresh speed and overall enabled the display of a more detailed image. He later improved on this using code from Bob at VintageTek. I have included links to both these invaluable youtube videos below.

#144: Use Arduino Uno to create spinning XY graphic on an Oscilloscope

#164: More XY Oscilloscope graphics, VintageTEK and how projects evolve

Step 1: Schematic

The circuit is pretty much a direct copy of Alan Wolke's but I opted to just a R2R array as apposed to making it out of individual resistors. This was largely due to laziness and not wanting to solder all those resistors in!

Step 2: Prototype

Quickly after seeing the video I upgrade my solutions using a protoboard shield. This served us well and was used at many events but whilst it worked it was a little fragile, So I decided to make life easier and build a PCB version of the shield. This would make It simpler to set up and improve reliability.

Step 3: PCB

To be honest designing a PCB was probably overkill, and I did so not least as a learning experience. I opted to go with BNC connectors as they are simple and always at hand. If you opted for just connecting probes directly you should be able to omit the capacitors as the probes should have enough capacitance themselves.

Step 4: Parts & Assembley

The following is a list of parts you will require to build the shield.

  • 2 x AMP 5227161-1 BNC Coaxial, Right Angle Jack, Through Hole Right Angle, 50 ohm Connectors
  • 2 x BOURNS R2R 10 kohm, SIP, Bussed, 4300R Series, 10 Pins Resistors
  • 2 x KEMET C317C100J1G5TA Multilayer Ceramic Capacitor, Gold Max, 10 pF, Goldmax, 300 Series
  • 0.1 pitch Pin Header
  • PCB

You will also require solder and maybe flux to assemble.

To use it you will need

  • Arduino (I used an Uno)
  • 2 x 50ohm BNC to BNC cables
  • Oscilloscope with X Y Mode

Step 5: Code

Rather than reinvent the wheel I have used the code suggested on Alan's youtube post. It really does a very good job! You can download it here. http://www.qsl.net/w2aew/code/logor2r.ino

I have since created a few extra displays.

Step 6: Examples

A couple examples of the type of things you could display on your scope. Animation is also possible but I have not yet tried this.

Step 7: Conclusion

In conclusion a nice fun little project. I have plans on how i might adapt this going forward but going to keep this a secret for now.

Still not sure I got the correct value for the capacitors if I get chance I might try a few other values.

Share

    Recommendations

    • Science of Cooking

      Science of Cooking
    • Pocket-Sized Contest

      Pocket-Sized Contest
    • Microcontroller Contest

      Microcontroller Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    18 Comments

    Experimenting with iPython, numpy, scipy linalg (Interactive Python, Numerical Processing for Python, and Linear Algebra). I decided to analyze the Resistor to Resistor network for a Digital to Analog converter. This is the same circuit used in your project. I performed the calculations with interactive Python in a web browser connected to a local iPython-notebook server. I converted the notebook to an html document with nbconvert. You can view the "Matlab like" document here.
    http://labcafe.net/131/R2Rcalcs.html

    I would like to know if you are able to sell these shields, or if you know where you can get one. I would like to play with it, and yours looks really neat.

    4 replies

    I had not intended in selling them but as there is interest I will list them on Tindie. I am of course happy to release the eagle files so you can order your own pcb's.

    that would be great. could you let me know once you add it, and the name to search for. i would like to get one for me and another for my father. thanks, jerry

    Hi Jerry

    Sorry for the delay in getting back to you. I have now listed the boards on Tindie. unfortunately they have come out more expensive than I would of liked. I have given the option for the PCB's, a kit or fully assembled. If you want to just get your own PCB's made I am happy to release the files.

    https://www.tindie.com/products/11306/

    Thank you, I just ordered 2 kits.

    Great Project. I thought it would be good to be able to preview the image on the PC so I wrote a small python program using the Processing3 IDE that will read the XY point pairs from a file and plot it in a window. I posted the program on github. https://github.com/harrimand/ArduinoXY.git My curiosity is... Did you use a program to generate the XY point pairs from an image? I wasn't sure about posting the picture that was generated without your permission. I would be happy to if you like.

    6 replies

    I am trying to get this to work, but I can not get the code to work on my arduino. did you use the download they have above? I know that they put avi/pgmscope.h instead of avr. But now I have an error farther down the line that I cant figure out. its at the line with prog_uchat wizzardid.

    if you know of some changes you had to make I would greatly appreciate it. I just received my first oscilloscope for christmas, and am trying to learn to use it, but the code is not helping me out much for programing my uno.

    Thanks,

    Jerry

    Upon further investigation. It seems there have been changes in the use of PROGMEM. The data type should be declared as constant also. You should change "prog_uchar" with "const unsigned char". Another option that should work as well is changing all four instances to it to "const uint8_t"

    Thank you for your help, this did let me compile the Arduino, so I have downloaded it, and will now go try to see it on my scope. You were a great help with this.

    Hello again Jerry.

    One addition to my previous reply. I believe the data type "prog_uchar" has been deprecated. Your version of compiler may not recognize it. I would try replacing "prog_uchar" with "unsigned char" There are four instances of it in the logo2r.ino file that was referenced.

    Hello Jerry I'm not sure which code you are trying to make work on your Arduino. The link to the Arduino sketch for this project is http://www.qsl.net/w2aew/code/logor2r.ino The python code that I posted on github was written using the Processing3 development environment in Python mode. I wrote it so I could take the data from the Arduino sketch and preview it on the PC's screen. In the Arduino sketch you will see blocks of numbers under the PROGMEM prog_uchar array statements. I copied the block of numbers without the { } brackets and put them in a text file that was opened with the python program. The python program creates a window and plots the lines using the point pairs in the text file. Were you getting the error in the Arduino environment with the logo2r.ino download? If you post the error message I could probably provide more useful assistance.

    Nice idea that, sure it will come in useful. I am currently working on something the other way around, I might well use this for my testing. Good work!

    where did you get you pcbs made, the project looks really good.

    1 reply

    Nice Tek 465. I gave mine away two years ago after having it for 25 years. superb.
    good job on the XY plotting. how about a clock next?

    1 reply

    Yes, great little analogue scope, only issue I have with it is a dodgy intensity pot, I will get around to fixing it some day.

    I like the clock idea, that could compliment what I have been working on nicely.