Giter Site home page Giter Site logo

tiny_scope's Introduction

Build Status

Tiny Scope for Arduino

Features

  • Configurable ADC speed for sampling rates from 10KHz to 300KHz (on UNO)
  • Auto grid on time base from 2ms to 50us (on UNO)
  • Vmax calibration and 3.3-5V detection using internal reference
  • 0V auto trigger
  • Display minimum-maximum voltage of captured signal
  • Square waveforms are displayed properly
  • Auto voltmeter mode when input is steady

The screenshots below are on a two-color display (yellow/blue).

Arduino UNO R3, default ADC settings Arduino UNO R3, default ADC settings, sine wave

Arduino UNO R3, fastest ADC settings Arduino UNO R3, fastest ADC settings, 255us PWM pulse

Voltmeter mode is automatically switched on with a steady voltage signal (when it would be represented by a flat line).

Voltmeter mode

Requires: Arduino UNO R3 or Teensy USB board and Monochrome 0.96" 128x64 OLED graphic display (SSD1306 driver)

Connections

  • OLED VCC - 3.3V
  • OLED GND - GND
  • OLED SCL - A5 or SCL (Teensy SCL0 pin 19)
  • OLED SDA - A4 or SDA (Teensy SDA0 pin 18)
  • PROBE WIRE - A1 (defined in tiny_scope.ino) (Teensy pin 15)
  • BUTTON - D7 button to GND

Testing

  • A1 to 5V should display 5.00 V
  • A1 to GND should display 0.00 V
  • A1 to D9 (Teensy pin 9) should display a square wave (PWM) with >2ms period and >0.5ms pulse
  • A1 to D5 should display a square wave (PWM) with >1ms period and >0.2ms pulse
  • Momentary (<0.5s) push on D7 switch cycles through available sampling speeds
  • Long >0.5s push on D7 freezes display.

Entire project

UNO R3 and Teensy 3.1 (with upside-down display mode).

Tiny Scope running on UNO R3

Tiny Scope running on Teensy 3.1

Parts

Libraries

Either use Sketch -> Import Library or make a libraries folder and drop them in there.

tiny_scope's People

Contributors

laurb9 avatar per1234 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tiny_scope's Issues

Unable to get this working on an Uno R3, or a Pro Mini. Seems to 'somewhat' work on a Leonardo

I'm hoping you can point me in the right direction - I'm trying to get this working on a 328P based atmega (to some extent, they're all the same for my purposes), but having issues. When the main module tries to run success= to fetch the analog values, I'm always getting a 0 returned, and an 'out of memory' error. I suspect the ADC reading is what's failing, but I'm not yet familiar enough with this to be able to debug it myself. Is this really capable of running on an Uno/Micro, or has it evolved to where you're doing things only the Teensy can handle?

Add FFT

Integrate an FFT library to display frequency spectrum (or dominant frequency at least).

serial data for software

I came across this so called 'LXARDOSCOPE', which uses an arduino uno to input signals to the software for Linux and I think this is a really nice enhancement for this project.

cvbs output

sometimes, the oled screen isn't enough and there are so many cheap 3,5" tft/lcd displays which can fit a arduino nano or pro mini inside and can be used as a small portable oscilloscope in the field (kwad testing, service, etc). Just a little thought!

Try u8glib

See if u8glib might work better since it supports more displays.

Low power / low noise

Enter CPU sleep modes instead of busy waiting or delay(), to reduce power usage.

Use ADC Noise Canceler mode on AVR.
From the Atmega328P docs:

24.6 ADC Noise Canceler

The ADC features a noise canceler that enables conversion during sleep mode to reduce noise induced from the CPU core and other I/O peripherals. The noise canceler can be used with ADC Noise Reduction and Idle mode. To make use of this feature, the following procedure should be used:
a. Make sure that the ADC is enabled and is not busy converting. Single Conversion mode must be selected and the ADC conversion complete interrupt must be enabled.
b. Enter ADC Noise Reduction mode (or Idle mode). The ADC will start a conversion once the CPU has been halted.
c. If no other interrupts occur before the ADC conversion completes, the ADC interrupt will wake up the CPU and execute the ADC Conversion Complete interrupt routine. If another interrupt wakes up the CPU before the ADC conversion is complete, that interrupt will be executed, and an ADC Conversion Complete interrupt request will be generated when the ADC conversion completes. The CPU will remain in active mode until a new sleep command is executed.

Note that the ADC will not be automatically turned off when entering other sleep modes than Idle mode and ADC Noise Reduction mode. The user is advised to write zero to ADEN before entering such sleep modes to avoid excessive power consumption.

autodetect AREF by comparing to internal reference

The 328P has an internal voltage reference of 1.2V. We can use that to autodetect the Vcc (3.3 or 5V).
This would not work with an external voltage divisor though, so support for that should also be added (VDIV=1, VDIV=10 etc).

No image on 128x64 display

I'm using an Arduino Nano to drive the I2C OLED display. The code works fine when I select 128x32 in the Adafruit_SSD1306 library, but then I get incorrectly scaled text. When I have the 128x64 line enabled, the display remains black. Other projects work fine when using the Arduino Nano and the 128x64 resolution. Does this have anything to do with the memory size of the Arduino?

button for changing time base

Should have a button that is used to cycle through the available ADC speeds and thus change the timebase. Probably a single button is sufficient since we only have half a dozen options.

Add a PORTABLE mode

Add a "portable" mode that doesn't use any low-level calls, so it can be used with any Arduino with whatever default ADC settings it has.

Edison support

Add support for Intel Edison on Arduino breakout board.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.