0

Trellis Soundboard Unreliably Plays Sounds
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Trellis Soundboard Unreliably Plays Sounds

by mrdehate on Sat Jan 13, 2018 6:32 pm

Hi -

I recently assembled the Portable Trellis Soundboard (https://learn.adafruit.com/portable-trellis-sound-board?view=all) project, and I'm having some trouble. I'm using all the hardware specified in the guide.

First, when I turn on the power, a random selection of LEDs light up (it's the same set of LEDs each time, just it looks pretty random to me). Here's a picture I snapped:

lights.jpg
lights.jpg (271.09 KiB) Viewed 1289 times


Then once it's on, I get mixed results from pressing buttons. Occasionally pressing a button immediately triggers the sound. Typically there's a delay, up to 3 or 4 seconds before the sound triggers. Sometimes it plays a few times in a row, sometimes just once, and sometimes it stutters a few times before playing.

In the demo video, the LED stays lit while the sound plays - mine doesn't. It blinks as the sound starts, and that's all. Occasionally it blinks more than once, as the sound stutters to start.

Here's some pictures of my connections - I checked over everything, and re-soldered a few connections that I thought might be faulty, but with no progress.

connections1.jpg
connections1.jpg (295.09 KiB) Viewed 1289 times


connections2.jpg
connections2.jpg (95.98 KiB) Viewed 1289 times


Here's a quick (20 second) video showing what happens - there's no audio, but you can watch the lights to see the behavior above.

https://youtu.be/DO7TbZo9lq8

Software-wise, I'm using the code posted in the tutorial. The only change I've made - other than the sound file names - is uncommenting the line that says it's important.

Code: Select all | TOGGLE FULL SIZE
#include <SoftwareSerial.h>

#include <Adafruit_Soundboard.h>

#include <Adafruit_Trellis.h>

#include <Wire.h>

/************ sound board setup ***********/
// Choose any two pins that can be used with SoftwareSerial to RX & TX
#define SFX_TX 5
#define SFX_RX 6
// Connect to the RST pin on the Sound Board
#define SFX_RST 4
 
#define SFX_ACT 1 // the 'ACT'ivity LED, to tell us if we're still playing
 
// You can also monitor the ACT pin for when audio is playing!
// we'll be using software serial
SoftwareSerial ss = SoftwareSerial(SFX_TX, SFX_RX);
// pass the software serial to Adafruit_soundboard, the second
// argument is the debug port (not used really) and the third
// arg is the reset pin
Adafruit_Soundboard sfx = Adafruit_Soundboard(&ss, NULL, SFX_RST);
 
/************ Trellis setup ***********/
 
Adafruit_Trellis matrix0 = Adafruit_Trellis();
Adafruit_TrellisSet trellis =  Adafruit_TrellisSet(&matrix0);
 
// set to however many you're working with here, up to 8
#define NUMTRELLIS 1
#define numKeys (NUMTRELLIS * 16)
 
// Connect Trellis Vin to 5V and Ground to ground.
// Connect the INT wire to pin #A2 (can change later!)
#define INTPIN A2
// Connect I2C SDA pin to your Arduino SDA line
// Connect I2C SCL pin to your Arduino SCL line
 
 
char PadToTrack[numKeys][12] = {"AIRHORN OGG",
                                "AIRHORNSOGG",
                                "CENA    OGG",
                                "DAMNSON OGG",
                                "DEEZ    OGG",
                                "LEROY   OGG",
                                "PIRHORN OGG",
                                "WORKIT  WAV",
                                "EVER    WAV",
                                "AFTER   WAV",
};
 
/************ main setup ***********/
 
void setup() {
  Serial.begin(115200);
  Serial.println("Trellis Demo");
 
  // INT pin requires a pullup
  pinMode(INTPIN, INPUT);
  digitalWrite(INTPIN, HIGH);
  // ACT LED
  pinMode(SFX_ACT, INPUT);
  digitalWrite(SFX_ACT, HIGH); //pullup
 
  // begin() with the addresses of each panel in order
  trellis.begin(0x70);  // only one
 
  // softwareserial at 9600 baud
  ss.begin(9600);
 
  if (!sfx.reset()) {
    Serial.println("SFX not found");
    while (1);
  }
  Serial.println("SFX board found");
 
  uint8_t files = sfx.listFiles();
 
  Serial.println("File Listing");
  Serial.println("========================");
  Serial.println();
  Serial.print("Found "); Serial.print(files); Serial.println(" Files");
  for (uint8_t f=0; f<files; f++) {
    Serial.print(f);
    Serial.print("\tname: "); Serial.print(sfx.fileName(f));
    Serial.print("\tsize: "); Serial.println(sfx.fileSize(f));
  }
  Serial.println("========================"); 
 
  trellis.clear();
  trellis.writeDisplay();
}
 
int currentPlaying = -1;
 
void loop() {
  delay(30); // 30ms delay is required, dont remove me!
 
  if (digitalRead(SFX_ACT) && (currentPlaying != -1)) {
     // *not* playing anything according to ACT lite
     trellis.clear();
     trellis.writeDisplay();
     currentPlaying = -1;
  }
  // If a button was just pressed or released...
  if (! digitalRead(INTPIN)) {
   
    trellis.readSwitches();
    // go through every button
    for (uint8_t i=0; i<numKeys; i++) {
       // if it was pressed, turn it on
       if (trellis.isKeyPressed(i) && (i != currentPlaying)) {
    Serial.print("v"); Serial.println(i);
   
          trellis.clear();
         
          if (! digitalRead(SFX_ACT)) {
            Serial.println("stop..."); // check ACT lite first?
            if (! sfx.stop() ) {
                Serial.println("Failed to stop");
            }
          }
 
          // play!         
          char * filename = PadToTrack[i];
          int ret = sfx.playTrack(filename);
          Serial.print("Playing "); Serial.println(filename);
         
          if (! ret) {
            Serial.println("Failed to play track?");
          } else {
            trellis.setLED(i);
          }
          trellis.writeDisplay();
         
         
/* for my debugging
          int ms = 0;
          while (digitalRead(SFX_ACT)) {
             delay(1);
             ms++;
          }
          Serial.println(ms);
 */
          delay(25);  // give it a chance to start playing
          currentPlaying = i;
          break;
  }
    }
  }
}


Thanks for the help all, I'm looking forward to getting this working properly!!

mrdehate
 
Posts: 5
Joined: Fri Sep 05, 2014 10:47 pm

Re: Trellis Soundboard Unreliably Plays Sounds

by mrdehate on Sat Jan 20, 2018 4:32 pm

Hi, bumping this thread - anybody have suggestions for me?

mrdehate
 
Posts: 5
Joined: Fri Sep 05, 2014 10:47 pm

Re: Trellis Soundboard Unreliably Plays Sounds

by adaboyfruit on Thu Feb 01, 2018 12:28 am

sad to see there is no response for you yet. I hope someone who knows can help.
In the meantime double check all your solder joints, make sure the right wires are where they should be.
Then go back to basics and load the unmodified code straight from the web page with examples without any personal changes.
This way you can narrow it down to a software or hardware problem.

adaboyfruit
 
Posts: 31
Joined: Mon Jul 06, 2015 8:56 pm

Re: Trellis Soundboard Unreliably Plays Sounds

by sun_shine on Wed Apr 04, 2018 12:19 pm

Im having the exact same issue. The sound doesn't play consistently when the button is pressed, the sound plays twice, and the button lights up momentarily. I loaded the trellis test example and lights out example and the keypad works fine.
Any suggestions?
Thanks

sun_shine
 
Posts: 4
Joined: Wed Sep 28, 2016 7:29 pm

Re: Trellis Soundboard Unreliably Plays Sounds

by sun_shine on Wed Apr 04, 2018 7:13 pm

I switched over to a metro so i could use the serial monitor. If you only have a uno compile it as a metro otherwise it gets an error. soundboard example works fine and trellis examples work fine. ... So its got to be somewhere in the code.

sun_shine
 
Posts: 4
Joined: Wed Sep 28, 2016 7:29 pm

Re: Trellis Soundboard Unreliably Plays Sounds

by sun_shine on Thu Apr 05, 2018 7:26 pm

I worked out a messy solution. 1. include the 30 ms delay until you don't get multiple sounds.. by a lot. 2. Comment out both or remove the trellis.clear(); lines ONLY in the Void Loop section. 3. Replace "filename" with "i" in the play line. CHANGE this line int ret = sfx.playTrack(filename); to int ret = sfx.playTrack(i); 4. Include this if you want the lights to cycle on and off after pressing.
Change this line:
trellis.setLED(i);

To this Line:
if (trellis.isLED(i))
trellis.clrLED(i);
else
trellis.setLED(i);
Kind of messy,

sun_shine
 
Posts: 4
Joined: Wed Sep 28, 2016 7:29 pm

Re: Trellis Soundboard Unreliably Plays Sounds

by mrdehate on Sun Jun 17, 2018 5:09 pm

Hey sun_shine,

It's been a minute here but I did use your suggested changes, and it's at least closer to working. Thanks, I appreciate it!!

I'd still love to hear from someone that actually got this working as originally intended!

mrdehate
 
Posts: 5
Joined: Fri Sep 05, 2014 10:47 pm

Re: Trellis Soundboard Unreliably Plays Sounds

by gumbydammit on Mon Mar 11, 2019 4:34 pm

I know this thread is ancient, but I made an epiphany trying to get through the same problem.

What I discovered is that it seemed to work as long as I disconnected the speakers.


I suggest trying that and see if you get the same result. I'm beginning to expect something is wrong with the impedence.

I'll keep at it.

Gumby

gumbydammit
 
Posts: 4
Joined: Sun Mar 10, 2019 5:35 pm

Re: Trellis Soundboard Unreliably Plays Sounds

by Danny8846 on Wed May 22, 2019 7:22 am

Code: Select all | TOGGLE FULL SIZE
#include <Wire.h>
#include "Adafruit_Trellis.h"
#include <SoftwareSerial.h>
#include "Adafruit_Soundboard.h"
 
/************ sound board setup ***********/
// Choose any two pins that can be used with SoftwareSerial to RX & TX
#define SFX_TX 5
#define SFX_RX 6
// Connect to the RST pin on the Sound Board
#define SFX_RST 4
 
#define SFX_ACT 1 // the 'ACT'ivity LED, to tell us if we're still playing
 
// You can also monitor the ACT pin for when audio is playing!
// we'll be using software serial
SoftwareSerial ss = SoftwareSerial(SFX_TX, SFX_RX);
// pass the software serial to Adafruit_soundboard, the second
// argument is the debug port (not used really) and the third
// arg is the reset pin
Adafruit_Soundboard sfx = Adafruit_Soundboard(&ss, NULL, SFX_RST);
 
/************ Trellis setup ***********/
 
Adafruit_Trellis matrix0 = Adafruit_Trellis();
Adafruit_TrellisSet trellis =  Adafruit_TrellisSet(&matrix0);
 
// set to however many you're working with here, up to 8
#define NUMTRELLIS 1
#define numKeys (NUMTRELLIS * 16)
 
// Connect Trellis Vin to 5V and Ground to ground.
// Connect the INT wire to pin #A2 (can change later!)
#define INTPIN A2
// Connect I2C SDA pin to your Arduino SDA line
// Connect I2C SCL pin to your Arduino SCL line
 
 
char PadToTrack[numKeys][12] = {"DOIT    WAV",
                                "MAKEIT  WAV",
                                "MAKESENSWAV",
                                "HARDER  WAV",
                                "BETTER  WAV",
                                "FASTER  WAV",
                                "STRONGERWAV",
                                "WORKIT  WAV",
                                "EVER    WAV",
                                "AFTER   WAV",
};
 
/************ main setup ***********/
 
void setup() {
  Serial.begin(115200);
  Serial.println("Trellis Demo");
 
  // INT pin requires a pullup
  pinMode(INTPIN, INPUT);
  digitalWrite(INTPIN, HIGH);
  // ACT LED
  pinMode(SFX_ACT, INPUT);
  digitalWrite(SFX_ACT, HIGH); //pullup
 
  // begin() with the addresses of each panel in order
  trellis.begin(0x70);  // only one
 
  // softwareserial at 9600 baud
  ss.begin(9600);
 
  if (!sfx.reset()) {
    Serial.println("SFX not found");
    while (1);
  }
  Serial.println("SFX board found");
 
  uint8_t files = sfx.listFiles();
 
  Serial.println("File Listing");
  Serial.println("========================");
  Serial.println();
  Serial.print("Found "); Serial.print(files); Serial.println(" Files");
  for (uint8_t f=0; f<files; f++) {
    Serial.print(f);
    Serial.print("\tname: "); Serial.print(sfx.fileName(f));
    Serial.print("\tsize: "); Serial.println(sfx.fileSize(f));
  }
  Serial.println("========================"); 
 
  trellis.clear();
  trellis.writeDisplay();
}
 
int currentPlaying = -1;
 
void loop() {
  //delay(30); // 30ms delay is required, dont remove me!
 
  if (digitalRead(SFX_ACT) && (currentPlaying != -1)) {
     // *not* playing anything according to ACT lite
     trellis.clear();
     trellis.writeDisplay();
     currentPlaying = -1;
  }
  // If a button was just pressed or released...
  if (! digitalRead(INTPIN)) {
   
    trellis.readSwitches();
    // go through every button
    for (uint8_t i=0; i<numKeys; i++) {
       // if it was pressed, turn it on
       if (trellis.isKeyPressed(i) && (i != currentPlaying)) {
     Serial.print("v"); Serial.println(i);
    
          trellis.clear();
         
          if (! digitalRead(SFX_ACT)) {
            Serial.println("stop..."); // check ACT lite first?
            if (! sfx.stop() ) {
                Serial.println("Failed to stop");
            }
          }
 
          // play!         
          char * filename = PadToTrack[i];
          int ret = sfx.playTrack(filename);
          Serial.print("Playing "); Serial.println(filename);
         
          if (! ret) {
            Serial.println("Failed to play track?");
          } else {
            trellis.setLED(i);
          }
          trellis.writeDisplay();
         
         
/* for my debugging
          int ms = 0;
          while (digitalRead(SFX_ACT)) {
             delay(1);
             ms++;
          }
          Serial.println(ms);
 */
          delay(25);  // give it a chance to start playing
          currentPlaying = i;
          break;
   }
    }
  }
}


HI ADAFRUIT , i purchase ur item and when i upload this code, it does not work. my soldering is fine, everything is working properly , PLEASE reply with a solution as im getting frustrated
Last edited by adafruit_support_carter on Thu May 23, 2019 10:42 am, edited 1 time in total.
Reason: added [code] tags

Danny8846
 
Posts: 10
Joined: Sun May 05, 2019 10:26 pm

Re: Trellis Soundboard Unreliably Plays Sounds

by gumbydammit on Wed May 22, 2019 12:09 pm

I'm very upset about this project. I did the same thing. I even bought a second setup thinking I may have wired something wrong, had a bad board, or fried something. No good. Both setups had identical problems and I missed the project deadline and now I have a pile of parts I will never use. I tried to contact the company and even the person that posted the project, and NOTHING... So I blew over 200 bucks on a pile of garbage. I will never give Adafruit another penny of my money.

I hope you have a better experience. The only progress I made was finding out everything seemed to work as long as no speakers were hooked up.

I bought a serial communicator so I could look at the screen feedback and that is how I got that far.

gumbydammit
 
Posts: 4
Joined: Sun Mar 10, 2019 5:35 pm

Re: Trellis Soundboard Unreliably Plays Sounds

by adafruit_support_carter on Thu May 23, 2019 11:40 am

Sorry for huge delay in responding here. Unfortunately some posts fall through the cracks.

It's not obvious what the problem might be. The build quality looks good. There are two main hardware components here - the Trellis and the Sound Board. Let's back up and try some basic sketches for each of those. Start with Trellis. Does the basic example from the library seem to run OK?
https://github.com/adafruit/Adafruit_Tr ... isTest.ino

adafruit_support_carter
 
Posts: 13218
Joined: Tue Nov 29, 2016 2:45 pm

Re: Trellis Soundboard Unreliably Plays Sounds

by Danny8846 on Thu May 23, 2019 11:49 am

adafruit_support_carter wrote:Sorry for huge delay in responding here. Unfortunately some posts fall through the cracks.

It's not obvious what the problem might be. The build quality looks good. There are two main hardware components here - the Trellis and the Sound Board. Let's back up and try some basic sketches for each of those. Start with Trellis. Does the basic example from the library seem to run OK?
https://github.com/adafruit/Adafruit_Tr ... isTest.ino



Yes the sketch works

Danny8846
 
Posts: 10
Joined: Sun May 05, 2019 10:26 pm

Re: Trellis Soundboard Unreliably Plays Sounds

by adafruit_support_carter on Thu May 23, 2019 12:12 pm

OK, so the Trellis aspect generally works. Now for the Sound Board. Unfortunately the library example uses serial for interaction:
https://github.com/adafruit/Adafruit_So ... mmands.ino
which you don't have easy access if using a Pro Trinket per the guide.

Looks like @gumbydammit has a USB/Serial cable, so could run the above sketch. @sun_shine switched to a Metro, which is another approach.

Are you using a different board or have some way to attach to serial output?

adafruit_support_carter
 
Posts: 13218
Joined: Tue Nov 29, 2016 2:45 pm

Re: Trellis Soundboard Unreliably Plays Sounds

by Danny8846 on Thu May 23, 2019 12:19 pm

adafruit_support_carter wrote:OK, so the Trellis aspect generally works. Now for the Sound Board. Unfortunately the library example uses serial for interaction:
https://github.com/adafruit/Adafruit_So ... mmands.ino
which you don't have easy access if using a Pro Trinket per the guide.

Looks like @gumbydammit has a USB/Serial cable, so could run the above sketch. @sun_shine switch to a Metro, which is another approach.

Are you using a different board or have some way to attach to serial output?


I have a feeling, that because of the "include <SoftwareSerial.h>" in the sketch, the pro trinket is unable to communicate with the soundboard,this is my theory. do you think this could be the case?

Danny8846
 
Posts: 10
Joined: Sun May 05, 2019 10:26 pm

Re: Trellis Soundboard Unreliably Plays Sounds

by adafruit_support_carter on Thu May 23, 2019 12:26 pm

No, that's needed. It's how it talks to the Sound Board:
Code: Select all | TOGGLE FULL SIZE
SoftwareSerial ss = SoftwareSerial(SFX_TX, SFX_RX);

But that approach is somewhat specific to the Pro Trinket. If you're using another board that has an available hardware serial port, it could be used. But the code would need to be changed.

adafruit_support_carter
 
Posts: 13218
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.