A better video of my DIY arduino-based oscilloscope. The only sound in the room was the Venture Bros. blaring from my laptop at top volume, so I just muted it so you wouldn’t have to listen to it, but I will post another video with a piezo element connected to the signal line so you can hear what it sounds like.
Node Chomsky
Posts tagged oscilloscope
This is the output from My Arduino based DIY oscilloscope with the 4D Oled screen. Code available in a prior post. The trigger works fairly well, it has a threshold and slope adjustment.
Oscilloscope for Arduino and 4D graphics controller oled screen
//////////////////////////////////////////////////////////////////////////////
// Basic Oscilloscope for the Arduino and
// 4D graphics controller based Oled screen
//
// Based on a template for the GOLDELOX-SGC Processor by
// Paul J Karlik <-Thank him for finally writing a library for the screen
// Cubtastic71@gmail.com
//
// The <Oled.h> library is available at:
// http://code.google.com/p/arduino-oled/
//
//////////////////////////////////////////////////////////////////////////////
#include <Oled.h>
#include <string.h>
#include <Wire.h>
// Int an Define the Base Vars and Params ////////////////////////////
OLED myOLED(7,8,2500,57600);
int color=0;
int color2=12;
int color3=36;
int tick = 0;
int trigger = 0;
int signal[5];
int x = 0;
int y = 0;
int px = 96;
int py = 0;
int sigtol = analogRead(A1);
// Set Up Function ///////////////////////////////////////////////////
void setup(){
Serial.begin(57600);
pinMode(10, OUTPUT);
digitalWrite(10,HIGH);
myOLED.Init();
myOLED.Clear();
color = myOLED.get16bitRGB(25,25,25);
color3 = myOLED.get16bitRGB(0,255,0);
color2 = myOLED.get16bitRGB(0,0,0);
}
// Main Program Loop ////////////////////////////////////////////////
void loop(){
//// This ‘while loop’ draws one frame of the graph
while (x <= 96) {
x++;
myOLED.DrawLine(px, py, x, y, color);
px = x;
py = y;
y=(((analogRead(A0)) / 16));
}
// This ‘analogRead()’ and ‘while loop’ allow the device to wait
// for an increasing slope from the Attack of the incoming signal
signal[4] = analogRead(A0);
while ((signal[3] - signal[4]) <= sigtol) {
sigtol = analogRead(A1); //analogRead(A1) reads a 1k pot connected to pin A1
delay(1); //to use as a 1 to 1 threshold for the trigger
signal[4] = analogRead(A0);
delay(1);
delay(int(analogRead(A2)/200));//The slope of the threshold for the trigger with a 1k pot to pin A2
signal[3] = analogRead(A0);
delay(1);
//if you have cut and pasted this from my website, you may have to retype the //following command manually, because of character translation
myOLED.DrawText(1,1,0,”hold”,color3);
}
//This sets origin points for the new frame and clears the screen by drawing a rectangle
x=0;
px = 0;
myOLED.DrawRectangle(0,0,96,64,color2);
}
oLED + Arduino Oscilloscope, trigger, zoom, filtering and sensitivity to come!
Here are the libraries I used:
http://code.google.com/p/arduino-oled/downloads/list
The oLED in this is the 96 x 64 pixel oLed display with a 4D systems graphics controller, this is all done with serial commands from the arduino which results in graphics rendering by the screens controller.