Page 1 of 1

Left, Right, and Gbuf and Mono output

Posted: Thu 2018-10-04 21:31
by MikeG
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

Re: Left, Right, and Gbuf and Mono output

Posted: Sat 2018-10-06 1:16
by Panu
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

Re: Left, Right, and Gbuf and Mono output

Posted: Mon 2018-10-08 16:24
by MikeG
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

Re: Left, Right, and Gbuf and Mono output

Posted: Tue 2018-10-09 8:35
by Panu
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

Re: Left, Right, and Gbuf and Mono output

Posted: Tue 2018-10-09 15:32
by MikeG
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

Re: Left, Right, and Gbuf and Mono output

Posted: Thu 2018-10-11 17:27
by Panu
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

Re: Left, Right, and Gbuf and Mono output

Posted: Thu 2018-10-11 20:11
by MikeG
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

Re: Left, Right, and Gbuf and Mono output

Posted: Fri 2018-10-12 8:10
by Panu
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