Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   creating a joystick (oh joy) (http://www.chiefdelphi.com/forums/showthread.php?t=37919)

mechanicalbrain 05-05-2005 00:00

creating a joystick (oh joy)
 
I have, getting tired of searching for 3d joysticks that use serial instead of USB, decided to build my own 3d joystick and I was wondering if anyone has a recommendation for high quality potentiometers. I'm aware that they become uncalibrated over use and I'm looking for something easy to reset and reasonably reliable. One thing I'm considering is mounting a normal joystick to a swiveling surface and attaching one potentiometer to that.

eugenebrooks 05-05-2005 00:16

Re: creating a joystick (oh joy)
 
Quote:

Originally Posted by mechanicalbrain
I have, getting tired of searching for 3d joysticks that use serial instead of USB, decided to build my own 3d joystick and I was wondering if anyone has a recommendation for high quality potentiometers. I'm aware that they become uncalibrated over use and I'm looking for something easy to reset and reasonably reliable. One thing I'm considering is mounting a normal joystick to a swiveling surface and attaching one potentiometer to that.

You can find high quality single turn pots in at www.digikey.com,
paying around $10 for a very nice Bourns unit if you want. The most
significant problem for building a joystick is the mechanical lingage.
This is where most of your effort would be focused.

Have you considered buying a USB joystick and then gutting the
electronics? All you would need to do is find one that uses 100K
pots internally, custom wire them to suitable inputs on the OI and
then you would be done. Any centering adjustments could be handled
by putting a lower resistance pot in series. Alternatively, you could
use a switch input to the OI to command the RC to read the pots
and use that value for "center," taking one more adjustment that
can get messed up out of the equation.

Eugene

BrianBSL 05-05-2005 01:31

Re: creating a joystick (oh joy)
 
Quote:

Originally Posted by eugenebrooks
You can find high quality single turn pots in at www.digikey.com,
paying around $10 for a very nice Bourns unit if you want. The most
significant problem for building a joystick is the mechanical lingage.
This is where most of your effort would be focused.

Have you considered buying a USB joystick and then gutting the
electronics? All you would need to do is find one that uses 100K
pots internally, custom wire them to suitable inputs on the OI and
then you would be done. Any centering adjustments could be handled
by putting a lower resistance pot in series. Alternatively, you could
use a switch input to the OI to command the RC to read the pots
and use that value for "center," taking one more adjustment that
can get messed up out of the equation.

Eugene

The problem is that many of today's USB joysticks don't use pots at all and use optical or magnetic sensing systems instead. Not having trim adjustments is a pretty good sign of not using pots. We even tried using a Microsoft Sidewinder 3d Pro - a 3 axis joystick that's digital overdrive (digital over joystick port) but is also backwards compatible in analog mode. Unfortunately it outputs varying voltage rather than varying resistance, making the values that the OI sees pretty useless. We thought about running it through an ADC and then into a multiplexed resistor array but it just seemed like too much trouble, and then we decided a 2nd joystick did a better job anyways.

mechanicalbrain 05-05-2005 18:00

Re: creating a joystick (oh joy)
 
the problem is i really want to use a 3d joystick.

ConKbot of Doom 05-05-2005 19:01

Re: creating a joystick (oh joy)
 
Well, if you can get quadrature output, or a analog voltage, you could use a PIC and an SPI digi-pot. The SPI protocol is simple enough to bit-bang, and there is 8-bits of resolution, which lines up nicely with the OI.

Of course with that, you could start getting into look-up tables allready on-board the joystick, on-board mixing, and all kinds of fancy stuff... Got a kiwi drive? use the PIC to mix your 2 joysticks, and send the desired motor values to the RC, which can still use PID or whatver kind of control you use.


I may develop a simple PIC based converter this summer, if I do I'll make the source code available for use, and sell pre-programmed pics with the code on it.

Though if you want to get fancy, it might be neat to use the force-feedback on a sidewinder for something. Maybe a stick shaker or somthing if the CG is in a bad position, (robot about to tip...) or make it more stiff going forward if it detects that the wheels are slipping, (I.E. you are shoving something)

Greg McCoy 21-05-2005 19:49

Re: creating a joystick (oh joy)
 
Quote:

Originally Posted by ConKbot of Doom
Well, if you can get quadrature output, or a analog voltage, you could use a PIC and an SPI digi-pot. The SPI protocol is simple enough to bit-bang, and there is 8-bits of resolution, which lines up nicely with the OI.

Of course with that, you could start getting into look-up tables allready on-board the joystick, on-board mixing, and all kinds of fancy stuff... Got a kiwi drive? use the PIC to mix your 2 joysticks, and send the desired motor values to the RC, which can still use PID or whatver kind of control you use.


I may develop a simple PIC based converter this summer, if I do I'll make the source code available for use, and sell pre-programmed pics with the code on it.

Though if you want to get fancy, it might be neat to use the force-feedback on a sidewinder for something. Maybe a stick shaker or somthing if the CG is in a bad position, (robot about to tip...) or make it more stiff going forward if it detects that the wheels are slipping, (I.E. you are shoving something)

Just to let you know, this has been illegal in (all?) previous games.

Quote:

Originally Posted by 2005 Rule <R69>
All equipment connected to the Joystick Ports of the Operator Interface must be powered solely through
the power available through the port. External power sources of any type are not permitted on any
equipment connected to the Joystick Ports. Portable computing devices may not be connected to Joystick
input ports on the Operator Interface.

I wouldn't expect FIRST to change this in the near future, but you never know.

Many alternative joystick solutions are being posted in this thread, you might try looking there.

jgannon 22-05-2005 18:23

Re: creating a joystick (oh joy)
 
Quote:

Originally Posted by ConKbot of Doom
Of course with that, you could start getting into look-up tables allready on-board the joystick, on-board mixing, and all kinds of fancy stuff... Got a kiwi drive? use the PIC to mix your 2 joysticks, and send the desired motor values to the RC, which can still use PID or whatver kind of control you use.

Quote:

Originally Posted by Greg McCoy
Just to let you know, this has been illegal in (all?) previous games.

Quote:

<R69> All equipment connected to the Joystick Ports of the Operator Interface must be powered solely through the power available through the port. External power sources of any type are not permitted on any equipment connected to the Joystick Ports. Portable computing devices may not be connected to Joystick input ports on the Operator Interface.
Interpretations vary, I suppose, but let's take a look at another rule, just a few lines above R69:
Quote:

<R66> Teams are permitted to connect a portable computing device (Laptop computer, PDAs, etc.) to the RS232 Output of the Dashboard Port of the Operator Interface for the purpose of displaying feedback from the robot while competing in Competition matches. Please note that AC power will not be available at the playing field so these devices will have to run on internal batteries.
So, to me, embedded processor != portable computing device. So long as the power for the PIC comes from the +5V pin on the joystick port, it sounds kosher to me. Am I missing something?

ConKbot of Doom 22-05-2005 22:52

Re: creating a joystick (oh joy)
 
Quote:

Originally Posted by Q&A ID:1282
Q: R69 Says portable computing devices may not be connected to joystick ports. Does this include any custom circuits that perform logical operations (relays, TTL ICs, or even PICs)?

A: Whatever you connect, it must get its power from the joystick port.

There may be some hope... I just wouldn't push having external controls to adjust any of the functions of the PIC. As For PID... I had a brain fart... that actually requires feedback.

Greg McCoy 22-05-2005 22:57

Re: creating a joystick (oh joy)
 
Quote:

Originally Posted by jgannon
Interpretations vary, I suppose, but let's take a look at another rule, just a few lines above R69:

So, to me, embedded processor != portable computing device. So long as the power for the PIC comes from the +5V pin on the joystick port, it sounds kosher to me. Am I missing something?

To me, the intent of the rule is to prevent systems like this. The question has popped up in threads before, and it has generally been considered illegal. Ian W. sums it up pretty well here.

Good luck.

EDIT: That Q&A answer really suprises me...I guess you'll just have to go by whatever FIRST says next year.

Matt Krass 23-05-2005 00:04

Re: creating a joystick (oh joy)
 
Quote:

Originally Posted by jgannon
Interpretations vary, I suppose, but let's take a look at another rule, just a few lines above R69:

So, to me, embedded processor != portable computing device. So long as the power for the PIC comes from the +5V pin on the joystick port, it sounds kosher to me. Am I missing something?

Actually, the rules say you can't connect it to the Joystick ports, but you can connect it to Dashboard for feedback only . Thus I don't believe it'd be legal.

jgannon 23-05-2005 00:16

Re: creating a joystick (oh joy)
 
Quote:

Originally Posted by Matt Krass
Actually, the rules say you can't connect it to the Joystick ports, but you can connect it to Dashboard for feedback only . Thus I don't believe it'd be legal.

The rules say you can't connect a portable computing device to the joystick port. A PIC is not a portable computing device, by my definition, and thus is legal. Q&A 1282 supports this assertion. The reason I quoted R66, which is about the Dashboard port, was to point out what their definition of a "portable computing device" is. Am I still missing something? It looks legal to me.

Sparks333 23-05-2005 10:44

Re: creating a joystick (oh joy)
 
If you don't consider a PIC a portable computing device, then what do you consider it? You can move it around (it's not bolted to the floor or anything, so it's portable), and it computes stuff. It isn't one in the traditional sense of the word, but in terms of FIRST, it may be iffy. This is one of the issues where it's the intent of the law vs the wording of the law. Try to understand what they want to avoid and see if what you're doing opens up the possibility.

Gotta ask: what are they worried about with a logic driver of some sort connected between the joystick and the oi?

Sparks

Matt Krass 23-05-2005 15:12

Re: creating a joystick (oh joy)
 
I also believe a PIC is a portable computing device, I'm not sure what else you classify it as, so in that sense, it wouldn't be legal. However if somebody can point out a way to classify it that's not a portable computing device, then I suppose it'd be legal in a loophole sense.

ConKbot of Doom 23-05-2005 15:57

Re: creating a joystick (oh joy)
 
1 Attachment(s)
Well I was thinking some more, if you got tricky, you could partially bias on a FET to get the varying resistance. But that would have to be tuned to each individual FET, not just for one type, since each one would be slightly different.

Quote:

If you don't consider a PIC a portable computing device, then what do you consider it?
Well in this application I would consider it an ADC with an master I2C output.

I guess if you had to you could use a parallel ADC, a parallel in serial out shift register, a 555, a spi digi-pot, and some more logic, but a PIC would be so much easier. Just a pic and a digi-pot.

Wait a minute, you might be able to get away with just a parallel ADC. With various resistors on the output. Let me do some thinking about that and get back to you all.

EDIT: I got it :D Take an 8-bit or greater ADC, provide it with whatever it needs to keep spitting out values, put an octal inverter on its outputs (the 8 MSBs if it is > 8 bit) and have the octal inverter outputs hooked to the gates of some small MOSFETs. Have it so when that particular mosfet is on, the total resistance of the mosfet and the resistors on it is equal to what is in the calculator spreadsheet I attached.

10k-90k is a reasonable range for one of the CH flightsticks right? if not you can change it to whatever is you like. The calculator accounts for a pull up resistor of the same value of the maximum pot value.

You might be able to get away without the mosfet stage if you are using a inverter with CMOS outputs, but I'm not sure. It would be nice if we could get someone that would pre-make these and be able to sell them to everyone. Just a little box thing that goes on the end of the joystick cord. Wouldn't be that hard, just get some PCBs made up by www.olimex.com, get the the DAC's and the other components and solder it up.

Is Andy Mark up to expanding into electronics? ;)

EDIT 2: bah, I dont think I have that spreadsheet right. I need to work on it some more...

Sparks333 24-05-2005 00:02

Re: creating a joystick (oh joy)
 
Gotta say it again:
What is the intent of the rule, and is what you are planning on doing opening up the possibility of what the rule excludes occuring?

Personally, I have absolutely no idea what the intent is. Any thoughts?

Sparks


All times are GMT -5. The time now is 20:46.

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