S2000 Electronics Information and discussion related to S2000 electronics such as ICE, GPS, and alarms.

Dash Controls to Sony Deck Interface

Thread Tools
 
Old Aug 12, 2001 | 09:15 PM
  #31  
CRussel's Avatar
Registered User
 
Joined: Apr 2001
Posts: 331
Likes: 0
From: Madeira Park (Sunshine Coast)
Default

Well, I managed to get a 3 month contract that kept me here in the bay area, fortunately. Hopefully things will improve around here by then. At least it helps pay for new goodies for my Stook.
Reply
Old Aug 17, 2001 | 09:07 AM
  #32  
S2Kman's Avatar
Thread Starter
Registered User
20 Year Member
 
Joined: Nov 2000
Posts: 131
Likes: 0
From: San Diego
Default

Wow! I can't believe this thread is still alive! It's been quite a while since I posted, life has been busy. I have been using the Sony head unit now since May, and I REALLY miss the dash controls. Everytime I get into the car, those buttons are just sitting there staring at me, reminding me that I need to get that circuit done.

I am actively working on the circuit again and WILL finish it. Life got too busy for a while, but I really want to get it done. I'll post again within a week and give a status update. Assembly programming is so slow...

--S2Kman
Reply
Old Aug 17, 2001 | 09:28 AM
  #33  
CRussel's Avatar
Registered User
 
Joined: Apr 2001
Posts: 331
Likes: 0
From: Madeira Park (Sunshine Coast)
Default

Excellent. Glad to see you back.
Reply
Old Aug 17, 2001 | 07:14 PM
  #34  
almilli's Avatar
Registered User
20 Year Member
 
Joined: Oct 2000
Posts: 665
Likes: 13
From: San Diego
Default

[QUOTE]Originally posted by S2Kman
[B]Wow!
Reply
Old Aug 21, 2001 | 09:37 PM
  #35  
S2Kman's Avatar
Thread Starter
Registered User
20 Year Member
 
Joined: Nov 2000
Posts: 131
Likes: 0
From: San Diego
Default

Well! I have been feverishly working on the Dash Controls to Sony deck interface for the past few days now. I wanted to post a status update.

First: Almilli; You posted an updated circuit diagram quite a while back for the Sony Remote commander that included a full pinout including the plug. Do you have that available anywhere anymore? I can't get to the link earlier in this thread, the page appears to be no longer available.

I finished the programming today for the basic functions. I had originally written the code for a 40 pin Microcontroller and after I completed the code today, I ported it to a 28 pin device. This is the smallest device that I can find that is commonly available and has enough stuff to get the job done easily.

Right now, all you have to do to use the interface is to go through a simple setup routine that allows you to program each S2000 dash controls and two functions for that button. The first function is the 'Regular press' function. The second function is the 'Hold Press' function.

After you have run the setup routine, all you have to do to use it is to press a button on the dash controls. Whichever Sony Deck command you wanted is then sent to the deck. If you hold the button, the second command is sent, and held until you let go.

You could set this up two ways:
1. The 'Volume Up' button could be setup to perform a 'Volume Up' when you press it once. It could also be setup to hold a 'Volume Up' command until when you hold the 'Volume Up' dash control until you let go of it.

2. A second option is to make the 'Press command' and the 'Hold Command' different. Take the Source button as an example. The Source button could be programmed so that a press would send the 'Source' command to the Sony. However, if you hold the Source Dash control down, then it would send the Sony a 'Mode' command.

For the techies:

The programming as it is at this moment includes a setup routine that allows each of the S2000 Dash controls to be 'read' and then after the button is 'read' you can choose two Sony Deck functions for that button. You do this for each S2000 dash control button, and then when you are done, all of this setup is saved to a non-volatile RAM. The setup routine only runs if you want it to, it is a one time thing, but it can be re-run whenever you want to.

After the setup routine is complete, the software keeps checking the dash controls until a button is pressed. It then waits to see if you let go of it. If you let go of it before 25mS (good luck) it ignores it. If you hold it for more than 25 mS, but let go of it before 300 mS, then the software sends the Sony deck the first function that you programmed it to do. If you don't let go of it, but continue to hold it, the software sends the Sony deck the second function that you programmed it to do, and continues sending it until you let go.

I still have quite a bit of work to do though, even though the programming is useable.

I have to add programming for the Mute button. I intend to handle the Mute button via software as well. There will be a terminal on the device to hook up the Mute button lead from the S2000 dash controls and it will just work. I have not done the programming for this yet, but will probably get it done tommorow. (This will be optional, the mute can be implemented in the manner that MacGyver has on his web site with a seperate relay attached to the cel-phone mute lead of the stereo if you prefer). The mute function will also be availble to be programmed on any of the other S2000 dash controls, but the Mute button on the Dash controls will ONLY be available for Mute. You won't be able to program it.

Everything is bench tested, I haven't actually hooked the circuit up to real S2000 dash controls or a Sony stereo, that's my next step. I created a 'Dash Control' on a breadboard with some resistors and switches. I re-created the circuit pretty closely, and I have been testing my programming with that since it is the same thing. The poor tolerances on the S2000 dash controls aren't an issue since the circuit/program detects the values anyways.

I have been measuring the resistance output to the Sony Deck on an Ohm Meter. I have an extra Sony stereo lying around that has the Remote Commander port on it. As soon as I get that diagram from Almilli (it has the pinout of the Remote commander Jack), I'm going to hook up the Sony on the bench and test it.

One other thing I haven't completely solved is the calibration of the Sony Deck output. The circuit works fine, and outputs the correct resistances to the Sony Deck, but I have to hand-tune the values for each digital pot. That means that since the values are in the programming each copy of the circuit would have to have a different set of values for the Sony Deck control commands. This would be less than ideal.
I may have to have the Microcontroller use it's A/D converter to calibrate the Sony Deck output resistance values. The digital pot that I am using for the output varies 30% from device to device, and this may prove to be too much. If so, I will have to add some programming and some circuitry to handle this. It might not hurt to have this calibration code in place just in case anyway, I could also use it to calibrate for any possible temperature effects on the Digital Pot output resistance. The more I think about it, the better I like this idea.

So all in all, I am going to be working on the Mute code, the Sony deck testing and the calibration code/circuit into next week.
Then next week after I finish these things, an Electrical Engineering friend of mine is going to help me design a good schematic and PCB to get this thing off the bench and into the car. Since this is using a microcontroller at 4mHz, plus doing A/D conversions, and running in an automotive environment with Ignition, Alternator, and other noise sources, I can't just slap it together with some wires and hope it works. It is going to require a well designed PCB with proper ground planes and power sources to work reliably. I am sure that this process will take a couple of weeks and then we will have a few circuit boards made and do testing of the circuit on the new PCB.
Reply
Old Aug 21, 2001 | 09:58 PM
  #36  
CRussel's Avatar
Registered User
 
Joined: Apr 2001
Posts: 331
Likes: 0
From: Madeira Park (Sunshine Coast)
Default

EXCELLENT!
Good job, I'm waiting eagerly!
Reply
Old Aug 22, 2001 | 02:18 AM
  #37  
almilli's Avatar
Registered User
20 Year Member
 
Joined: Oct 2000
Posts: 665
Likes: 13
From: San Diego
Default

[QUOTE]Originally posted by S2Kman
[B]

First: Almilli;
Reply
Old Aug 22, 2001 | 04:03 PM
  #38  
MacGyver's Avatar
Registered User
20 Year Member
 
Joined: Oct 2000
Posts: 7,134
Likes: 3
From: Columbia, MD
Default

S2kMan,

Glad to see someone had the time to finish the project.

I would suggest leaving the calibration code in if you have the code space. Since it's only been tested on the bench, you may want to see how the circuit reacts (resistance-wise) to hot and cold extremes...use a hairdryer and some ice to test the extremes that might be encountered during the summer and winter months. If the digital pot has a wide range, you may need to recalibrate every time it's turned on, or maybe even at periodic times during use (sitting in the hot sun when starting the car, then running AC for an hour, those resistances will REALLY fluctuate).
Reply
Old Aug 22, 2001 | 10:19 PM
  #39  
S2Kman's Avatar
Thread Starter
Registered User
20 Year Member
 
Joined: Nov 2000
Posts: 131
Likes: 0
From: San Diego
Default

Time for another update.

MacGyver: Thanks for the suggestions on the calibration code. I finished it tonight, and it works great. I have plenty of room to leave the code in, so it will stay. I'll have to see if/when it needs to be run. Right now I designed it so that it is a user-driven event. You disconnect the Sony Deck, set a jumper, and then press the calibrate button. You can't really do it with the deck connected, because it has to swing the resistance all around, and then I use the A/D to determine when I hit the right voltage. If I used a dual of the digi-pot, I could use the second pot to for calibration only and the first one for output to the Sony, that's probably what I'll do if calibration turns out to be needed more than during the building phase of the circuit. The pots are supposed to be within 1% of each other on the dual devices so that ought to work pretty well. It is kind of cool to see it calibrate itself, it took me an hour of adjusting the values by hand to calibrate it the first time, and it did itself in less than a second. It's only about 45 bytes of code, so it's pretty small. The temp chart on the digi pot I am using shows it stable to within 2% from -25 C to +25C. We'll see how it does in the real world though.

I hooked it up to a Sony deck today for the first time. Not good news. I tried hooking it up and then hit the button. The Sony completely ignored it. So then I disconnected it and put resistors across it's wires manually and it worked fine. Then I re-measured the resistances accross my digi-pot and they were spot-on, more accurate than the discrete components I had just used with the Sony. I tried it again and got the same result.

So I disconnected it and pondered it for a while. I tried pressing the button on the circuit so that it would get the digi-pot to the right resistance first, and then I tapped the terminals of the Sony after the pot had already gotten to the right resistance, and VIOLA, it worked.

I figured that there are two possibilities:
1. The deck doesn't like the settle time of the digi pot. Even though it stabilizes at the right resistance, it rejects it before it gets there. This might be the same problem Almilli has had with the discrete components. If I had a sampling o-scope I could take a sample of the transistion and see how quickly it gets to the right resistance, too bad I don't.

It could also be related to leakage current while the pot is disabled too. This current leaking before the pot is commanded to go to the right resistance could be causing the deck to ignore it completely. I tried bridging the Deck Terminals with a resistor while it was still hooked up to the digi-pot (the digi-pot was in high impedance power saving mode) to see if it would respond. It didn't. Actually it would'nt even respond with a discrete component if ONE terminal was hooked up to the digi-pot which makes no sense to me, unless there is leakage coming FROM the internals of the pot itself. It could be that the resistance is not high enough when the pot is in high impedance mode. I am using the Power Saving mode of the pot to get it to have a high resistance accross the wiper terminal, and then when I raise the select line after clocking in the new value, it automatically comes out of 'Power Save' mode and goes to the resistance I clocked in. I tried to measure the resistance of the pot in 'power save' mode and it was off scale on my 2M ohm meter. I'm not sure. I also tried measuring voltage on the terminals of the digi-pot to see if it was leaking any voltage, but was not able to measure anything, just zero.

The simple solution would be to put a mechanical relay in the loop to the deck, set the digi-pot, let it settle and then bump the relay. This would exactly duplicate what I did manually, and I KNOW that it will work. I was really hoping to stay Solid-State though. I wonder if an electronic relay would have the same effect? If anyone has any suggestions, I'm open. I'll look into Solid-State relays tommorow, or if there is anything else that has the same effect on DC current??? Actually there is one other part of the circuit that could use a relay anyhow, but I'd sure like to avoid it.

Well, more programming to do still (I've got the mute input to do, and the Remote Commander's Sel switch to implement), and now the settle time/leakage/relay problem to solve. Any suggestions on how to get around using a relay would be appreciated.

I am going to check into electronic relays tommorow, although I'm going to go ahead and try a mechanical one to ENSURE that I can make it work that way. At least then I will have a route I KNOW will work.
Reply
Old Aug 22, 2001 | 11:05 PM
  #40  
Tedster's Avatar
Registered User
20 Year Member
 
Joined: Oct 2000
Posts: 4,144
Likes: 0
From: Seattle
Default

S2Kman,

damn, I was just getting ready to settle for an IR emitter solution, and now you go and breathe life back into this!

Good luck, your customers are waiting!

Ted
Reply



All times are GMT -8. The time now is 08:43 PM.