Audio FX soundboard volume level

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
mikejo2018
 
Posts: 5
Joined: Mon Nov 20, 2017 6:20 pm

Audio FX soundboard volume level

Post by mikejo2018 »

I have the Adafruit Audio FX Sound Board (2MB) with the built in 2x2W Amp, using with 2 small 1W Speaker - 8 ohm (30 x 20 x 4mm) and the volume is way too low. It's simply for some ray-gun blaster effects and resetting the volume each time it's turned on and off is not feasible. How do I increase the volume? Thanks!

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Audio FX soundboard volume level

Post by adafruit_support_mike »

Try connecting the '+' pin to GND.

Looking through the VS1000 datasheet, it looks like the volume will increase continuously if the pin is held low for more than about half a second.

User avatar
mikejo2018
 
Posts: 5
Joined: Mon Nov 20, 2017 6:20 pm

Re: Audio FX soundboard volume level

Post by mikejo2018 »

No impact.

User avatar
iseesam
 
Posts: 2
Joined: Thu Jan 31, 2013 12:09 pm

Re: Audio FX soundboard volume level

Post by iseesam »

Looking at the data sheet, I believe that the vol + pin should be connected to VDD, rather than GND, to increase the volume. I haven't tried it myself, but that's how I'm reading it. Let me know if it works.

User avatar
mikejo2018
 
Posts: 5
Joined: Mon Nov 20, 2017 6:20 pm

Re: Audio FX soundboard volume level

Post by mikejo2018 »

If by 'VDD' you mean the positive power input (VIN on the board, since there is no VDD pin), it didn't have an impact either, but the red light that flashes when the sound is being produced got brighter while the volume + was connected to the VIN (batt +) input. Maybe it's already at full volume? It's really quiet.

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Audio FX soundboard volume level

Post by adafruit_support_mike »

Let's get a baseline for comparison: does the volume change at all when you connect the '+' or '-' pins to GND? Each short connection should change the volume by 0.5db, so it will take several clicks to see a significant difference.

User avatar
mikejo2018
 
Posts: 5
Joined: Mon Nov 20, 2017 6:20 pm

Re: Audio FX soundboard volume level

Post by mikejo2018 »

No change in volume at all.

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Audio FX soundboard volume level

Post by adafruit_support_mike »

Post a photo showing your hardware and connections please. Let's make sure everything looks good there.

800x600 images usually work best.

User avatar
mikejo2018
 
Posts: 5
Joined: Mon Nov 20, 2017 6:20 pm

Re: Audio FX soundboard volume level

Post by mikejo2018 »

I can do that, but as a test I also got the Adafruit Audio FX Mini Sound Board (16MB) and the Mono 2.5W Class D Audio Amplifier and 2 other speakers from Adafruit, the Mini Metal Speaker (8 ohm 0.5W) and the Thin Plastic Speaker. I wired them up and the thin plastic speaker is loud enough for my application (the mini metal speaker didn't produce enough sound), but in both cases, nothing I do seems to impact the volume one way or the other. I believe that since I can load sounds on both and they play when the triggers are grounded, it must be wired correctly, just can't seem to address the volume. Please let me know if you still want photos, thanks!

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Audio FX soundboard volume level

Post by adafruit_support_mike »

Based on those symptoms, I'd guess the limiting factor on volume is the FX Board's power supply.

Even small speakers can use a lot of current, and changing the volume settings won't make any difference if the speaker is already using all the available energy.

User avatar
Dfitterman
 
Posts: 100
Joined: Sat Apr 15, 2017 10:57 am

Re: Audio FX soundboard volume level

Post by Dfitterman »

I am having a similar problem not being able to programmatically change the volume of an FX sound board. I had been using a Pro Trinket with a 2x2W amplifier, 2Mb memory board in UART mode playing through a pair of 4 ohm speakers. I’ve switched to a headset output board with an Arduino UNO to simplify testing. The results are the same.

I have been able to get a recording to play in UART mode. I hooked up two pushbutton switches to control the volume. One switch connects pin 7 (volUpPin) of the UNO to ground, while the other switch connects pin 6 (volDownPin) to ground when pressed.

Here is the sketch that I used:

Code: Select all

//  FXSoundTest sketch

//  sketch to test playing sound files on Adafruit FX Sound Board
//  This sketch will be used in the maskAnimate sketch to play sound files
//  before and after mask activation.

//  written by d. v. fitterman, Aviva GeoTech, september 2017
//  Copyright (c) Aviva GeoTech 2017. All rights reserved.

//  modified 11 september 2017
//  modified 29 november 2017 - testing with Pro Trinket in breadboard, changed pin numbers
//  modified 5 december 2017 - using Arduino UNO to test volume up and down commands
//                             from Adafruit_Soundboard library.

#include <SoftwareSerial.h>

//  Uses Adafruit sound board library
#include "Adafruit_Soundboard.h"

#include <Bounce2.h>
//  === Changed debounce .update() method
//  #define BOUNCE_WITH_PROMPT_DETECTION commented out in Bounce2.h

//  N.B. Sound Board UG pin must be grounded to put sound board into UART mode

//  Arduino pin assignments
//  SofwareSerial (UART mode) transmit and receive pins
#define SFX_TX 15
#define SFX_RX 14

//  Sound Board reset pin
#define SFX_RST 16

//  Sound Board activity pin
#define SFX_ACT 12

//  volume control pinss
const int volUpPin = 7;
const int volDownPin = 6;

//  volume control lines
Bounce volUpLine = Bounce();
Bounce volDownLine = Bounce();

//  debounce timeout
const uint16_t dbTime = 5;

// create software serial stream object
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);

void setup() {

  pinMode(SFX_ACT, INPUT_PULLUP);

  // FX SOUND VOLUME INCREASE line
  pinMode(volUpPin, INPUT_PULLUP);
  volUpLine.attach(volUpPin);
  volUpLine.interval(dbTime);

  // FX SOUND VOLUME DECREASE line
  pinMode(volDownPin, INPUT_PULLUP);
  volDownLine.attach(volDownPin);
  volDownLine.interval(dbTime);

  //  start serial monitor port
  Serial.begin(9600);
  Serial.println("Adafruit Sound Board!");

  // start software serial stream
  ss.begin(9600);

  char song1[] = "JWELLER1OGG";

  //  digital line to check if FX board is playing
  bool activityLine;

  //  track sizes
  uint32_t current, total;

  //  play song
  Serial.println("* BEFORE SONG 1");
  sfx.playTrack(song1);
  delay(200);
  activityLine = digitalRead(SFX_ACT);
  Serial.print("activityLine="); Serial.print(activityLine);
  Serial.print(" ~ playing 1 "); Serial.println(song1);

  //  loop while recording is playing
  while ( activityLine == LOW) {
    activityLine = digitalRead(SFX_ACT);
    Serial.print("ACTIVITY LINE: "); Serial.println(activityLine);

    Serial.print("TRACK SIZE: ");
    if ( sfx.trackSize(&current, &total) ) {
      Serial.print("TOTAL="); Serial.print(total);
      Serial.print(" PERCENT PLAYED="); Serial.println(100 * (total - current) / total);
      delay(500);
      volUpLine.update();
      int volUp = volUpLine.read();
      volDownLine.update();
      int volDown = volDownLine.read();
      Serial.print("volUp="); Serial.print(volUp); Serial.print(" volDown="); Serial.println(volDown);
      delay(500);
      uint8_t fxVol = 0;  //  volume returned by FX board
      if ( volUp == 0 ) {
        fxVol = sfx.volUp();
        Serial.print("UP pressed: volUp="); Serial.print(volUp); Serial.print(" fxVol="); Serial.println(fxVol);
      } else if ( volDown == 0) {
        fxVol = sfx.volDown();
        Serial.print("DOWN pressed: volDown="); Serial.print(volDown); Serial.print(" fxVol="); Serial.println(fxVol);
      }

    }

  }
}


void loop() {
}
While the sound is playing the FX activity line (ACT line LOW) the switch lines are also monitored. If either switch lines goes LOW a command to reduce or increase the volume is issued using the Adafruit_Soundboard::volDown() or Adafruit_Soundboard::volUp() FX board member function, respectively. Holding down either switch for several seconds should change the volume. The recording lasts for about 60 seconds, so there is sufficient time to see if the volume level changes.

The volUp() and volDown() commands are supposed to return the volume state of the board. A value of zero is always returned. The volume has never changed.
This is the terminal output before either switch is pressed:

Code: Select all

Adafruit Sound Board!
* BEFORE SONG 1
activityLine=0 ~ playing 1 JWELLER1OGG
ACTIVITY LINE: 0
TRACK SIZE: TOTAL=933105 PERCENT PLAYED=30
volUp=1 volDown=1
This is the ouput when the DOWN switch is pressed,

Code: Select all

ACTIVITY LINE: 0
TRACK SIZE: TOTAL=933105 PERCENT PLAYED=31
volUp=1 volDown=0
DOWN pressed: volDown=0 fxVol=0
ACTIVITY LINE: 0
TRACK SIZE: TOTAL=933105 PERCENT PLAYED=33
volUp=1 volDown=0
DOWN pressed: volDown=0 fxVol=0
ACTIVITY LINE: 0
TRACK SIZE: TOTAL=933105 PERCENT PLAYED=34
volUp=1 volDown=0
and this is the ouptut when the UP switch is pressed.

Code: Select all

UP pressed: volUp=0 fxVol=0
ACTIVITY LINE: 0
TRACK SIZE: TOTAL=933105 PERCENT PLAYED=41
volUp=0 volDown=1
UP pressed: volUp=0 fxVol=0
ACTIVITY LINE: 0
TRACK SIZE: TOTAL=933105 PERCENT PLAYED=43
volUp=0 volDown=1
UP pressed: volUp=0 fxVol=0
ACTIVITY LINE: 0
TRACK SIZE: TOTAL=933105 PERCENT PLAYED=44
volUp=0 volDown=1
Any ideas why this isn’t working?

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Audio FX soundboard volume level

Post by adafruit_support_mike »

What are you using as a power source? A with the issue above, the speakers might already be using all the available current.

User avatar
Dfitterman
 
Posts: 100
Joined: Sat Apr 15, 2017 10:57 am

Re: Audio FX soundboard volume level

Post by Dfitterman »

The power source is one of your 12V 5A supplies (ID 352). I use a 7805 to get 5V for the amplifier FX board. There is nothing else connected to this supply when the audio is playing. Do you think that this should be able to supply enough power? At the 1.5A rating of the 7805 that gives 7.5W, and if only 50% efficiency for the power-supply, amplifier combination that should be nearly adequate for full volume (4W).

If I only connect 1 speaker for a test, won't this require half as much power? Then surely a volume increase would be possible.

I will try experimenting with reducing the volume. If that works, then your idea about the power supply not have enough capacity might be right. If I can't reduce the volume, then there is something wrong with the UART volume control.

When the FX board starts up under UART control, what level is the volume set to? Maximum, average, something else?

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Audio FX soundboard volume level

Post by adafruit_support_mike »

The FX Board boots with the volume at 50%.

Post a photo showing your hardware and connections and we'll see if we can find any clues there. 800x600 images usually work best.

User avatar
Dfitterman
 
Posts: 100
Joined: Sat Apr 15, 2017 10:57 am

Re: Audio FX soundboard volume level

Post by Dfitterman »

Thanks for the reply.
I'm not sure that posting a photo is going to help as I have the FX board mounted on a perma-proto board with a Pro Trinket and some other parts.

Nonetheless, I think that I have figured out what is going on.

I wanted to be able to adjust the volume up or down while a recording is playing by monitoring two lines on the Pro Trinket to see if volume up or down switches are pressed. It appears that the volUp() and volDown() member functions in the soundboard library do no affect a recording while it is playing. If these commands are used BEORE playing a recording, you can hear a change in the volume. This is not very helpful if you want to be able to adjust the volume in realtime. Is there anyway to do a realtime adjustment?

I also noticed that the volume level returned by the volUp() and volDown() calls are always zero if they are issued while a recording is being played. If the FX board can be queried to see how much of a recording has played, why can other functions work during playback?

The only unusual think about my configuration is that the FX board reset pin is not attached to anything. In the sketch it is defined as pin 17 simply to give the Adafruit_Soundboard class call a place holder. I'm guessing that the FX board is not being reset. Does this mean that any previous volume adjustments are still set in the FX board? If the reset pin were attached to a Pro Trinket pin would this return the board to some default volume?

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”