Veloster Turbo Forum banner

1 - 20 of 74 Posts

·
Registered
Joined
·
88 Posts
Discussion Starter #1
This is my build thread for creating a box that takes the SPDIF (digital audio) and CAN (volume control) from the Factory Head Unit and will give a line out (RCA) that has volume control for use with external amplifier(s). This will eliminate the need to tap the rear speaker output in order to hook up subs or allows for a complete removal of the DSP/Amp box by using separate amps for all speakers.

--SPDIF--
The digital audio from the Head Unit is standard coaxial spdif. In the past (I posted on velostor.org somewhere about this) I took the SPDIF signal from pins 18/19 of Connector A on the DSP to the back of my old Yamaha 5.1 receiver's Coax audio input and it decoded the signal just fine. I was able to get full stereo sound. It is a 48KHz PCM signal. The problem was that the signal was a constant amplitude and the volume control on the head unit did not change it in any way. this is why you also need the CAN bus interface of the DSP/Amp box (pins 5/6 of connector A)

--CAN--
You can look this up on wikipedia, but is is Controller Area Network and it was made by Bosch for stuff like cars. This bus is not part of the OBDII system and runs at a different speed and voltage level. It is a low speed CAN running at 100Kbps and should not be terminated. I was able to use a CAN to USB converter from work to sniff the packets on the bus and determine where Hyundai is putting the volume control information. Packet 0xF is the magic packet and is sent out to any time a setting is changed, such as turning the volume knob. The packet contains the volume, balance, fader, bass, mid, and treble values set with the head unit. It does not change the audio or have anything to do with the audio on the SPDIF line.

The factory DSP/Amp box takes both of these signals then does the DSP part (Digital Signal Processing). Basically, the unit will split up the stereo SPDIF signal into the 8 channels using the volume, fader, balance, bass, mid, and treble commands to determine exactly how to do it. For a first version this project I want to just have volume control on an analog stereo output working because I think a lot of people would be happy with it, myself included.

--Building it--
Right now, my plan is to use a dev kit with a microcontroller and Cirrus logic DAC to get started. This is the kit I have in mind because of price and convenience (I have one on hand).
dev kit
The only things missing are a CAN Transciever (to deal with the differential voltage signals) and an SPDIF to I2S converter. The CAN Transceiver is easy and just needs to be wired to the dev kit. I still need to figure out what SPDIF to I2S convert I will use and I will post once I have decided.

Ultimately, I think it would be nice to just build a second board that mates with this dev kit to make it so people don't have to do much soldering except for the actual wires to the car. For now my first version will just be cobbled together to prove the concept.

--Software--
The first version of software will be pretty simple. It will have to listen to the 0xF packet on the CAN bus to get the volume control and basically forward the I2C from the SPDIF to I2C converter to the cirrus logic chip on the board. The cirrus logic chip also has the volume control so the software will take the requested volume from the radio and turn it into a volume control setting for the cirrus logic chip. This allows for the volume to be remapped since the number the board will be getting is exactly what is on the screen (0 to 31 I think) so this can map to the volume any way desired. However, I will probably try to closely match the current DSP/Amp box so that the this unit and the DSP/Amp box will play nice.

Ok, I think that is all for tonight. I will try not to draw out the design time of this too long. I am not sure how things will work if people want better packages solutions but I will just get something working first the worry about those details later.
 

·
Registered
Joined
·
1,873 Posts
Very interested to see the outcome of this
 

·
Registered
Joined
·
88 Posts
Discussion Starter #8
I am hoping this works out well also. From a technical perspective, this project is rather straight forward. At least for people who work with this kind of thing a lot. The issues I foresee are trying to make it cheap but packaged well and for me to find enough time to get it done before the 2020 Velosters released.

So I remembered that I build a project in the past using a DIR9001 which is an SPDIF to I2S converter. So I should be able to rig that old board with the dev kit I mentioned above and have enough hardware to at least get started. Hopefully by the end of the weekend I will be able to take in SPDIF (probably from my DVD player instead of the car, but they should be the same) and use the two boards to produce a volume controlled analog output. This won't be interfacing with the CAN bus yet, that would be part two.

My goal is to build a box that can create the volume controlled stereo line out for less than $100. With an enclosure and everything that might be difficult. I am not really sure how much people are willing to pay for a box like this but due to the amount of electronics required they definitely are not free. I will keep everybody posted but don't expect too much progress until the end of the weekend.
 

·
Registered
Joined
·
88 Posts
Discussion Starter #10
I can measure it, although the idea is that the response will be totally flat, at least from 20Hz to 20KHz. Basically, no equalization in the first version of the box and it will bypass all equalization applied by the bass/mid/treble controls of the head unit.

I was thinking about it and if a separate subwoofer was run off this output, which is probably the common use case, then the tone controls in the head unit would only control the factory speakers and you could do whatever crossover and bass boost separate with the subwoofer amplifier. It is possible to build a unit that would follow the tone controls as well as a unit with 4 (or more) outputs so balance and fader work yielding similar outputs to most aftermarket head units. If there is a large enough demand for something like that I will look into it next but it would cost a bunch more and be a lot more development effort. For now it will be a simple line out that follows volume control only and nothing else, so bass/mid/treble will not change the signal it generates in any way.
 

·
Registered
Joined
·
569 Posts
I love this level of detail in engineering. Thanks so much for sharing your progress with us. I'll be watching this thread for updates, even though I probably won't change anything on my vehicle.
 

·
Registered
Joined
·
1,510 Posts
when can I buy one of these :)
I wana keep the stock HU and add all my audio goodies!!
 

·
Registered
Joined
·
88 Posts
Discussion Starter #14
miniDIGI | MiniDSP might be what you are looking for.
I have been sifting through the miniDSP site for a while now trying to not build much hardware but the miniDSP does not have CAN. The miniDIGI will give me the SPDIF to I2S but I found an old board of mine from a couple years back that will also do that. Also, these are a bit more money than I wanted to spend in the long run on parts. I have a feeling I am just going to rig things together to prove the concept then just have a custom board made since it will be much smaller and cheaper.
 

·
Registered
Joined
·
569 Posts
ee_man: would you be willing to explain your specific goals for your project? I realize you want to make a line-out, but, is that to replace the integral DSP/Amp, or to operate in parallel to it?

EDIT: I'm dumb, I know I read the OP's first sentence before, but that basically completely answers my question. Welp. Sorry.
 

·
Registered
Joined
·
104 Posts
I wish you the best of luck, but I know how CAN Systems work and without significant R & D I do not see it working. There is a reason that no one makes it already. If you do get it working I will the first to pay you for one though.
 

·
Registered
Joined
·
88 Posts
Discussion Starter #17
ee_man: would you be willing to explain your specific goals for your project? I realize you want to make a line-out, but, is that to replace the integral DSP/Amp, or to operate in parallel to it?

EDIT: I'm dumb, I know I read the OP's first sentence before, but that basically completely answers my question. Welp. Sorry.
It would be able to operate either way. Since it only listens to the SPDIF and CAN bus the current DSP/Amp won't know it is there. I have already checked and the Head Unit seems to function just fine without the DSP/Amp plugged in so it should work as a replacement also.

Also, I haven't posted an update in a while since I was busy but I made some good progress this weekend. I selected all of my parts and after starting to solder everything together by hand decided it was a pain in my butt and just designed and ordered the circuit board. Just for fun I have a picture of the design below. It is 2"x1.5". I ordered through OSH Park (Batch PCB service which is really cheap) so I probably won't have the boards for at least 10 days. Then it will be time to write the software and with any luck put the727kid's worries to rest.

BoardPic.jpg

If anybody is curious I am using a CS8612 for the SPDIF receiver and CS4341A for the DAC. All of it will be controlled by a PIC18F25K80 which has the CAN peripheral on it. I went with the PIC because I own a programmer for it from back in my college days.
 

·
Registered
Joined
·
7,106 Posts
If you can get this working the way I hope it does, You should make millions here LOL at least with a few of us :D and especially if the price isn't crazy of course.
 

·
Registered
Joined
·
88 Posts
Discussion Starter #19
I am hoping to get it all working, be able to put them together with very little of my own time, and then get them to the hand full of people who would like something like this. Also, I see no reason why it wouldn't work on a NAV with the premium sound, I just don't have one handy to test it on when it comes to that point.

I really have no idea how to distribute something like this. I guess it could go up on ebay, but then I don't know what the vendor rules are on the forums regarding pointing it out to people, etc. Anyway, I am a long ways from worrying about that. Right now I am in the process of hurry up and wait for the boards, then write some software to put the magic in it.
 

·
Registered
Joined
·
7,106 Posts
I can honestly say there are only a handful of us here who are into sound systems. But you could contact TurboSocks who have distributed something for a member here before. I hope you don't plan on getting rich with this thing lol but most of the members here are performance and form over sound systems. I just happen to be an audio head and love VT's lol same with some others here. But nonetheless, I am all ears. like you said you are a long ways from that now. It will take some time to have a perfect final product. I am getting my system around feb/march so if you have it done by then and have a clean signal for the amps I am ALL in :D (depending on price and whatnots :D )
 
1 - 20 of 74 Posts
Top