Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Control System (http://www.chiefdelphi.com/forums/forumdisplay.php?f=177)
-   -   Voltage-to-resistance converter for using any joysticks (http://www.chiefdelphi.com/forums/showthread.php?t=48011)

ConKbot of Doom 21-06-2006 19:55

Voltage-to-resistance converter for using any joysticks
 
On maxim/dallas semiconductors website, in one of the app notes, they posted a design for a simple voltage to resistance converter, that doesnt use a pic or other microprocessor like what would normally be used.
http://www.maxim-ic.com/appnotes.cfm...te_number/3284

I think that that would suit our needs pretty well, and maxim stocks a 8-bit up/down digi-pot, the max 5455 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2568 would work, and sparkfun electronics had a cheap breakout board so you can avoid having to make your own board for the tssop 14 package. http://www.sparkfun.com/commerce/pro...roducts_id=498

that would allow us to input an analog voltage from whatever source we want.

I would imagine that you could possibly come up with something using an op-amp and a few FETs to convert voltage to resistance also.

Any thoughts to the legality of this? I don't think they could have an issue with this, like they would have with putting a PIC or other micro controller into a joystick.

Al Skierkiewicz 21-06-2006 21:03

Re: Voltage-to-resistance converter for using any joysticks
 
Jonathon,
If you are thinking of an electronic replacement for a joystick, the OI is already making the conversion. Remember that the joystick resistance is in series with the 5 volt supply and another resistor inside the OI. As the joystick resistance changes, the input voltage changes across the internal resistor. That is what is digitized by the input A/D convertor.

ConKbot of Doom 21-06-2006 23:11

Re: Voltage-to-resistance converter for using any joysticks
 
Quote:

Originally Posted by Al Skierkiewicz
Jonathon,
If you are thinking of an electronic replacement for a joystick, the OI is already making the conversion. Remember that the joystick resistance is in series with the 5 volt supply and another resistor inside the OI. As the joystick resistance changes, the input voltage changes across the internal resistor. That is what is digitized by the input A/D convertor.

Ahhh sorry, I didn't make it clear, I meant to use that circuit so you can use joysticks with non-100k pots in them (there are issues with using pots that aren't 100k, correct?)
Though, now that you mention the architecture of the internal circuitry, you could just get away with an op-amp with enough output current so that the pull-down resistor doesn't affect the voltage to the ADC.
cool :cool:

Schmitty! 14-07-2006 11:23

Re: Voltage-to-resistance converter for using any joysticks
 
I believe the interface is a little more complex than just measuring a voltage. I believe it's trying to measure an impedance (not just a resistance). The OI inputs use a multiplexed sample-and-hold circuit to measure the impedance.

There is a current sink internally on the OI that sinks a known current from whatever is connected to the OI input. At some point in time later it samples the voltage present on the input. Based on the measured voltage it assigns an appropriate 0-255 value. This method also allows the OI to determine if the input is an 'open' and for safety reasons assigns an 'open' measurement to a value of 127. This is also the reason why if you drive the input lower than 50mV it will register it as a reading of 127.

The resistance range of 0 to 100KOhms is what is typical for these inputs and I believe this is an industry standard for most remote control inputs. So if you use a non-standard value such as a 10K resistor you will only be able to use a small portion of the total range.

I saw a presentation at one time explaining how this standard interface operates, but I haven't been able to find it lately. If someone can find this, I think it would be very beneficial for anybody trying to use non-standard inputs on the OI.

I also contacted IFI last year about more details about this interface and the only response I got was that we should only use 100K pots. We are responsible for any other items we attach to these inputs.

Joe Johnson 14-07-2006 11:53

Re: Voltage-to-resistance converter for using any joysticks
 
Quote:

Originally Posted by Schmitty!
...
I also contacted IFI last year about more details about this interface and the only response I got was that we should only use 100K pots. We are responsible for any other items we attach to these inputs.

I thought that only 100K pots were legal per FIRST rules. Am I mistaken?

Joe J.

Jack Jones 14-07-2006 12:02

Re: Voltage-to-resistance converter for using any joysticks
 
For what it's worth. We use Logitech Dual Action game pads, which have 10K pots. We clamp the "free" end of the pot to ground and the OI interprets that voltage divider in a range from 44 to 210, which we correct in software to get a range from 0 to 254. We've done this for three years and haven't fried anything yet. :eek:

Manoel 14-07-2006 12:54

Re: Voltage-to-resistance converter for using any joysticks
 
Quote:

Originally Posted by ConKbot of Doom
Ahhh sorry, I didn't make it clear, I meant to use that circuit so you can use joysticks with non-100k pots in them (there are issues with using pots that aren't 100k, correct?)
Though, now that you mention the architecture of the internal circuitry, you could just get away with an op-amp with enough output current so that the pull-down resistor doesn't affect the voltage to the ADC.
cool :cool:

Actually, the OI is looking for a resistance, rather than a voltage, at its inputs. The conversion is made using a simple RC circuit. Capacitance being a constant inside the OI, the time (and this is what's actually read by the OI) it will take for this circuit to reach a certain threshold level (charge/discharge) will be proportional to the resistance that can be changed with joystick movement.
That's why the 100k value is so important, to achieve full scale (see Jack Jones' above post for an example).

That's the concept used, but I'm not sure how it really is implemented inside the OI. Someone willing to void their warranty and snap some pictures?

For reference, the PC game port implementation can be found here and an implementation using an Atmel microprocessor (which I assume is similar to what is done inside the OI) can be found here , courtesy of Larry Barello, mentor of FRC team 492.

Tristan Lall 14-07-2006 13:07

Re: Voltage-to-resistance converter for using any joysticks
 
Quote:

Originally Posted by Joe Johnson
I thought that only 100K pots were legal per FIRST rules. Am I mistaken?

Joe J.

That was a rule several years ago (when we were only allowed to use the kit parts, the items from the Small Parts catalogue, or specific additional hardware from FIRST's list). Now, the additional electronics are basically limited to components under $200 (USD) each.

Joe Johnson 14-07-2006 14:10

Re: Voltage-to-resistance converter for using any joysticks
 
Quote:

Originally Posted by Tristan Lall
That was a rule several years ago (when we were only allowed to use the kit parts, the items from the Small Parts catalogue, or specific additional hardware from FIRST's list). Now, the additional electronics are basically limited to components under $200 (USD) each.

Really? Teams could have hooked up a PDA to th port for example (assuming it was less than $200US)? Interesting.

Joe J.

Al Skierkiewicz 14-07-2006 14:11

Re: Voltage-to-resistance converter for using any joysticks
 
Wow,
This is an old issue. The input to the OI is a simple voltage divider where one side of a joystick pot is connected to 5 volts and the wiper is in series with a resistor in the OI. (The other terminal is not connected) As the joystick varies so to does the voltage inside the OI. The A/D convertor is scaled for this value (100K) to produce the 256 steps. The important thing to remember is that OI operation demands a return to zero (PWM=127) if the joystick should get pulled out by accident. This is the failsafe. The rule about the 100K is to insure that the joystick input tracks from joystick to joystick and allows the correct sensing in the event of a joystick failure. It is conceivable that a small value pot could be interpreted as an open joystick. As Jack has dicussed above, a change in value disrupts the A/D conversion and at the very least, does not give the maximum control/resolution that a 100K pot will give.

The common misconception of the RC circuit comes from many years ago, the robot controller (pre IFI) used the Basic Stamp. The Basic Stamp device does use the RC process to read pot values. Hence the confusion.

Tristan Lall 14-07-2006 14:24

Re: Voltage-to-resistance converter for using any joysticks
 
Quote:

Originally Posted by Joe Johnson
Really? Teams could have hooked up a PDA to th port for example (assuming it was less than $200US)? Interesting.

Joe J.

Yes. I've seen at least one team with a PC on board. (Bought in several sub-$200 parts, then assembled by the team.)

Edit: I thought that was referring to the robot (e.g. through the program port). A PDA may not send information to the OI.

Further to my previous post, the present 100 KΩ limit on joystick ports isn't a rule, it's a just hardware specification for the joystick port (to get the right voltage levels). Previously, control system components (e.g. the OI, joysticks and accessories) were covered by the additional hardware list. Taking 2000 as an example, the KOP included a 100 KΩ potentiometer, Small Parts doesn't sell potentiometers, and there was no entry for a potentiometer in the AHL. Therefore teams were effectively limited to 100 KΩ potentiometers.

Jack Jones 14-07-2006 14:35

Re: Voltage-to-resistance converter for using any joysticks
 
Quote:

Originally Posted by Joe Johnson
Really? Teams could have hooked up a PDA to th port for example (assuming it was less than $200US)? Interesting.

Joe J.

If by "the port" you mean the joystick port, then NO - portable computing devices may not be connected to the joys - nor may any device that doesn't draw its power from the port.

A PDA may be connected to the RS232 on the OI for "the purpose of displaying feedback."

Cody Carey 14-07-2006 14:40

Re: Voltage-to-resistance converter for using any joysticks
 
Quote:

Originally Posted by Joe Johnson
Really? Teams could have hooked up a PDA to th port for example (assuming it was less than $200US)? Interesting.

Joe J.


I don't believe so... not to the joystick port anyway. You could connect it to the OI for a dashboard program, however.

Basically it just broadens the range of controllers/joysticks you are allowed to use.


EDIT: ^ Beat me to it. Darn you youtube, with your sidetracking...

Jack Jones 14-07-2006 15:29

Re: Voltage-to-resistance converter for using any joysticks
 
Quote:

Originally Posted by Al Skierkiewicz
Wow,
... As Jack has dicussed above, a change in value disrupts the A/D conversion and at the very least, does not give the maximum control/resolution that a 100K pot will give.

...

I somewhat disagree. It would appear that giving it 83 either side of 127 only uses 65% of the resolution, but the power curve isn't linear, it's quadratic. A PWM value of +-83 applies 90% power. We simply max that out to 100%. So, we're using full range of the stick to control the first 90%, which IMO gives us more resolution where we really need it.

Al Skierkiewicz 15-07-2006 12:13

Re: Voltage-to-resistance converter for using any joysticks
 
Jack,
When I am thinking of what takes place (pot to input to A/D to software) I look at what most accurately translates hand motion on the joystick to movement. I am stuck in the mindset of audio and video where the smoothest transitions for audio mixing or video shading take place when the operator has the ability to use the maximum travel over a fixed distance. In the majority of the high end audio consoles fader travel is over 100mm. This translates to the approximate actuating distance of the average human hand/fingers without strain or cramping. Dividing the full range of the A/D (256 steps) over that 100mm gives a step change of 0.39mm/value change. What you do with that range in software is up to the user but I think it gives the max range for accuracy at the A/D. We all know that the cheap pots in any given joystick do not travel the full 100K (+/-50k) so either calibrating the speed controlers or using software to approximate the full travel is essential I know we modify range and acceleration with software for all input regardless of the device that is connected. BTW, I still find teams that do not calibrate controllers in the absence of calibration elsewhere in their system. It must be hard for those drivers to try and compensate for the lack of range in their interface.


All times are GMT -5. The time now is 15:28.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi