Unoffical empeg BBS

Quick Links: Empeg FAQ | Software | RioCar.Org | Hijack | jEmplode | emphatic
Repairs: Repairs | Addons: Eutronix | Cases

Page 4 of 4 < 1 2 3 4
Topic Options
#369461 - 03/10/2017 07:38 Re: I made a Bluetooth interface. [Re: larry818]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 30724
Loc: Seattle, WA
Unfortunately that's not a hobbyist reseller that will send me only the 1 or 2 units I need. Still looking for a supplier that I can actually buy one from.
_________________________
Tony Fabris

Top
#369462 - 03/10/2017 09:48 Re: I made a Bluetooth interface. [Re: FieroSTi]
larry818
old hand

Registered: 01/10/2002
Posts: 967
Loc: Fullerton, Calif.
Ask for a sample?

Top
#369468 - 04/10/2017 10:08 Re: I made a Bluetooth interface. [Re: FieroSTi]
Shonky
pooh-bah

Registered: 12/01/2002
Posts: 1933
Loc: Brisbane, Australia
WT32i? No experience with them, but one I had as a bookmark.

https://www.silabs.com/products/wireless...th-audio-module

Not sure how you'll go using it as the dev board looks a little hard to get. You want a dev board type unit to make it easier to connect to, power etc right?


Edited by Shonky (04/10/2017 10:08)
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)

Top
#369495 - 05/10/2017 23:41 Re: I made a Bluetooth interface. [Re: Shonky]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 30724
Loc: Seattle, WA
Thanks, Shonky, I'll have a closer look at that one too.
_________________________
Tony Fabris

Top
#369496 - 06/10/2017 00:04 Re: I made a Bluetooth interface. [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 30724
Loc: Seattle, WA
Current status of support for RN-52 chip:

Have managed to get the ground loop noise fixed by being more careful about power and grouding in my breadboard layout, and also by specifically grounding the "Mic -" connections.

There is still a problem with the gain settings on the chip. The empeg line level outputs are way overdriving the RN-52 inputs and making them clip by a large amount.

Trying to solve the gain problem:

- Turning down the Empeg's volume helps, but not completely. Can't turn it down quiet enough to stop it from clipping.

- There is discussion of the mic/line gain here: http://www.microchip.com/forums/m770128.aspx which says "The microphone gain can be changed from -3dB to 42dB in linear steps. If the gain is set to less than 24dB using the ‘SM’ command the line in mode is automatically entered."

- There is indeed an "SM,xxxxxxxx" command which is supposed to adjust the microphone gain, but it does nothing, no matter what I set it to the gain never changes. I can set it to all zeroes and reboot the unit and... still the same volume, gain still clipping.

- Datasheet on the chip says "MIC_BIAS requires a minimum load to maintain regulation. MIC_BIAS maintains regulation within 0.199 and 1.229 mA. Therefore, if you use a microphone with specifications below these limits, the microphone output must be pre-loaded with a large value resistor to ground." - I tried a 10k ohm resistor from Mic_Bias to ground, no change.

- This page: http://www.microchip.com/forums/m843896.aspx hints that there is an "SL" command to set line level to go with that "SM" command but I cannot get it to work, even based on the information that the person in that thread said to set it to. I try to do a "GL" command and it just says "ERR", and all variants of the "SL" command that I try give me "ERR".

- There is also at that same page http://www.microchip.com/forums/m843896.aspx a schematic for converting speaker level to line level using a couple of resistors. I may try that. But I feel like I shouldn't have to if the chip is supposed to support it directly.
_________________________
Tony Fabris

Top
#369497 - 06/10/2017 00:22 Re: I made a Bluetooth interface. [Re: FieroSTi]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 30724
Loc: Seattle, WA
Though the speaker-to-line circuit (with the 10k and the 1k resistor) seems to work to reduce the gain, I'm concerned about overall quality of doing that. Basically now I'm still using the chip at mic-level and bringing down the empeg's output to match. I still have the keep the empeg down at about -15db to keep it from overdriving the RN-52 input even with that circuit.
_________________________
Tony Fabris

Top
#369498 - 06/10/2017 00:34 Re: I made a Bluetooth interface. [Re: FieroSTi]
Shonky
pooh-bah

Registered: 12/01/2002
Posts: 1933
Loc: Brisbane, Australia
As long as the input impedance of the device is high enough, a resistor divider should be fine but you're right regarding the gain settings that should work and you shoudl be using the line level inputs and you shouldn't have the bias issues as it really should be simple voltage output from the empeg into a high impedance line level input

However you say -3dB to +42dB "gain" which is basically an amplifier. You're saying the empeg is overdriving by some 15dB so -3dB isn't going help that enough.

There's an empeg setting to limit the output isn't there?
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)

Top
#369499 - 06/10/2017 02:02 Re: I made a Bluetooth interface. [Re: Shonky]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 30724
Loc: Seattle, WA
Yes, there's an empeg setting to limit the output, but my idea is that I want the best audio quality so I want everything to be at line level with the correct dynamic range. My feeling is that I should be able to set the empeg at 0db and then control the gain at the bluetooth chip's input. So I'm not sure what to be expecting from this thing.
_________________________
Tony Fabris

Top
#369500 - 06/10/2017 02:09 Re: I made a Bluetooth interface. [Re: FieroSTi]
Shonky
pooh-bah

Registered: 12/01/2002
Posts: 1933
Loc: Brisbane, Australia
0dB at the empeg is referenced against what it considers maximum output. 0dB on its own means not a lot. Was that 4Vpp lineouts? RMS? I don't remember

What is the input maximum for the device? It won't be 4V pp
or RMS.

It's unlikely you'll be able to input a high signal and have a significant negative internal gain as the input circuitry will still need to accept the higher input. So you'll ultimately need to limit or reduce the output of the empeg.

Yes it's best to have the highest output possible, particularly in car audio, but you're not going to hear (or lose) any significantly quality IMO between running the empeg at full and reduce it vs running it at a lower level *unless* the cable between the empeg and the BT device are picking up significant noise.
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)

Top
#369507 - 06/10/2017 11:43 Re: I made a Bluetooth interface. [Re: FieroSTi]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 13586
Loc: Canada
Yeah, the audio out through the dock connector should be a different level than that on the RCA line-out jacks. Tried the former yet?

Top
#369512 - 06/10/2017 20:27 Re: I made a Bluetooth interface. [Re: Shonky]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 30724
Loc: Seattle, WA
Thanks for that information, Shonky!

Currently what I'm trying is a circuit like this, except where it says "speaker" it's the empeg line outs, and where it says "line out" is where I'm plugging it into the RN-52 chip. (obtained from here.)

Do you think that would work, or do you think there is a better way?

Maybe I should really just put a variable stereo pot on it so that I can adjust the attenuation?


Attachments
speaker_to_line.gif


_________________________
Tony Fabris

Top
#369513 - 06/10/2017 20:30 Re: I made a Bluetooth interface. [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 30724
Loc: Seattle, WA
Something else I noticed that I'm wondering about...

I think the RN-52 might have some sort of "auto gain" on its mic input that I need to figure out how to turn off. For example, on a song that fades out, it appears to be playing the music at full volume all the way to the very end of the song.
_________________________
Tony Fabris

Top
#369514 - 06/10/2017 20:44 Re: I made a Bluetooth interface. [Re: Shonky]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 30724
Loc: Seattle, WA
Regarding the Silicon Labs WT32i, I found this interesting thing:

https://www.youtube.com/watch?v=oVwzLz0dO1w

This looks real interesting to me. Look at all that audio I/O on that dev board. Haven't looked up pricing on it yet, but wow.

Edit:
http://www.semiconductorstore.com/cart/pc/viewPrd.asp?idproduct=49919
https://www.ebay.com/i/263156265565?chn=ps&dispItem=1
https://www.silabs.com/products/wireless...th-audio-module
_________________________
Tony Fabris

Top
#369522 - 07/10/2017 20:37 Re: I made a Bluetooth interface. [Re: Shonky]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 30724
Loc: Seattle, WA
I think I'm going to abandon the RN-52 and try that BlueGiga WT32i module. I've ordered one of those fancy reference kits with all the RCA plugs.

I figure that the RN-52 seems to have had only one firmware release of the "Source" mode firmware, and that firmware is really half baked. Their gain control command doesn't do anything. Also I noticed that the command reference has no way of entering track metadata at runtime in source mode, so I wouldn't ever get to have track data in there.

So I think I have a better bet with that BlueGiga module since clearly their refernce kit has RCA inputs and it's intended to be a high quality audio interface.
_________________________
Tony Fabris

Top
#369530 - 09/10/2017 16:37 Re: I made a Bluetooth interface. [Re: FieroSTi]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3923
Loc: Somerville, MA
Despite my fear that doing literally anything to improve my car will surely result in its death, one of these would probably convince me to figure out how to dissemble the dash and get the empeg in... and probably replace the dead speakers too.

Top
#369531 - 09/10/2017 18:07 Re: I made a Bluetooth interface. [Re: Daria]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 30724
Loc: Seattle, WA
Cool, thanks! This is encouraging. I'm hoping to get the prototype working, and then refine it into an easy-to-duplicate kit. Maybe Stu would want to sell the kits once it's ready?

I'm deeply disappointed that I'm now on my third bluetooth chipset trying to get this thing working. Should have had it done by now. Honestly that BC127 should have done the trick if it didn't have that weird bug where it's incompatible with my car stereo.

I have high hopes for the BlueGiga chip set based on how audio-focused that dev board looks. The datasheet and docs are also very audio-quality focused, down to the level of describing how to run the audio/ground traces for the best noise rejection. So, crossing my fingers.
_________________________
Tony Fabris

Top
#369563 - 15/10/2017 22:02 Re: I made a Bluetooth interface. [Re: FieroSTi]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 30724
Loc: Seattle, WA
I made some good breakthroughs with the BlueGiga development board today. It initially had some of the same problems as the other two chipsets, but it has a much more complex and flexible commandset, so I was able to fix them the right way with the right commands.

This one doesn't have dox about how to set the Track Metadata on the A2DP/AVRCP channel (it shows how to receive that data but not how to set it). I haven't experimented with that yet but that's the last hurdle. Crossing my fingers.

More later. Optimistic about this one.
_________________________
Tony Fabris

Top
#369565 - Yesterday at 03:19 Re: I made a Bluetooth interface. [Re: FieroSTi]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 13586
Loc: Canada
I'm just waiting on deck for this to go through! I want to try the same in the new Subaru.

Top
#369566 - Yesterday at 10:06 Re: I made a Bluetooth interface. [Re: mlord]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 30724
Loc: Seattle, WA
Sorry it's taking so long. :-)

I hope to have finished example Arduino code, prototype assembly instructions, and prototype bill of materials within the next week or so if I'm lucky. That might be enough on its own to get you going.

Then after that, the next step is a custom "sandwich" PCB board to connect all the parts, instead of using a bunch of jumper wires, and a custom housing box for housing all the parts, to turn it from a messy prototype assembly into a buildable kit.

First version of the firmware will be Bluetooth A2DP audio and AVRCP controls, but no track titles on the car's screen yet.

Assuming that everything above works, and I can find the correct commands to get this chipset to send track titles to the car screen, would you be interested in helping with the necessary empeg-side code to get it to spit out parseable track metadata on the serial port? I think you'd be able to do that part much faster than me.
_________________________
Tony Fabris

Top
#369569 - Yesterday at 19:55 Re: I made a Bluetooth interface. [Re: FieroSTi]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 13586
Loc: Canada
I would likely be inclined to skip the Arduino and just have the empeg talk directly to the BT adapter. In which case I'll add a "BT mode" to the existing Hijack menu for the Serial Port, along with anything necessary to make it work there. smile

Mostly just need to know if it really can do track data on the HU display or not.

Top
#369572 - Today at 00:13 Re: I made a Bluetooth interface. [Re: mlord]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 30724
Loc: Seattle, WA
That makes sense. I have a lot of information about how this thing works, and also a lot of information about things that are still not working about it, I could send you what I've got privately.

I'm finding that there are quirks about its initial handshaking with a device right after you pair with it, and it may work fine on one device and not on another, and I'm trying to figure out how to configure and program the thing so that it works in all cases. This is really tricky.

Example: I found that if I pair up with my car stereo and wait for the pairing to complete, I get a certain set of messages on the console. It doesn't work properly until after I issue an "A2DP STREAMING START" command to the chip, at which point everything works well. Except unless I get the timing wrong of exactly when I send that command. If I send it too soon then it has the old "30 seconds delay" problem on the steering wheel controls. But if I send it later it still has the same problem. And there's no documentation telling me how to do the initial handshaking. Also on my bluetooth headset, audio doesn't stream until I issue the "CALL <btaddr>" command but on the car stereo it streams fine and the "CALL" is automatic. Issuing the CALL command on the car stereo doesn't fix any issues.

Another example, the docs for the A2DP/AVRCP communication seem like they have a lot of good syntax examples, but in practice none of the examples work as expected and the entire system is almost completely inscrutable: https://www.silabs.com/documents/login/application-notes/AN986.pdf (link won't unlock for you until after you sign up for an account at their web site).

For instance, in the document linked above, for the track titles, it looks like what you are supposed to do is register with the headunit to respond to notifications where it requests to get the track titles from you, and then you respond with the track titles. But the syntax is poorly documented and only a single non-working example is given for doing it.

So I'm pulling my hair out on this one. :-)
_________________________
Tony Fabris

Top
Page 4 of 4 < 1 2 3 4