Left, Right, and Gbuf and Mono output

Designing hardware and software for systems that use the VS1010 MP3 Audio DSP Microcontroller.
Post Reply
MikeG
User
Posts: 18
Joined: Fri 2018-08-03 17:27

Left, Right, and Gbuf and Mono output

Post by MikeG » Thu 2018-10-04 21:31

Hi,

I was wondering if the VS1010 may be set up with Mono output similar to how the VS1000 is set up?

This was in another thread:

"For mono output, one option is to turn on the differential output on on the VS1000, by saying somewhere in your application:
audioPtr.rightVol = -audioPtr.leftVol; /* Activatees differential output */

Then you can connect LEFT and RIGHT to the differential inputs of your mono amplifier (GBUF is then not connected to the amp at all, but remember to still connect it to GND through R15 and C32)."

Or is there a different way to do this with the VS1010?

Thanks,
Mike

User avatar
Panu
VLSI Staff
Posts: 2572
Joined: Tue 2010-06-22 13:43

Re: Left, Right, and Gbuf and Mono output

Post by Panu » Sat 2018-10-06 1:16

Hi!

I looked at the source code and the audioPtr.rightVol = -audioPtr.leftVol; would work on the 16-bit stereo audio path, which is the most common audio path, but not mono or 32-bit path.

It could be done globally by forking voaudio.c to make an audioOut SIMPLE_FILE interface with a forked AudioWrite function that monofies the stream, e.g. for stereo stream averages each stereo sample pair, and for mono stream duplicates each sample, and for 32-bit stream does something similar if it's really needed. Then set the rightVol = -leftVol trick and use StereoCopy (never MonoCopyWiden) to push the samples to the DAC buffer.

What's your end goal? Maybe I can help you...

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

MikeG
User
Posts: 18
Joined: Fri 2018-08-03 17:27

Re: Left, Right, and Gbuf and Mono output

Post by MikeG » Mon 2018-10-08 16:24

Hi Panu,

The system that we have has only one piezo speaker with a differential input mono amplifier, so I was wondering the best way to get mono output from the VS1010?

Can the outputs be configured through software as differential like the VS1000?

Or do I have to do this through hardware and ground the unused differential input on the piezo amp?

If I can easily do it in software then I use less parts etc. on the pcb. If it's a challenging software problem then it may be easier to do it in hardware.

Thanks,

Mike

User avatar
Panu
VLSI Staff
Posts: 2572
Joined: Tue 2010-06-22 13:43

Re: Left, Right, and Gbuf and Mono output

Post by Panu » Tue 2018-10-09 8:35

Best way would be to design a highpass filter in software and put that in the audio path, maximize the output swing and drive the output inversely. I can help, although it'll take a little time. Do you have any idea about the frequency response (frequency range) and impedance of that piezo speaker? Do you have a datasheet of the speaker?

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

MikeG
User
Posts: 18
Joined: Fri 2018-08-03 17:27

Re: Left, Right, and Gbuf and Mono output

Post by MikeG » Tue 2018-10-09 15:32

Hi Panu,

Here is a link for the speaker datasheet: http://122.55.220.155/piezo/files/KSN11 ... asheet.pdf

And here is a link for the piezo amp: https://www.maximintegrated.com/en/ds/MAX9788.pdf

Thank you for your assistance and promptly answering all my questions.

Mike

User avatar
Panu
VLSI Staff
Posts: 2572
Joined: Tue 2010-06-22 13:43

Re: Left, Right, and Gbuf and Mono output

Post by Panu » Thu 2018-10-11 17:27

Hi!

Ok, got it. Good datasheets. You're using an amplifier, which probably makes it a lot easier. Hmm, is there any chance you could send us a sample of that piezo element? I'm thinking about a software solution to focus on these kinds of mono speaker applications.

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

MikeG
User
Posts: 18
Joined: Fri 2018-08-03 17:27

Re: Left, Right, and Gbuf and Mono output

Post by MikeG » Thu 2018-10-11 20:11

Hi Panu,

I only have one myself and the mech eng has one for his use so I don't have an extra one to send to you. Sorry. I got them from Piezo Source in California. Maybe they can send you one. The speaker itself doesn't really matter. Most Piezo speakers look like a 1uF or 1.5uF cap to the amplifier so really any piezo speaker should work. Maybe you can find a local source for a generic speaker. I've tested quite a few, this was the only one that we can get the loudness that we need out of and is also rated for harsh environment which we need to. Most are small form factor for cell phones and not rated for outdoor use.

Mike

User avatar
Panu
VLSI Staff
Posts: 2572
Joined: Tue 2010-06-22 13:43

Re: Left, Right, and Gbuf and Mono output

Post by Panu » Fri 2018-10-12 8:10

Ok, got ya. No worries, just being kind of a perfectionist it helps to test the exact environment the customer has (although my criteria for perfection might be different than someone else's). But yes, there's at least one more monospeaker project (the other one is not piezo) so I'm working on a generic-ish software to tackle this kind of problem.

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

Post Reply