Scope-O-Matic, an Arduino Nano based oscilloscope in Eurorack format

As in double up as a tuner @analogoutput?

Yes it (still) has. Just a matter of switching it on again.

The code contains a block that lets you choose what you see. I added this because I anticipated that a question like this would occur. I use the code with the SIMPLIFIED define defined. [Edit] I added 2 lines initially for displaying the frequency. Given the change in layout that needs a different value for the y-coordinate as well. They are commented out here. The frequency values change very erratically so that is why I left displaying them out. This could be entirely due to the input signals Iā€™ve used so far.


#define SIMPLIFIED

#ifdef SIMPLIFIED
  #define BEGIN_X 0   // Begin position of plot on x-axis
  #define DISPLAY_ZERO_LINE 1
//  #define FREQ_Y 0
//  #define DISPLAY_FREQUENCY 1
#else
  #define BEGIN_X 24  // Begin position of plot on x-axis
  #define DISPLAY_AVERAGE_TR 1
  #define DISPLAY_ZERO_LINE 1
  #define DISPLAY_VERTICAL_MARKS 1
  #define DISPLAY_VERTICAL_LINES 1
  #define DISPLAY_VERTICAL_LINE_LEFT 1
  #define DISPLAY_AVERAGE_TR 1
  #define DISPLAY_AVERAGE_TL 1
  #define DISPLAY_CENTER_VALUE 1
  #define DISPLAY_DUTY_CYCLE 1
  #define DISPLAY_FREQUENCY 1
  #define FREQ_Y 12
  // vertical position of plotted frequency in pixels
#endif

4 Likes

Definitely want to build one. The trigger looks like it works well. Can the trigger be set to a different position on the screen, like far left instead of in the center of the screen?

3 Likes

The short answer is: Yes, easy peazy. It is all done in software after all.

It is just a matter of reorganizing some coordinates. Have a look at the function dispInf():

void dispInf() {                          // Display of various information
  float voltage;
  // display vertical sensitivity
  oled.setCursor(2, 0);                   // around top left
  oled.print(vScale);                     // vertical sensitivity value
  if (scopeP == 0) {                      // if scoped
    oled.drawFastHLine(0, 7, 27, WHITE);  // display scoped mark at the bottom
    oled.drawFastVLine(0, 5, 2, WHITE);
    oled.drawFastVLine(26, 5, 2, WHITE);
  }

  // horizontal sweep speed
  // Code left out for clarity

  // trigger polarity
  oled.setCursor(75, 0);                  // at top center
  if (trigD == 0) {                       // if positive
    oled.print(char(0x18));               // up mark
  } else {
    oled.print(char(0x19));               // down mark              ā†“
  }
  if (scopeP == 2) {                      // if scoped
    oled.drawFastHLine(71, 7, 13, WHITE); // display scoped mark at the bottom
    oled.drawFastVLine(71, 5, 2, WHITE);
    oled.drawFastVLine(83, 5, 2, WHITE);
  }

Note: the function is only shown partially.

If e.g. you swap the coordinates for displaying the vertical sensitivity with the ones used for showing the trigger polarity, you will effectively have moved the trigger to the left ( and the sensitivity to the right ). The draw commands follow this scheme: oled.drawFunction(x, y, length, color). The x-value varies from 0 to 127 and the y values vary from 0 to 63. Note however that if you change the positions like this, the visible sequence of walking through the menu items will change as well.

6 Likes

The funny thing is I was looking for a project like this two days ago! Looks like I can add this to the pile of things Iā€™m trying to get finished :smiley: excellent work!

5 Likes

This is extremely cool and helpful !!!

3 Likes

this looks cool, something I have been thinking of adding for a long time. Looking at Arduino compatible screens on taobao (China) I can see bigger ones (1.8 and 2.4") but they have more pins, is the project adaptable to those?

1 Like

The schematic shows pinout GND-VCC-SCL-SDA for the OLED. As pointed out here, sometimes these OLEDs have that pinout and sometimes VCC-GND-SCL-SDA. For a build like Josā€™s itā€™s just a matter of keeping track and doing the wiring accordingly. A hypothetical PCB implementation with the OLED going directly into a header on the PCB would have to be designed either for one pinout but not the other, or with jumpers to choose the pinout.

5 Likes

The I2C protocol uses only four pins including ground and VCC. The other two are SCL and SDA, clock and data respectively. If the display has more pins that means it uses a different protocol so itā€™s incompatible with this design.

5 Likes

Which is not to say itā€™s not ā€œadaptableā€, just that there would be changes to the schematic and the code.

4 Likes

Yeah, if not for the pinout, it would be completely compatible, except for the code.

4 Likes

Hereā€™s a display with 128x128 pixels, supports I2C. On the face of it this may be a good candidate for a larger display on the module. You still may have to adapt the code though.

4 Likes

Good info, Iā€™ll check if there are other screens which are I2C compatible.

2 Likes

I found some on wish a short time ago.

1 Like

These are the ones i picked up.

4pcs for $18.99

1 Like

just bought a bunch to try with this project, ranging from about a dollar for a 0.96" to a whoipping 3 dollars for some of the bigger ones.

1 Like

Jumpers would be a wise choice I think.

2 Likes

Iā€™ve done a bit of searching but havenā€™t found any i2c displays with a resolution higher than 128 x 128. I wonder whether there is a technical reason for that. Any ideas?

1 Like

At some point you reach the maximum practical refresh rate. The tighter the bottleneck the sooner that will be.

3 Likes

Hereā€™s a link to a somewhat larger and higher resolution display I bought recently. It uses an 8 bit parallel interface with several control lines. You might get away with running that screen from an Arduino Uno or Nano, but to get the best out of it you need an Arduino Mega which has lots of data pins to spare.