Summary of SuperScope: Circuit Simulation through Arduino-Processing Interface
This project, SuperScope, is an Arduino and Processing-based tool designed to test electronic components (capacitors, inductors, resistors) and visualize circuit behavior through frequency-domain plots, vector diagrams, and phasors. The Arduino reads component values and sends the data to Processing, which provides graphical representations. The project requires wiring a circuit including an LM339 comparator or an op-amp, and running provided Arduino and Processing codes to measure and display component values and signals.
Parts used in the SuperScope Project:
- Arduino
- Resistors
- Capacitors
- Inductive Components (inductors, ferrite chokes, motors, transformers)
- Solderless Breadboard
- LM339 Comparator IC
- 555 Timer IC (preferably TLC555)
nto the program where you can physically manipulate them.
Arduino tests for the value of the component (a capacitor, inductor, resistor, or waveform of specific frequency) then sends the data to Processing.
Imported components can then be plugged into circuit schematics.
SuperScope builds upon the mission of Arduino, the interface between hardware and software, analog and digital.
SuperScope provides the user with three graphical representations of the circuit.
The first is the basic frequency-domain plot; graphing voltage vs. frequency.
The second is the vector diagram; depicting the phase and magnitude of the output.
The third is a phasor; a dynamic, analytical representation of the output’s phase and magnitude relative to the input’s.
Step 1: What You Will Need
*Arduino – Available @ RadioShack [Catalog #: 276-128 http://www.radioshack.com/product/index.jsp?productId=12268262] *Resistors – Available @ RadioShack [Catalog #: 271-003 http://www.radioshack.com/product/index.jsp?productId=2994585] *Capacitors – Available @ RadioShack [Catalog #: 272-802 http://www.radioshack.com/product/index.jsp?productId=2062376] *Inductive Components (inductors, ferrite chokes, motors, transformers) – Available @ RadioShack [Catalog #: 273-102 http://www.radioshack.com/product/index.jsp?productId=2103978] *SolderlessBreadBoard – Available @ RadioShack [Catalog #: 276-098 http://www.radioshack.com/product/index.jsp?productId=12165713] *LM339 Comparator (probably my absolute favorite IC) – Available @ RadioShack [Catalog #: 276-1712 http://www.radioshack.com/product/index.jsp?productId=2062593] *555 Timer (I recommend the TLC555) – Available @ RadioShack [Catalog #: 276-1718 http://www.radioshack.com/product/index.jsp?productId=2062595]
Step 2: Circuit Schematic
Wire it up like this.
If you are using an op-amp instead of the LM339 comparator you may need to add in the positive feed-back loop depicted in the schematic.
The component you are testing connects to the two open circles.
Step 3: 1523 lines of code on the wall…
The Processing Code:
The code is so large that instructables won’t let me upload it as text :p
A text file and the processing app file are attached.


Step 4: Whew… only 94 lines this time
//The Arduino Code:
///////////////////////////////
#include <math.h>
byte chargePin = 9;
byte triggerPin = 8;
byte noninvertingPin = A0;
byte invertingPin = A1;
float constRes = 100;
unsigned long timeStart;
unsigned long timeEnd;
unsigned long timeDelta;
unsigned long capacitance;
unsigned long inductance;
unsigned long resistance;
unsigned long frequency;
String str;
char c;
void setup() {
Serial.begin(9600);
pinMode(chargePin, OUTPUT);
pinMode(triggerPin, INPUT);
pinMode(noninvertingPin, INPUT);
pinMode(invertingPin, INPUT);
str = “”;
c = ‘\n’;
}
void loop() {
while((Serial.available() > 0)) {
c = Serial.read();
if(!(c==’\n’)) {
str += c;
}
else {
if(str == “requestFarads”) {
testCapacitance();
Serial.println(capacitance);
}
else if(str == “requestHenrys”) {
testInductance();
Serial.println(inductance);
}
else if(str == “requestOhms”) {
testResistance();
Serial.println(resistance);
}
else if(str == “requestHertz”) {
testFrequency();
Serial.println(frequency);
}
str=””;
while(Serial.available()>0) Serial.read();
}
}
*Resistors
*Capacitors
For more detail: SuperScope: Circuit Simulation through Arduino-Processing Interface