Nano Audio Experimenter Sheild PCB Build Guide

Here are the build notes for my Nano Audio Experimenter Sheild PCB.

Warning! I strongly recommend using old or second hand equipment for your experiments.  I am not responsible for any damage to expensive instruments!

If you are new to Arduino, see the Getting Started pages.

Bill of Materials

  • Nano Audio Experimenter Sheild PCB (GitHub link below)
  • 1x 6N138 optoisolator
  • 1x 1N914 or 1N4148 signal diode
  • 1x 75Ω resistor
  • 4x 220Ω resistors
  • 1x 270Ω resistor
  • 1x 4K7 resistor
  • 3x 10K PCB mount potentiometers (see photos for footprint)
  • 1x 68nF ceramic capacitor
  • 3x 100nF ceramic capacitor
  • 1x 10uF electrolytic or non-polar capacitor
  • 1x 100uF electrolytic capacitor
  • 2x 180 degree DIN PCB mounted sockets (see photos for footprint)
  • 1x TRS PCB mount socket (see photos for footprint)
  • 1x 2.1mm barrel jack socket (see photos for footprint)
  • 1x MCP4725 DAC module, pinout: OUT-GND-SCL-SDA-VCC-GND
  • 1x SSD1306 128×32 OLED display, pinout: GND-VCC-SCL-SDA
  • pin headers
  • 2x 15 way pin header sockets
  • 2x jumpers
  • Optional: DPDT switch with 2.54mm pin spacings
  • Optional: 8-pin DIP socket
  • Optional: 1x 6-way pin header socket
  • Optional: 1x 4-way pin header socket

Build Steps

Taking a typical “low to high” soldering approach, this is the suggested order of assembly:

  • All resistors and diode.
  • DIP socket (if used), TRS socket, and DPDT switch (if used).
  • Disc capacitors.
  • Pin headers.
  • Pin header sockets.
  • Barrel jack
  • If using extended Arduino headers, now is a good time to solder those.
  • Non-polar or electrolytic capacitors.
  • DIN sockets.
  • Potentiometers.

Here are some build photos.

Testing

I recommend performing the general tests described here: PCBs.

The following sketches can be used to test various elements of the board:

Simple Analog Read

void setup() {
  Serial.begin(9600);
}

void loop() {
  for (int i=0; i<3; i++) {
    int aval = analogRead(A0+i);
    Serial.print(aval);
    Serial.print("\t");
  }
  Serial.print("\n");
  delay(100);
}

I2C Scanner

The following code will show any detected I2C devices. If the display and MCP4725 are plugged in then both should be detected. In my case the default addresses are:

  • SSD1306 address = 0x3C
  • MCP4725 address = 0x60
#include <Wire.h>
void setup()
{
  Wire.begin();

  Serial.begin(9600);
  while (!Serial);
  Serial.println("\nI2C Scanner");
}


void loop()
{
  byte error, address;
  int nDevices;

  Serial.println("Scanning...");

  nDevices = 0;
  for(address = 1; address < 127; address++ ) 
  {
    Wire.beginTransmission(address);
    error = Wire.endTransmission();

    if (error == 0)
    {
      Serial.print("I2C device found at address 0x");
      if (address<16) 
        Serial.print("0");
      Serial.print(address,HEX);
      Serial.println("  !");

      nDevices++;
    }
    else if (error==4) 
    {
      Serial.print("Unknown error at address 0x");
      if (address<16) 
        Serial.print("0");
      Serial.println(address,HEX);
    }    
  }
  if (nDevices == 0)
    Serial.println("No I2C devices found\n");
  else
    Serial.println("done\n");

  delay(5000);
}

MIDI Circuits

Use the Simple MIDI Serial Monitor with something connected to both MIDI IN and OUT ports and any note data received should flash the on-board LED and be echoed over to the MIDI OUT port.

SSD1306 Display

Use the Adafruit SSD1306 display example: ssd1306_128x32_i2c. Be sure to check the pinout of the SSD1306 module you’re using. Some swap VCC and GND and some swap SCL and SDA. This requires the pinout: GND-VCC-SCL-SDA.

The example code will assume an I2C address of 0x3C for a 128×32 display.

MCP4725

With the jumper for D3/D9 removed and the MCP4725 connected, the following code should output a tone controlled by the three potentiometers.

This is essentially the code as used for MCP4725 and Mozzi – Part 2 with a couple of additions and configuration for the three potentiometers.

PCB Errata

There are the following issues with this PCB:

  • None known at present.

Enhancements:

  • It would have been nice to include some oscilloscope test points.
  • Another nice addition might have been an on/off switch.
  • There is also room for more IO pins from the Nano to be broken out. 

Find it on GitHub here.

Closing Thoughts

This is an experimenter board and for that I’m really pleased with the result.

I’m still not sure it will be practical to run both an I2C display and I2C DAC at the same time, but again I’ll do some experimenting to see.

In theory this should also work with any board with a Nano footprint, so I should try it out with a Nano Every board too.

Kevin

Leave a comment