element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino Projects
  • Products
  • Arduino
  • Arduino Projects
  • More
  • Cancel
Arduino Projects
Blog A simple DIY Oscilloscope with Arduino Uno and Mega
  • Blog
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • More
  • Cancel
  • New
Join Arduino Projects to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: e14 Contributor
  • Date Created: 26 Dec 2014 11:05 AM Date Created
  • Views 39370 views
  • Likes 20 likes
  • Comments 79 comments
  • mega
  • ardbeginner
  • tft
  • oscilloscope
  • uno
  • arduino
Related
Recommended

A simple DIY Oscilloscope with Arduino Uno and Mega

e14 Contributor
e14 Contributor
26 Dec 2014

My DIY Oscilloscope, how i got my signal image

 

Content :

- Description

- Screenshots

- Video

- Credits and links

 

Descriptions

 

I am experimenting with RF and IR signals in various frequencies and had some trouble with the receivers and needed to see what kind of signal i was receiving.

I cannot afford a real oscilloscope but i knew about the older Arduino oscilloscopes.

 

After trying many different versions of code and tutorials, I was unable to get a single one to work, and all the tutorials and guides around was 2-3 years old.
Not sure if it is the IDE or the actual hardware that has changed in such a way that it didn't work anymore.

 

I finally found a working oscilloscope from a Japanese website, (linked below) and a working TFT screen library,

meaning i could read the various signals received.

 

Clearly the limitations are 0-5v but that is fine, what i needed to know is either wave type and frequency, and this is sufficient.
It also gives me an indication of the amplitude which is just a nice bonus.

 

But what I'm most happy with, is the two channel feature, i often use the second channel as a reference point to be able to

differentiate the main channel on the screen.

 

 

Some screenshots..

This is the .96" OLD test, single wave test imageimage

 

 

 

imageimageimage

2.4" TFT screen on the Uno,    two right images same screen on a Mega.

 

 

A youTube vidoe i made on the experience.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

 

 

Credits and Links :

 

My compilation of the Oscilloscope and TFT library  ( what you see on the video and images ) :

https://dl.dropboxusercontent.com/u/19761809/arduino/Vaupell-Oscilloscope.zip

 

 

Original Oscilloscope link (code by : Noriaki Mitsunaga ) :

http://n.mtng.org/ele/arduino/oscillo-j.html

 

 

Original TFT display link ( TFT shield library source ) :

http://www.smokeandwires.co.nz/blog/a-2-4-tft-touchscreen-shield-for-arduino/

 

TFT library :

Library : https://github.com/Smoke-And-Wires/TFT-Shield-Example-Code

Attachments:
Vaupell-Oscilloscope.zip
  • Sign in to reply

Top Comments

  • e14 Contributor
    e14 Contributor over 11 years ago in reply to 4ringfan +2
    True, I highly recomened if using ribbon cable, buy a roll, and add the ends yourself, much much cheaper. I usually buy them home in 10 meters at a time. But, I try to use cable as little as possible,…
  • 4ringfan
    4ringfan over 11 years ago +1
    I just received a LCD TFT shield that I had ordered for no particular reason. Now I'm going to have to play with it. Thanks for the incentive!
  • e14 Contributor
    e14 Contributor over 11 years ago in reply to e14 Contributor +1
    Nope just one of them. The problem was the Screen it took up all my pins on the arduino uno. You could do a messy workaround, either by soldering something onto the SD pins (since were not using them anyway…
  • e14 Contributor
    e14 Contributor over 10 years ago

    jc2048 recycler66you guys are totally right, those are threshold values because only one analog pin is used(if you don't need the other pins i guess one can use for example one digital or analog for each of the buttons.

     

    I will post everything here in the evening.I had my university graduation feativity and i got busy in the last few days.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • e14 Contributor
    e14 Contributor over 10 years ago in reply to e14 Contributor

    Sorry, of course I meen 5V power-supply from 220V, not 9V.

     

    Have you uploaded the new sketch?

     

    What buttons you are talking for? Perhaps you can post a photo of your setup?

     

    Thank you and best regards.

     

    Michael

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jc2048
    jc2048 over 10 years ago in reply to e14 Contributor

    These are the thresholds in the code by Noriaki Mitsunaga that determine which switch has been pressed

     

      const int sw_lv[] = {889, 800, 700, 611, 514, 419, 338, 231, 132, 70};

     

    Starting from the end, the 70, 132, 231, 338 look right to me, but the next one I calculate as 456 for the halfway point between two switches whereas the code has 419. So it looks like the code doesn't match the circuit diagram. They then get so far out you'd have two buttons activating the same function and a couple of functions with no button to activate them. If you straighten out the thresholds you'll probably make it work as intended.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • e14 Contributor
    e14 Contributor over 10 years ago in reply to jc2048

    Hello, yes, i know how bringing mains near pcb affects them, it's the never ending problem: noise and   sensible measuring devices don't mix up so well, i resumed to connect the arduino to the usb from the laptop or from an external source such as a power bank.

     

    My only problem is regarding the switches, i know what they should do, but i would like to see the volts/div , time/div (the values in the top right corner of the screen) changing when i press a certain button.

    In my case it doesn't do that.I will print out Mitsunaga's code and my code and dig deeper in this problem.

     

    So if you could please clarify me about the switches being pressed and the values not changing i would appreciate that.

     

    Best regards,

     

             Mihai Arald

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jc2048
    jc2048 over 10 years ago in reply to jc2048

    I think I might have misunderstood your post. You were saying you didn't understand the functions that the buttons initiate rather than the button mechanism itself. Sorry if I was explaining something you already knew.

     

    ---

     

    In the UK our mains is 230V 50Hz too, but its +10% -6%.

     

    When I was a child it was 250Vac, but now it's nominally 230Vac to bring us into line with the rest of Europe. They still run it high, though. I've just measured mine and it's 241Vac. [If you ever bring equipment to the UK, make sure it can run happily on 240Vac.]

     

    The reason I asked about the sine wave you could see is that it might be mains pickup. The input to the Arduino that you are using as the scope probe has a very high impedance and will be very sensitive to mains fields around electric cables, etc. Does it go away when you look at a signal in a circuit?

     

    ---

     

    The circuit diagram shows the input being used directly with no attempt at protecting it. That's very unwise. You only have to touch it on a power rail that's outside the 0-5V range of the input and it will die. The simplest thing you could do to protect it would be to put a resistor in series with it - that would limit the current through the protection diodes on the input pin to something that they could safely manage, at least for modest over-voltage.

     

    How to size the resistor? It needs to be large enough to do some good, but not so large that it affects the readings.

     

    The datasheet gives the worst-case input leakage for the pin as 1uA. (In practice it's going to be much less than that. That value is for the top end of the temperature range and the manufacturer will have given themselves a good margin as well.) If the A/D is 10 bits over 5V, the steps are approx 5mV. Say we accept an error of 1mV from the protection resistor, that gives a value of 1k ohms. Let's say the protection diodes on the input can manage about 20mA, then that means we could connect a voltage of up to 20V without damage to the input. In practice you could go a bit higher with the resistor value.

     

    What effect does this have on the signals that you are measuring? The resistor will form a low-pass filter with the input capacitance of the pin (and any capacitance from the pcb trace and connector). The datasheet is a bit vague about pin capacitance - I can only see one reference and that's for the I2C module where it gives 10pF. That's higher than I would have guessed, but let's assume the capacitance is 10pF with 10pF for the short trace. With a 1k resistor, that gives a cut-off frequency that is over 5MHz, which I presume is comfortably above anything an Arduino can manage when working as an oscilloscope.

     

    Note that whilst this gives more protection than you get from the pin alone, the protection could be done much better than this.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
<>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube