Steering Wheel Interface
GoHybrid
Posts: 4
Hi everyone, first post here.· I've been giving alot of thought as to how I might use the steering wheel controls in my car to send key presses to the computer.
here's what i have so far -
1 - the steering wheel interface wire returns a voltage based on what is being pressed.· I assume 0-5 volts.· If not, I know this can be dropped to the appropriate range for an A/D converter with a reistor.
2 - I know some microcontrollers have integral A/D converters that I can use to read the voltage as a value between 0 and 1024.· It seems simple enough to connect this wire and the signal ground and start reading this value.
3 -·I have some fundamentals in programming various languages, so if i got to this point, i don't think i'd have too much trouble of manipulating the data to trigger a digital output.
4 - I think the best route at this point would be to use the digital output to trigger a solid state relay and close a pair of pre-selected contacts on a scavenged keyboard controller.· I feel that by dissecting a USB keyboard and using the controller, i skip over trying to reinvent the wheel, and can also wire physical switches in parallel with the relays so that a passenger may use the controls too.
here's what i'm missing -
I have never in my life built a device around a microcontroller.· I have no idea what components I need to get started.· Obviously I need a Basic Stamp with the A/D converter and i think 8-16 digital outputs would suffice.· i can find my way around the digikey catalog, so i at least know i need to find a solid state relay that can be operated by 5V from a digital output (i assume that's what the "on" value is...).
i HAVE etched my own circuit boards for other projects, so i'm not afraid of that or soldering.
If anyone can dispense some wisdom that will help me realize this project, i would be greatly appreciative.· Thanks for taking the time to read this!
here's what i have so far -
1 - the steering wheel interface wire returns a voltage based on what is being pressed.· I assume 0-5 volts.· If not, I know this can be dropped to the appropriate range for an A/D converter with a reistor.
2 - I know some microcontrollers have integral A/D converters that I can use to read the voltage as a value between 0 and 1024.· It seems simple enough to connect this wire and the signal ground and start reading this value.
3 -·I have some fundamentals in programming various languages, so if i got to this point, i don't think i'd have too much trouble of manipulating the data to trigger a digital output.
4 - I think the best route at this point would be to use the digital output to trigger a solid state relay and close a pair of pre-selected contacts on a scavenged keyboard controller.· I feel that by dissecting a USB keyboard and using the controller, i skip over trying to reinvent the wheel, and can also wire physical switches in parallel with the relays so that a passenger may use the controls too.
here's what i'm missing -
I have never in my life built a device around a microcontroller.· I have no idea what components I need to get started.· Obviously I need a Basic Stamp with the A/D converter and i think 8-16 digital outputs would suffice.· i can find my way around the digikey catalog, so i at least know i need to find a solid state relay that can be operated by 5V from a digital output (i assume that's what the "on" value is...).
i HAVE etched my own circuit boards for other projects, so i'm not afraid of that or soldering.
If anyone can dispense some wisdom that will help me realize this project, i would be greatly appreciative.· Thanks for taking the time to read this!
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
1. Steering wheel control is activated (ex. VOL +)
2. i will get inside my car this week and try to confirm the exact values for myself, but i believe the system operates by giving each steering wheel control a unique resistance and using it in a voltage divider arrangement to return a voltage to the controller. This calculator·( http://www.pac-audio.com/bulletins/swicalculator.htm·)·from PAC-Audio explains it best.·Researching further,·I spoke with them earlier today and they confirmed that this is the method of operation for my specific car.· So for now, lets assume the return value will be between 0 and 5 volts (5V =· no buttons pressed)
3. in the stamp code, i want to determine which button was pressed by reading the value from the A/D converter and energize a relay (i propose solid state because of the lower power requirements, sound factor, and speed)
4. the relay when energized, will provide continuity between the same two pins on a keyboard controller (as removed from an actual keyboard) as the actual key would have.· For example, if you push the·UP ARROW key on·a keyboard, and measure continuity on·pins 1 and 8 of the keyboard controller(arbitrary numbers·at this point), the relay would replace the key and·connect those two points electronically.
5. ·this simulated key press will send the UP ARROW key via the keyboard controller through it's USB connection to the computer, which with my current software will raise the volume.
I hope that explains it more clearly.
1. purchased "What's A Microcontroller" from radio shack.
2. built a copy of the 07 Civic audio remote switch (as per the factory electrical troubleshooting manual) on the breadboard area
3. the audio remote has a .01uF capacitor in parallel with the + and - lines, along with a 10k resistor. each switch adds a lower resistance (100, 270, 470, 1.2K, 3.9K in parallel to the 10k resistor.
4. i thought i might use an ADC to measure voltage drop through the resistors, but learning about the BS2 and some other methods, i decided to add my own .1uF capacitor in parallel to Honda's .01uF and use the RCTIME function to determine which switch was pressed. I think this method inherently solves the debounce issue too.
5. i only have 5 physical switches on the steering wheel, but 8 commands: U, D, L, R (for moving cursor), Enter and Esc (for navigating between menus), Switch (to switch audio remote control back to factory radio), and LaunchFR (to launch the front end program if it were inadvertently closed) So for the 5th button, whenever it is pressed, i start a counter to see how long it was held for when it is released. This lets me use a quick press for select, a longer press for esc, and 3 sec for switch, and just hold it down and the counter stops at 4 seconds and executes the LaunchFR segment.
6. i wrote the code for the BS2 and using the DEBUG command, verified that it works exactly as I want.
So here's what's left: i need to build this into the car and actually interface it with the computer. My original plan was to use an I-Pac keyboard emulator and refer it's switch ground to VSS, and connect each switch terminal to the BS2 I/O pins and hold high until one needs to be activated. I feel this is an expensive and cumbersome solution though. So here is my question:
What would a more space-efficient, reliable way be to send keyboard presses to the computer... something i could plant in a socket next to the BS2? I'd like to ultimately squeeze this into a 2"x2" package that i can mount in the dash.
If someone would give me a place to start looking, i'd really appreciate it! thanks!
I hope this helped!
To communicate between RS232 and the Stamp, you'll need a RS232 (+/- 12V) to TTL (0 to 5V) level shifter such as the MAX232 chip with capacitors.