Portable audio output setup with GUI?

Status
Not open for further replies.

ragemachine

Active member
Hi all, want to make sure this idea will work before I buy the parts. Trying to plan out a setup for a cosplay where I could select voice/song files and play them from a hidden speaker.

The goal is to be able to select an audio file by title from a simple text GUI, and have it play on a speaker (or bluetooth speaker). I'd have to have the whole setup run off of a battery pack so it can be mobile.

In order to accomplish this, I think I would need the following hardware:
1) A Teensy board (not sure which, probably 3.6)
2) An Audio Adaptor
3) (If using bluetooth speaker...) A bluetooth adaptor board
4) An LCD display - would like to find something in the 5" range, non-touchscreen. Assuming I can interface from the Teensy in various ways, though not sure what would be the easiest communication standard.
5) Some buttons to act as a "D-Pad" of sorts (to scroll up, down, left, right on a GUI matrix of displayed file names)
6) Buttons to play the selected file/song, or stop playback
7) Other: SD card, giant battery pack (probably a 12V car-starter type and split off other voltages from there), and a speaker/bluetooth speaker.

Will this work? - Anything I listed above that is not possible?

One major decision I have to make is whether to go for a hard-wired speaker or a bluetooth option. I feel like the hard-wired one would need amplification to be of any use in crowded or public areas - that adds complexity. However, trying to get a bluetooth module working could be equally or even more difficult. Any recommendations which direction to go? I'm around a novice to intermediate level of programming knowledge - should I stay away from bluetooth, or could I make it work?

Also, what type of interface should I use for the LCD? And how difficult is it to create a 'text matrix'? I'm envisioning something like a 4x3 displayed grid (subset of a much larger hard-coded matrix) of song/file names that I can maneuver around in with the D-Pad.

Thanks!
 
What you want to do is certainly achievable, and would happily run on a Teensy 3.2, though that does leave you needing an SD card input.

Bluetooth audio is going to be a long route unless you buy a comercial module that comes as a pre configured pair.

Since you look to be playing mono you probably do not need the audio shield. The prop shield LC or a generic Class D amp module fed from the T3.2 DAC will probably be good enough. What you will not get from that is enough sound for stage work, but should be loud enough in person.

5 inch LCD display is pretty large and pushing the limits of any micro controller simple on interface speed (number of pixels that can move per second over a generic bus). The baseline is normally https://www.pjrc.com/store/display_ili9341.html or it's relatives. Going larger than that is going to head onto a pretty steep cost/complexity slope.

One piece of good news is that you can probably power this off a USB power bank for a day on the floor if design is reasonable (use of class D amp and limiting LCD brightness/size).
 
Thanks for the advice. Could you help with a couple of follow-on questions? -

As for the audio, I suppose I'll stay away from the bluetooth. Most of the files will be mono (voice) but there are some stereo songs as well. I'd want to go with an Audio Shield, then?

And I'd probably want to err on the side of "too loud" and dial it back rather than put together a solution and find out it is lacking. I don't see it listed anywhere what sort of output the audio shield provides... not sure how much I would need to amplify it. You think attaching something like this https://www.amazon.com/WINGONEER-PAM8610-Digital-Amplifier-Channel/dp/B01H6ZOZSY would suffice?

Hadn't considered the refresh rate of the LCD - very good point. For that 320x240 display, I don't see it listed anywhere, but do you know what sort of refresh rate you could expect? I could probably live with a smaller display, but a laggy input would be a pain.
 
Last edited:
At 320*240 on an SPI display can get ~10 full frames a second, Which is responsive enough for a UI but pushing it for video. Also means you have to be careful with drawing order to avoid flicker. Does do partial re-draw so normal method is to either double buffer or get clever only blanking parts of the UI you are changing.

The problem with going too loud is that it this will hit your portable and battery powered goals where it hurts. If you have time and a bit of money doing some testing may be helpful. Class D amps are great for efficiency and size but tie quite tightly to the speaker size because they depend on the speaker impedance to function so you end up potentially needing to try multiple choices to get things tuned right, and cannot be used with multi speaker setup directly (cannot add a sub woofer).

Simple option is to buy the audio shield and a PA amp that meets your needs or you already have and connect them via line out/line in. That will be a known quantity and should 'just work' but will be less portable.

If going a class D module would suggest getting https://www.adafruit.com/product/1752 or something else with documentation and tutorials as a starting point. Buying from a generic online sellers works best when you already know that you can do with the unit having read deep into the data sheet or already worked with that specific IC before.
 
So I did some more research.

I think this 3.5" TFT display https://www.adafruit.com/product/2050 would work for what I need, and I see some threads on the forums here where people have successfully made it work with the ILI9341 library. A monochrome OLED would have been nice, but they tend to run a little small for what I am looking for.

I have some questions about power inputs in general... since I'm planning on using a 12V power bank of some kind, will I need to regulate my outputs? The TFT says it has an LDO regulator, but not sure about the Teensy, Audio Shield and Class D amp. Not sure how good most of these China-made power banks are, and documentation is often non-existent.

Also did some hand calculations for power consumption. If I use that Adafruit 20W class D amp with 4ohm speakers, that is going to pull 17W*2/12V = 2.83A continuous (at max volume... which I probably would not be using). A lot of these power packs are 2.1A@12V max continuous... some others that use a cigarette lighter output claim 15A@12V. Something I need to consider at least when I make the purchase, but current limit doesn't seem like a show-stopper.

In addition to current limitations, also looking at battery life. A lot of these packs are in the ~12,000mAh(@12V) range or more. So I could get - under ideal conditions and a full discharge - 4hrs of continuous, max volume operation at ~3A? That seems reasonable. Could probably get an 8hr span out of it since I would not be using it at all times and would likely not be max volume. The battery life problem seems like it's just a more $$$ = more capacity solution.

Did I mess up any assumption or calculation here?
 
Your maths is right on the current, so you will need to size the conductors right. You will certainly need something to tame the 12V down to something for the rest of the logic, normal solution there is a small switch mode regulator with enough current capacity to drive your display+ teensy. Probably 500mA. 12V into a teensy 5V input will kill it very dead, didn't check but suspect display probably taps out about 6V as well. Given this is doing audio some decent filtering on the 5V supply will probably be a good idea to remove any switch mode noise.
 
Yeah, thinking I would use something like this https://www.adafruit.com/product/1065 for the 12V-->5V stepdown. Think that would be good enough for the 5V power inputs to the Teensy and the Display, or need any other filtering?

As the LiPO power pack (or maybe Li-ion) voltage declines, or if it is a noisy output, wondering how to regulate ~12ishV-->12V. Wouldn't want that introducing noise to the speakers since it is powering the class D amp. Not sure what to use to keep that 12V solid since it might start as a step-down when the batteries are fully charged but progress to a step-up as they discharge. Any suggestions for that?

And for the current/capacity of the battery... As I think about it, I'm not sure I want 2 speakers. I might just use one 20W RMS speaker. That would bring me down to ~1.5A max continuous and double my battery life.
 
... or need any other filtering?

Yes, that one can work, but it definitely needs a capacitor added close to its input pin. The info in Traco's datasheet saying the capacitor is not needed for lower voltage is WRONG. You definitely do need the 10uF (or larger) input capacitor. It will be have startup problems with certain types of power sources if you don't add the capacitor.

That advice on Adafruit's page came from this forum. Here's that old conversation.

https://forum.pjrc.com/threads/23647-Powering-Teensy-3
 
Thanks for the advice, Paul. Do you have any idea what I could use for the 12V->12V regulation? I think I need a buck boost DC-DC regulator that can handle 12V@1.5A output continuous (or 3A continuous if I go with 2 speakers). The battery pack input will probably be anywhere in the range from 7-15V (starting max voltage depending on number of cells in parallel and ending min voltage depending on cut-off voltage of the pack design).

It'll be powering the amplifier, so the current draw is going to vary pretty wildly (~0A inactive to 1.5A or 3.0A when playing an audio file). Not sure what specs I'd need to look at in a regulator to tell if it can handle that. The 5V part is a little easier since the Teensy power draw will be much more consistent.

Edit: I'm also thinking, since I need to regulate the power output anyway, I might just want to start with a 19V or 24V battery pack and step down the power. Maybe easier than trying to find a SEPIC or buck boost converter, and probably more efficient?
 
Last edited:
Status
Not open for further replies.
Back
Top