Audio FX Sound Board UART volume control problems

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
geewillikerz
 
Posts: 8
Joined: Mon Nov 08, 2010 6:48 pm

Audio FX Sound Board UART volume control problems

Post by geewillikerz »

Using the Adafruit_Soundboard library, I was having trouble controlling the volume of the soundboard from my arduino pro mini with the volUp() and volDown() commands. (playTrack() is working fine).

Decided to backtrack and reloaded the menucommands.ino file from the examples. All the menu commands work fine, except the two volume ones. When I send a + or a - character, I get the message "Failed to adjust".

Any suggestions?

User avatar
geewillikerz
 
Posts: 8
Joined: Mon Nov 08, 2010 6:48 pm

Re: Audio FX Sound Board UART volume control problems

Post by geewillikerz »

More info...

This is getting stranger. I happen to have 3 audio fx boards on hand and the problem is occurring on all of them.

With a second audio fx board I load the menucommands.ino arduino file and am then able to use the list function, and the volume functions work as well UNTIL I play any file, after which the volume function returns "Failed to adjust" until I use the "r" command to reset the board. The volume controls then work again until I play any file when they stop.

On a third audio fx board without having loaded any music tracks (one already existed called "T0.OGG") the volume controls worked before and after the file was played. Then I loaded some different music tracks and then the behaviour became just like the second board (volume only works until you play and track, then no more until a reset). I tried erasing the extra files, I tried reformatting the drive, I tried using windows instead of mac, I tried WAV files instead of OGG, but the problem remains. I can only use UART commands to control volume until playing a file, and then they won't work anymore until resetting the board.

Anyone else experience this? Any ideas?

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

Re: Audio FX Sound Board UART volume control problems

Post by adafruit_support_mike »

I've never seen a report of that happening, and the fact that it's happening across all three boards suggests a problem in that specific connection setup.

What voltage is the Pro Mini running at/using on its GPIO pins, and what voltage are you using to supply the FX Boards?

User avatar
geewillikerz
 
Posts: 8
Joined: Mon Nov 08, 2010 6:48 pm

Re: Audio FX Sound Board UART volume control problems

Post by geewillikerz »

Everything is at 5V.

I've tried a few different things. Initially I had the (5V 16Mhz) pro mini's VCC pin and the audio FX board's Vin both getting power from the FTDI cable which I was using for serial communication with the computer (both boards are on a breadboard, and the arduino's VCC pin provides voltage to the power rail when the FTDI cable is connected). Then I removed the red wire from the FTDI cable and powered both boards from the 5.2 regulated power from an adafruit powerboost 1000. Then I kept grounds connected but powered the audio FX with an external 1A 5V regulated USB "power bank" separately from the arduino (which got its power from the powerboost). I get the same result every way that I try it.

All other commands in the menucommand.ino file work fine... it can list and play files. It can only adjust the volume before playing the first file, and then returns "Failed to adjust" after that until I send the "r" command to reset.

I really need volume control on this project. If it's impossible to get the UART commands to work, would it work to place a dual gang potentiometer on the R and L outputs from the mini audio FX and control the audio level that way? It's going to a portable self powered speaker (but I won't be able to reach the actual speaker to reduce the volume on it). If so, what value of pot would be appropriate?

Thanks so much for any advice!

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

Re: Audio FX Sound Board UART volume control problems

Post by adafruit_support_mike »

Do you need to trigger the songs through the UART connection?

If you only need volume control, you can connect a pair of microcontroller pins to the + and - pins on the side of the FX Board. Every time you pull one low, it will raise or lower the volume by about half a decibel.

User avatar
geewillikerz
 
Posts: 8
Joined: Mon Nov 08, 2010 6:48 pm

Re: Audio FX Sound Board UART volume control problems

Post by geewillikerz »

That might work with the regular Audio FX board, but I've only got one of those and three Audio FX mini boards and they don't have the vol + and - pins. Besides, aren't those pins bypassed when the board is in UART mode anyway (when UG is grounded)? I still need to trigger the sounds via UART because I'll be using more than 7 sounds.

How about analog solution with the potentiometer I mentioned in my last post? Would that work? If so, what value of potentiometer would be appropriate (aside from it being log rather than linear)?

Thanks!

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

Re: Audio FX Sound Board UART volume control problems

Post by adafruit_support_mike »

In that case, you can put a pot between the FX Board's output and the amp's input.

Just about anything will work.. an amp's input impedance is usually high enough that it won't put any load on a voltage divider. A 10k pot is probably good.

You might want to look at using an exponential or 'audio taper' pot. Generally speaking, human senses respond to ratios more than to absolute values. we register "twice as much light" or "twice as much sound pressure" as the same amount of increase regardless of the actual starting and ending values.

If you use a standard pot to control volume, the whole top half of the sweep will be less than "twice as much", so it will feel like all your volume adjustment occurs in the bottom 10% of the sweep.

Audio taper pots compensate for that by using variable resistance. The wiper voltage stays near 0v for most of the sweep, only rising to VCC at the last moment. To us, it sounds like the volume increases smoothly the whole way.

Audio taper pots can be pricey, but you can build a good approximation to one by putting a resistor in parallel with the wiper. This article from Elliot Sound Products explains it well: http://sound.westhost.com/project01.htm

User avatar
geewillikerz
 
Posts: 8
Joined: Mon Nov 08, 2010 6:48 pm

Re: Audio FX Sound Board UART volume control problems

Post by geewillikerz »

I'll use the potentiometer solution for now. If you ever come across the problem again and figure it out I'd love to hear the solution. It'd be great for me to be able to control the volume programatically.

Thanks for your input!

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

Return to “Other Arduino products from Adafruit”