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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • 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
Internet of Things
  • Technologies
  • More
Internet of Things
Blog Building your own IoT oscilloscope for less than $25
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Internet of Things requires membership for participation - click to join
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: vish
  • Date Created: 23 Jun 2014 6:45 PM Date Created
  • Views 2925 views
  • Likes 5 likes
  • Comments 9 comments
  • texas-instruments
  • internet_of_things
  • energia
  • oscilloscope
  • iot
  • arduino
  • launchpad
Related
Recommended

Building your own IoT oscilloscope for less than $25

vish
vish
23 Jun 2014

Hello element14,

 

In this post, I'm introducing a oscilloscope-like instrument that you can build for less than $25. And the good thing is it can work over internet.

 

Introduction

Are you a electronics tinkerer? How many times you wished for an oscilloscope?? What about building one? And how awesome it would be if it can work over internet??

 

It all started when I saw a roadtest, here in element14. It was the road test for Tiva C Series TM4C1294 Connected LaunchPad. It is a evaluation kit from Texas Instruments. After going through the hardware specs, I was just blown away. For just $20, they are offering :

  • TM4C1294NCPDT MCU: 120MHz 32-bit ARM Cortex-M4 CPU with floating point
  • 1MB Flash
  • 256KB SRAM
  • 6KB EEPROM
  • Integrated 10/100 Ethernet MAC+PHY
  • data protection hardware
  • 8x 32-bit timers
  • dual 12-bit 2MSPS ADCs
  • motion control PWMs
  • USB H/D/O
  • Ten I2C modules with four transmission speeds including high-speed mode
  • On-board, in-circuit debug interface (ICDI)

 

Blown away, right? The feature is just a snapshot of what it actually have in its chest. You could go to Tiva C Series Connected LaunchPad (EK-TM4C1294XL) for more information. I posted my idea of an oscilloscope for the roadtest application and managed to get one. Thanks element14.

And when it came, it surprised me more. My laptop if running on Ubuntu. When I searched through the forums, I found that although Code Composer Studio( TI's own IDE ) works with linux, it won't support debugging feature. I went through the list of the boards fully supported, partially supported etc., but was not able to figure out exactly whether it will work or not. And when it came, it worked. Thanks TI, you people are now adding both development and debugging support to linux too. I'm so sure now linux fans will be happy.

And then I found 'Energia' - arduino like IDE for launchpads. With that, development is super easy. My previous experience with arduino helped me a lot. In Energia, you can simply put your arduino code( of course modified for GPIO pins ) and it will compile for launchpads. Energia has been around for a while and recently they added supported for TM4C1294 Connected launchpad. So I decided to use Energia rather than CCS. It actually accelerated my development time a lot.

 

A walk through

Before taking you to the hardware stuff, I would like to take you to a tour about how it works. As you might have figured out from the title of this post, it works over ethernet. You can connect it to your PC's ethernet port or to your home router. I'm using it by connecting it to my wifi router, so I have coded it to acquire IP via DHCP. But if you want to use it along with your PC, you would probably have to code it for acquiring static IP. If you used arduino with ethernet sheild, you know how to do it. If you are not, it's not a big deal. You could easily google it out. And make sure that a working internet connection is available in your PC( I'll explain why later ).After connecting it to router/PC, once it acquires IP, it will print the IP address via serial port. If you connect it to your PC via USB, you can see that in your serial monitor as shown below.

image

Once you know the IP address, you can use this to connect to launchpad. Please note that only firefox is supported currently. Once you access launchpad with firefox, you will be presented with a page like this.

image

This page will allow you to control the onboard leds. I added this page as a point to test whether the connections are working fine. You can click on the 'Oscilloscope' link and it will take you to oscilloscope page, like this :

image

It has the ability to acquire from 5 analog channels and can control upto 10 GPIO pins. Feature to trigger some digital ouputs via the web interface which I think will be very useful when you want to trigger some external devices while taking the trace.

You can start measuring by clicking 'START' button. A sample trace is shown below.

image

You will be able to see traces from three channels in the figure above. After you stop the trace, you can zoom to particular part of the trace and can see individual channel values by hovering mouse over it as shown in figure below.

image

 

 

 

How it works

What happens behind the scene is really simple. Evey time you clicks a button( LED/GPIO pins ), an ajax request is framed and send to the launchpad. It will respond by a corresponding status message, which upon reception, we will update to the UI. And when you click the start button, a function is called every 100ms which will query the launchpad for analog values. Once launchpad receives this query, it will sample the first five anaog channels( A0 ~ A4 ) and reports back the values. We will update this to the graph. For graph plotting purpose, I'm using an open source charting library, dygraphs. (http://dygraphs.com/). It is an incredibly simple charting library and has lots of features. But as I said, the update happens every 100ms, the sampling is also done at only 100ms intervals, which I know is not an appreciable rate. I'm working to a prototype which can handle upto 200kHz, but it very buggy and not much efficient for now. More on this below. I have also created a demo video to explain the functionality.

 

 

Testing the idea

For testing the idea I came up with a simple test circuit as shown in figure :

image

I have added two pots to analog pins A0 and A1 each and a LED to ground via switch at A3. Also at D0, an LED is added to ground via a 4K7. So when I change the pots, a sinusoidal waveform will be caught on screen. And when I press the switch, A3 will be pulled down via an LED, plotting a square wave. When you press 'D0' button in webpage, it will trigger LED2 in the circuit. Here is a few snaps of my test setup

image

image

image

This a video of my test :

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

 

Same video in youtube( in the case you are getting any error accessing this video :

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

 

The code

You can find the code and related HTML files from here : https://github.com/v-i-s-h/scope_lite


 

Future plans

As I said, the 100ms sampling interval is not something very appreciable for serious measurements. So I'm currently working on a prototype which can handle  200+kHz. The proto type is now at a very buggy stage( almost hangs the browser after a few minutes of acquisition ) As I found it difficult to manage such a large bug prone software in Energia, I'm now porting it to CCS project where it will be easy to debug. With 2MSPS ADCs sitting inside the launchpad, sampling at higher rate is not a problem. It involves triggering ADCs via timed interrupts and optimize the ethernet packet for more efficient communications.The idea is to add more payload to each ethernet packet and send which will be unpacked at client end and plotted properly. Hope I can soon post the modified version.


A request to arduino community

As I mentioned above,  the energia is 100% code compatible with arduino. Can any one of you with a ethernet shield can compile it with arduino and post the results. I'm just curious to know how this performs in arduino.

 

Thanks a lot for reading image

 

Happy tinkering,

vish

  • Sign in to reply

Top Comments

  • Robert Peter Oakes
    Robert Peter Oakes over 10 years ago +2
    I will try it for you, I have just posted a similar concept in an Arduino tutorial and it is all still set-up so it should not take much to try Fast Track to Arduino Programming - Lesson 4b, How to use…
  • tekmeister
    tekmeister over 10 years ago +2
    Great job. This really does demonstrate the capabilities of the TI MCU nicely. Thanks for sharing.
  • project2019
    project2019 over 6 years ago

    This is a nice project. It was easy to compile and run. The webpage testing for connection establishment was awesome. But the problem which I faced was the noise that occured in the waveform. I tested it with various simple circuits but I was not able to get rid off the noise. Please help me to get the waveform out of the noise.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • kalvacherla.chandrashekhar@gmail.com
    kalvacherla.chandrashekhar@gmail.com over 9 years ago

    Hi ,

     

    I want to know if you can share the firmware that is running on the TIVA C 1294XL connected lauch pad .

    The HTML is the part on the PC that sends configuraiton data and reads ADC values from the Launch pad , but what is the firmware that needs to be running on TIVA C 1294XL connected lauch pad is required can you share the firmware .

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

    Great job. This really does demonstrate the capabilities of the TI MCU nicely. Thanks for sharing.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Robert Peter Oakes
    Robert Peter Oakes over 10 years ago

    I will try it for you, I have just posted a similar concept in an Arduino tutorial and it is all still set-up so it should not take much to try

    Fast Track to Arduino Programming - Lesson 4b, How to use an Ethernet Shield with a WEB page

     

    Peter

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 10 years ago in reply to vish

    Oh, I see. It is expected to lose parts of the signal (commercial oscilloscopes will do that too), since you cannot capture indefinitely at high sample rates. As a first step, adjustable capture rate is needed, so you can (depending on the input signal) size the sample rate to suit your input signal. To meet these requirements, the easiest way for me was to just grab a fixed volume of samples, and then process it.

    • 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 © 2025 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.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube