Veloster Turbo Forum banner

41 - 60 of 74 Posts

·
Registered
Joined
·
109 Posts
Great work! Definitely appreciate all your hard work and skill set needed to figure all this out.

You can definitely count me in as customer once it's ready to hit the market.
 

·
Registered
Joined
·
88 Posts
Discussion Starter #42
Ok. I have the very first version working. There is a video of it here:


Currently I have not matched the volume levels of the factory speakers with the analog output my board makes so the speakers don't increase volume at the same rate. This is easy to fix, I just have to measure the signal to one of the factory speakers at every volume setting with some pink (or white) noise playing and compute the values I put in the program. Also, I have to work on the startup. Right now there is a nice little pop when the system turns on. For most amps this won't matter because they wait a couple seconds for the amplifier to stabilize before turning on, but I want it gone anyway. Also, I have to test for ground loop related issues.

If anybody has questions about the video post them here and I will explain what I can. I am not a master video makers and there was very little light in my garage so the camera as hunting for focus a bit. I think the camera was also doing some volume normalizing with the microphone input so the speaker doesn't get as loud or as quiet on the video as it did in person, but I can assure you it can easily go from too quiet to here, to full signal just fine.
 
  • Like
Reactions: HellHunter

·
Registered
Joined
·
1,840 Posts
Good stuff man.
 

·
Registered
Joined
·
439 Posts
Excellent work man!

Once you get the bugs straightened out, will it be easy to 'copy' the boards, or will it still need to be hooked up to be set up properly?
 

·
Registered
Joined
·
88 Posts
Discussion Starter #45
Copying the boards will be pretty easy. I am working out some details that will be revealed later to make something like this available to those who want them.

More progress was made tonight. I swept the volume knob on the radio, measured the speaker amplitude with pink noise playing in the AUX port, and generated the curve for our volume numbers. The issue is that our headunit has some magic numbers, 0 to 35 that really don't mean much in terms of dB (real units). So I needed to measure the amplitude at the speakers at every volume settings so I can create the curve to make the volume coming out of my board match what the car is doing. I am making 35 (MAX on the head unit) be full output on the board (just before clipping) and then going to drop to volume level accordingly. I have already typed in the values in the newest version of the code so it will match. Here is the attenuation curve of our head unit:
volumeCurve.png
 

·
Registered
Joined
·
88 Posts
Discussion Starter #47
I just measured the frequency response and I need to do a bit of work on the low end. More than likely it is just a change of the value of a couple capacitors or resistors on the board so I should be able to get the response flat.

In the plot you have the frequency on the horizontal axis and a relative amplitude on the vertical. The blue line is the goal. This is just the computer measuring itself with no car involved. The green line and purple line are just two different techniques of measuring the output response of my board. The purple one is faster but noisier and the green one is smooth but troublesome with certain speakers. As can be seen there is a bass roll of in the system that I need to work out. It is possible it is just the aux input of the car, so I will do some other tests to check if that is the case or not. Otherwise the response is flat. Also, the high frequency roll of is an artifact of this measurement technique since the signal is approaching the Nyquist frequency (google it if you are curious).

SpdifAdapterV1_response.jpg
 

·
Registered
Joined
·
88 Posts
Discussion Starter #48
To check if the bass roll of that is visible in the above graph is from the AUX input of the car or from my board, I reran the test by generating the digital audio directly from my computer. Basically, I took the car out of the measurement. Here is the new plot. It is the above plot with a green line added. The green line is the new response. It is higher because I turned the volume up a bit more to offset the curves, no other reason. There is still a small amount of bass roll off but it is much better. The in-car setup was down 7.5dB by 20Hz, where the out of car measurement is only down 1.8dB. I can change some parts on the board to make the 1.8dB a little lower but it won't be very noticable anyway.

SpdifAdapterV1_response.jpg

What I plan to do, just not today, is generate a recording of pink noise that I can play in the CD player to see if the roll off issues goes away. My theory is the analog input of the car (AUX connection) is the source of the additional roll off and when using MP3s, BlueTooth, or CDs the extra roll off should go away and you would be left with the green curve. I will post one I have tested my theory.

I have also done some initial THD measurements and found the following:
1KHz - 0.0049%
500Hz - 0.0062%
100Hz - 0.0729%

The 100Hz THD is higher than I would like so I will look into trying better output capacitors, which are the likely culprit. I would like to see the 100Hz THD < 0.01%, even though it is probably hard to hear the difference in a car.

The specs I am shooting for is less than 1dB roll off down to 20Hz and a THD better than 0.01% across the board. This should easily prevent complaints about sound quality. I might do some THD measurements of the amplifier output, because I doubt it is this low, especially up around 1KHz.
 

·
Registered
Joined
·
88 Posts
Discussion Starter #51
In theory, we will need one of these for each channel getting sent to an amp, correct?
Not really, you can split up the RCA outputs however you like. So, if you wanted some crazy 10 speakers system (10 channels of amp) then you would just split left and right 5 ways. That being said, the more load you put on the output the more of that roll of you will see in the bass response. I could put output drivers on the board but all of this stuff increases complexity and it really isn't worth it. I plan to work on it so 2 or 3 amps should be ok, but if you went nuts and put 10 amps or something you would definitely have more rolloff. I would guess somebody already makes splitters for RCAs that are powered, which would also prevent the additional roll off.

Thanks for bringing that up because it is something I had not considered in the design.
 

·
Registered
Joined
·
88 Posts
Discussion Starter #53
In my case I will be using a processor which only needs single L and R inputs and then outputs 8 channels.
Does the processor you are getting do the high pass and low pass crossovers for the front speakers so they can stay biamped? I am actually curious for my own setup because I haven't looked into this yet.
 

·
Registered
Joined
·
3 Posts
Hey ee man,

I was planning on building something similar to what you have got. You seem to be going along really well so far... Congrats on the working prototype!

Personally, I am an Electrical Engineer recently graduated and I work on embedded microprocessors. I'd love to help out if I can, however I haven't coded with that particular microprocessor you are using. My plan was to use a 16mhz+ msp430 which I do understand, and just bit bang the bus.



I do have a question though, do you think this will work on a stock audio system? I am worried how you stated if the factory amp isn't plugged in it stops working... I don't know if there is something software wise to tell the head unit the factory amp isn't there anymore?

edit: my hope is that the CAN bus & spdif are just always on, and there is some setting for the head unit to 'acknowledge' that the factory amp is still working.

double edit: I am also sure you want to keep your code proprietary? I don't know if open source is your thing, I do fully understand if you want to make money though.

triple edit: Sorry, I keep coming up with thoughts. I wonder if you can turn on the stereo, and press the reset button (next to the cd tray) and maybe that would solve the audio cut out problems. Just factory reset the head unit?


I am also guessing the SPDIF to I2S converter is the CS8416? I am looking into maybe going with a wolfram DAC chip because I have heard good things about its quality. However, it seems the DAC you chose is a good one.
 

·
Registered
Joined
·
88 Posts
Discussion Starter #56
Actually there is very little money to be made here due to quantity so I am all for making the code open source and people just have to pay for the hardware. Although most people won't want to touch the code or even program a board, so it would really only be useful to open source it for multiple developers.

I am using the CS8416A for the SPDIF to I2S and I am using the CS4341A for the DAC. I am using a PIC18F25K80 for the microcontroller, only because I have a PIC programmer from my collage days. I haven't posted an update in a while but here is where I stand:

- The board is in a case in my car and working for basic purposes
- The voice for the blue tooth (I assume the NAV also) does not come across on the SPDIF, so it doesn't work right now
- Tone controls are not implemented (requires a lot more processing power)
- Balance/Fader are not implemented (Easy with a 4 channel DAC with independent volume control)
- There is a significant delay difference (~0.1 seconds) between the factory and this setup.

I am assuming the factory has a lot more delay for the DSP, but I have not measured it. That causes the fun echo in the video. This is troublesome for people who just want to add in subwoofers. It is probably possible to use one of the MiniDSP boards for EQ/delay control and match the systems up. Right now I am replacing the factory amps anyway so I haven't looked into it in any detail.

On the CAN bus, the head unit sends out requests to have a setting (volume, balance, etc) changed. The amp is constantly echoing back the current status of these things. The head unit will try up to 3 times to see that the amp has changed its current status to match the latest request. I am assuming when this fails the head unit attempts to restart different things, SPDIF included, because the lock goes away on the SPDIF and comes back after a second or so. With a bit more sniffing I am sure that the proper responses could be generated I am just ankle deal in crossover components right now sorting out my custom front speaker setup so I haven't gone back to it.

Where are you at in the world? I am curious if you are anywhere near Southern California.
 

·
Registered
Joined
·
88 Posts
Discussion Starter #58
I wonder how this will work with the bon giovi acoustics DSP from the factory
It depends on how you wire things up. If you take the SPDIF before the add on box then it will be the same, if you take it after than it will be whatever processing they have applied which is designed for the factory speakers. I am wondering if the add on box also uses the CAN signal and changes the parameters sent to the factory amp. There is a bunch of initialization sent over the CAN bus to something (could be the telemetrics unit) each time the audio input is changed. It makes me wonder what cool things the amp could do if you sent it different commands. The best way to find out would be to get a seperate factory amp that I can setup on a bunch but they are really expensive so I am not about to buy a new one. The other way is to get my box working stand alone so I can just remove mine completely from the car. Anyway, it is all more work and I am still swamped right now with things that pay.
 
  • Like
Reactions: [email protected]

·
Registered
Joined
·
3 Posts
Where are you at in the world? I am curious if you are anywhere near Southern California.
Atlanta GA. I feel you on the busy side ha.

So the two big ouchies were the Navigation and Blue Link coms. It sucks to have a really super sweet digital communication protocol, and go back to having to sample in external audio... Moving from there I wonder if they send a CAN command to switch SPDIF to Navigation/BluLink and back. If that were the case then it could be easier and still preserve pure digital bliss. This entails yet another chip, or maybe a different chip, to mux the audio sources nicely to prevent popping... yuck.

I have bought some interior trim tools so I can get to the back of my veloster, going to probe around and see if the CAN/SPDIF comms are kicking on a base model.

One thing I have been searching all over is a freaking amplifier that accepts digital commands, impossible though, I think it all works of variable resitors. Time to move to actuators!

edit: Or open up the amplifier and wire in a digital POT in its place, boom, tone control!
 

·
Registered
Joined
·
88 Posts
Discussion Starter #60
So I am guessing that the Nav audio is just analog generated by the head unit processor and is sent over the Nav+/- wires to the amp then as you said a CAN command tells the amp to switch inputs. So all the would be needed is an 2:1 audio mux (easy to come by) after the DAC that selects between the two signals.

I tossed around the idea of an all digital approach about 6 months ago when I started planning all of this and what it came down to is what you found. There is not really a supply of amps that are convenient for taking in an all digital signal such as I2S can controlled via SPI or I2S that are already on boards. Really, I would have to spin a board with one of the amp chips, probably from TI. You also have to design the power supply since you need more the 12V is you want any power (unless you use 2ohm speakers, but that limits selection also). Bottom line, building amps didn't make any sense since they are pretty cheap these days. That is why I decided to just work on a box that gives the line out. This also provides maximum flexibility for other users.

For implementing tone controls I think something like an AVR32 or STM32 could do the job. It is only 2 16 bit words at 48KHz and setting it doesn't take that much processing power to setup some simple filters either as 2nd order or by tuning biquads. I like biquads because they you have the potential to do some parametric EQs. I would just have to brush up on my DSP theory, it is rusty to say the least. I was also thinking of the simple route where treble and mid don't do anything, but the bass control adjust the subwoofer level. This is really easy with a 6 channel DAC, then you have volume, balance, fader, and bass control.

Are do you have a VT or a NAV? I think all of the VTs have the same audio setup and it is only the basic NAV with a different setup.

If you have any other ideas or questions feel free to bounce them around in here or send me a PM. A lot of people won't follow but I figured somebody like you would exist in the world and find the tech info I posted useful so it is nice to collect it somewhere everybody can get to it.
 
41 - 60 of 74 Posts
Top