# Thread: Convert 1.5v, 3v, or 5v to serial signal

1. ## Convert 1.5v, 3v, or 5v to serial signal

I'm trying to get my steering wheel controls to make my computer do dope things. I know I can probably get a PAC SWI-X to do this with a IR -> serial module, but I would think there would be a better and cheaper way to do it.

I looked at the documentation for the service manual for my car and the steering wheel controls will output either 1.5, 3, or 5 volts depending on which button is pressed. Is there anyway that I could convert each different voltage to send a high signal to a different pin on a serial port, doing something like this:
http://www.modasylum.com/guides.php?guide=21

2. Originally Posted by god_of_cpu
I'm trying to get my steering wheel controls to make my computer do dope things. I know I can probably get a PAC SWI-X to do this with a IR -> serial module, but I would think there would be a better and cheaper way to do it.

I looked at the documentation for the service manual for my car and the steering wheel controls will output either 1.5, 3, or 5 volts depending on which button is pressed. Is there anyway that I could convert each different voltage to send a high signal to a different pin on a serial port, doing something like this:
http://www.modasylum.com/guides.php?guide=21
One problem I see is that the UART standard for serial requires 12V to indicate a logical high, and -12V to indicate a logical low. If you have 1.5V, 3V, and 5V coming out of the wheel buttons, you'll need to convert the Analog signal to a digital signal somehow. It's probably a lot of work just to interface it with your serial port.

3. In my opinion, the most simple route would be to build a small circuit using a PIC microcontroller, program the controller to convert the analog signal to a digital value, and output whatever you want based on those values via a serial connection.

4. I looked at the documentation for the service manual for my car and the steering wheel controls will output either 1.5, 3, or 5 volts depending on which button is pressed.

The easiest way is to use the analog-to-digital converter of a joystick port. The joystick register should then give you a digital value coresponding to the analog signal.

http://www.epanorama.net/documents/j..._circuits.html

Its up to you how you now process this digital values.

If you dont have a built in gameport on your PC then just buy a USB gameport adapter.

You can also buy a USB analog joystick. Instead of using the variable resistor built in the joystick to generate the voltage you use the analog voltage from your steering wheel. Then of course a digital value is generated on the joystick register.

5. Rick327 you are da freaking man!!!!!!!!!! I am ripping apart a joystick cable as I write this.

Originally Posted by Ricky327
I looked at the documentation for the service manual for my car and the steering wheel controls will output either 1.5, 3, or 5 volts depending on which button is pressed.

The easiest way is to use the analog-to-digital converter of a joystick port. The joystick register should then give you a digital value coresponding to the analog signal.

http://www.epanorama.net/documents/j..._circuits.html

Its up to you how you now process this digital values.

If you dont have a built in gameport on your PC then just buy a USB gameport adapter.

You can also buy a USB analog joystick. Instead of using the variable resistor built in the joystick to generate the voltage you use the analog voltage from your steering wheel. Then of course a digital value is generated on the joystick register.

6. Ok, I tore apart a joystick extention cable and separted out power and the wires for joystick 1's X-Axis and Y-Axis. I'm able to get the XP joystick control panel to recognize the joystick by connecting all three of these togther or just applying a voltage to the axis cables from a USB cable, however, I can't get the joystick to register when I apply a voltage from another power source. I.E. a battery.

I hooked the negative terminal from an AA battery to the ground in the joystick cable and the positive to the X Axis and it doesn't recognize the X-Axis anymore. I assume I'm missing some fundamental thing about how electricy flows and this will not work cause they are separate power sources...

Will this be a non-issue when I use the voltage generated from the steering wheel controls in my car since the car's power is powering the Opus which in turn is powering the computer and the game port so everythings the same power source? If not, is there a way around it to get the controls voltage level to register?

Is there a way that I can get the voltage from an outside source such as a battery to register on the joystick port so I can test this out and use it to while writing the DirectInput program to convert the joystick values into keyboard input?

Originally Posted by Ricky327
I looked at the documentation for the service manual for my car and the steering wheel controls will output either 1.5, 3, or 5 volts depending on which button is pressed.

The easiest way is to use the analog-to-digital converter of a joystick port. The joystick register should then give you a digital value coresponding to the analog signal.

http://www.epanorama.net/documents/j..._circuits.html

Its up to you how you now process this digital values.

If you dont have a built in gameport on your PC then just buy a USB gameport adapter.

You can also buy a USB analog joystick. Instead of using the variable resistor built in the joystick to generate the voltage you use the analog voltage from your steering wheel. Then of course a digital value is generated on the joystick register.

7. Originally Posted by god_of_cpu
I hooked the negative terminal from an AA battery to the ground in the joystick cable and the positive to the X Axis and it doesn't recognize the X-Axis anymore. I assume I'm missing some fundamental thing about how electricy flows and this will not work cause they are separate power sources...

Is there a way that I can get the voltage from an outside source such as a battery to register on the joystick port so I can test this out and use it to while writing the DirectInput program to convert the joystick values into keyboard input?
You'll need the circuit at the bottom of the page that Ricky linked to. The joystick inputs are not voltage measuring devices, they charge a capacitor using the current fed into the joystick port and time how long it takes. Read section 10.4.1 - JOYSTICK PORT HARDWARE in the zip file linked at the bottom of the page.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•