Audio Board 101

Status
Not open for further replies.

phoenixperry

Active member
I have just run my audio board for the first time. I'm trying to run Part_1_02_Hardware_Test from the examples folder verbatim.
I have double checked the solder connections. Both Arudino's serial port and mymultimeter picks up the btns and pins changing. Everything is working as expected but their is no sound. I put the audio files on the SD card without putting them in a folder or changing their names. Does it need some special formatting? I'm on windows and assumed default FAT would be ok. I checked and the board is connected to power and ground but if I run the multi meter over the audio jack there is a steady 1.54 VOUT on all 3 pins of the jack if I have the multimeter connected to ground. Shouldn't one be 0 and be ground dept on how the board is wired? I'm really stuck on what could be wrong. I'm following the hackaday tutorial pdf from Paul and Alysia's workshop.
This example doesn't even appear to be using any audio samples. Confused where I might be going wrong. Advice suggested. The code is just the example code.
Capture.PNG

// Advanced Microcontroller-based Audio Workshop
//
// http://www.pjrc.com/store/audio_tutorial_kit.html
// https://hackaday.io/project/8292-microcontroller-audio-workshop-had-supercon-2015
//
// Part 1-2: Test Hardware
//
// Simple beeping is pre-loaded on the Teensy, so
// it will create sound and print info to the serial
// monitor when plugged into a PC.
//
// This program is supposed to be pre-loaded before
// the workshop, so Teensy+Audio will beep when
// plugged in.

#include <Audio.h>
#include <Wire.h>
#include <SD.h>
#include <SPI.h>
#include <SerialFlash.h>
#include <Bounce.h>

AudioSynthWaveform waveform1;
AudioOutputI2S i2s1;
AudioConnection patchCord1(waveform1, 0, i2s1, 0);
AudioConnection patchCord2(waveform1, 0, i2s1, 1);
AudioControlSGTL5000 sgtl5000_1;

Bounce button0 = Bounce(0, 15);
Bounce button1 = Bounce(1, 15);
Bounce button2 = Bounce(2, 15);

int count=1;
int a1history=0, a2history=0, a3history=0;

void setup() {
AudioMemory(10);
pinMode(0, INPUT_PULLUP);
pinMode(1, INPUT_PULLUP);
pinMode(2, INPUT_PULLUP);
Serial.begin(115200);
sgtl5000_1.enable();
sgtl5000_1.volume(0.3);
waveform1.begin(WAVEFORM_SINE);
delay(1000);
button0.update();
button1.update();
button2.update();
a1history = analogRead(A1);
a2history = analogRead(A2);
a3history = analogRead(A3);
}




void loop() {
Serial.print("Beep #");
Serial.println(count);
count = count + 1;
waveform1.frequency(440);
waveform1.amplitude(0.9);
wait(250);
waveform1.amplitude(0);
wait(1750);
}

void wait(unsigned int milliseconds)
{
elapsedMillis msec=0;

while (msec <= milliseconds) {
button0.update();
button1.update();
button2.update();
if (button0.fallingEdge()) Serial.println("Button (pin 0) Press");
if (button1.fallingEdge()) Serial.println("Button (pin 1) Press");
if (button2.fallingEdge()) Serial.println("Button (pin 2) Press");
if (button0.risingEdge()) Serial.println("Button (pin 0) Release");
if (button1.risingEdge()) Serial.println("Button (pin 1) Release");
if (button2.risingEdge()) Serial.println("Button (pin 2) Release");
int a1 = analogRead(A1);
int a2 = analogRead(A2);
int a3 = analogRead(A3);
if (a1 > a1history + 50 || a1 < a1history - 50) {
Serial.print("Knob (pin A1) = ");
Serial.println(a1);
a1history = a1;
}
if (a2 > a2history + 50 || a2 < a2history - 50) {
Serial.print("Knob (pin A2) = ");
Serial.println(a2);
a2history = a2;
}
if (a3 > a3history + 50 || a3 < a3history - 50) {
Serial.print("Knob (pin A3) = ");
Serial.println(a3);
a3history = a3;
}
}
}
 
Last edited:
I uploaded the code in your first post (no modifications) to a Teensy 3.6, plugged headphones into the audio board jack and it beeps. It doesn't use the uSD card.

Pete
 
Last edited:
great to know - maybe my board is bonk or somehow a solder connection is bad. I checked all the logical spots and they are giving power and ground on a multimeter as are all my knobs and pins.
 
Could you try testing with a multimeter on the ground pin all SM connections to the audio jack and tell me if they all read out 1.54V?
 
Oh sadness. I got home and put on the second shield I just bought and it's flawless. I have a bad shield. I bought it an ice age ago when I ran a workshop on teensies in NYC and it's been in a box since but something must of come lose on it. Sad face. :(
Such is life.
 
Status
Not open for further replies.
Back
Top