>>How can I build an analog joystick without potentiometers:
>>I mean, something like a mouse, with optical components.
1.....+5 volts
2.....button one
3.....#1 axis "X"
4.....ground
5.....ground
6.....#1 axis "Y"
7.....button 2
8.....+5 volts
9.....+5 volts
10...button 3
11...#2 axis "X"
12...ground
13...#2 axis "Y"
14...button 4
15...+5 volts
BTW there are good pots out there. They just don't put them on most
joysticks/wheels.
> No you can't.
> It's probably possible to build a joystick with this technique, but it
> wouldn't be analog. A mouse isn't analog either.
It would be easier to examine the sidewinder or wingman serial protocols
and encode the opticals wheels your self. Still non trivial.
Unless there is a chip which does this.
--
Bill Ryder Silicon Graphics New Zealand SGI V-Mail: 234 1456
Systems Engineer Ph: (+64 4) 494 6326
DISCLAIMER: Unless explicitly stated all opinions are mine not SGI's
Have you ever seen a DAC that gives resistence as output? I haven't, but
if they exist I'd know a few nice things I'd like to do with them.
// Johan
> > Well you could but it would be hard. you would have to have an encoder
> > which will have DtoA's to simulate pots.
> Have you ever seen a DAC that gives resistence as output? I haven't, but
> if they exist I'd know a few nice things I'd like to do with them.
It might be resolution enough for sims, but then again it might not...
Trips
> > Well you could but it would be hard. you would have to have an encoder
> > which will have DtoA's to simulate pots.
> Have you ever seen a DAC that gives resistence as output? I haven't, but
> if they exist I'd know a few nice things I'd like to do with them.
It says it is a 'active voltage controlled resistor' but I don't know if
this would work. A DAC will output voltage though.
Hmm..
Alternatively you could switch a resistor network (but that would be
tedious and low res would't it?)
--
Bill Ryder Silicon Graphics New Zealand SGI V-Mail: 234 1456
Systems Engineer Ph: (+64 4) 494 6326
DISCLAIMER: Unless explicitly stated all opinions are mine not SGI's
> > > Well you could but it would be hard. you would have to have an encoder
> > > which will have DtoA's to simulate pots.
> > Have you ever seen a DAC that gives resistence as output? I haven't, but
> > if they exist I'd know a few nice things I'd like to do with them.
> Nope but I found this:
> http://www.avtechpulse.com/papers/vres/index.html
> It says it is a 'active voltage controlled resistor' but I don't know if
> this would work. A DAC will output voltage though.
--
Bill
> > > Well you could but it would be hard. you would have to have an encoder
> > > which will have DtoA's to simulate pots.
> > Have you ever seen a DAC that gives resistence as output? I haven't, but
> > if they exist I'd know a few nice things I'd like to do with them.
> Never came across a DAC that outputs resistance, but an alternative
> might be a digital potentiometer. Only problem there is the best
> resolution I've seen on digital potentiometers is 8 bits (256 discrete
> resistance steps)
> It might be resolution enough for sims, but then again it might not...
--
Anssi Lehtinen
>>Have you ever seen a DAC that gives resistence as output?
>I don't know exactly how a gameport measures resistance but I'd guess it's
>putting the 5 volts across the pot and then measuring the voltage on the
>swiper. You should be able to put a variable 0 - 5 volts on that pin and have
>it work.
>DISCLAIMER: Don't try this. If you decide to try this and fry your soundcard,
>it was your decision to try it and I accept no responsibility. My advice is to
>not try it.
>But I bet it would work. ;)
Unfortunately, the PC port connects 5V to one end of the pot and uses
the wiper (ie the variable resistance) to charge a capacitor in a
monostable circuit. (the other end of the pot is not connected)
Effectively, it is using a RC circuit's time constant to determine the
resistance.
Doing what you suggested will give a very non linear result.
(that said, I've never tried this so someone could prove me wrong!)
Toby
--
Remove NOSPAM from address if replying by email.
>> > > Well you could but it would be hard. you would have to have an encoder
>> > > which will have DtoA's to simulate pots.
>> > Have you ever seen a DAC that gives resistence as output? I haven't, but
>> > if they exist I'd know a few nice things I'd like to do with them.
>> Never came across a DAC that outputs resistance, but an alternative
>> might be a digital potentiometer. Only problem there is the best
>> resolution I've seen on digital potentiometers is 8 bits (256 discrete
>> resistance steps)
>> It might be resolution enough for sims, but then again it might not...
>I seem to recall the digital joystick have 8-bit resolution, and I also
>think it's loads better than the shaky analog ones we have now. "Shakes"
>of about 1/20 of the movement range are not uncommon (with bad pots you
>get 100% shakes (infinite resistance), but that's another issue)
256 steps gives you almost 1 degree resolution. According to my calcs
that is about 2mm movement of the edge of the wheel (assumes 25cm dia
wheel). Might be OK but 10 bits would be better.
As per another post (Bill Ryder?), you could build a discrete 10 bit
dac using 10 resistors.
D0----\/\/\/\------ output
D1----\/\/\/\---|
D2----\/\/\/\---|
etc
If you stick in a series diode for each resistor it makes the sums
much easier! D0 resistor is 100R, D1 200R, D3 400R etc
(Dn low, no affect. Dn high, resistance sums with other bits)
Drive all this from something like a PIC microcontroller and you still
have a couple of I/O pins for reading an optical encoder.
(Guess what my first project will be when I get my PIC programmer
working ;-)
Toby
--
Remove NOSPAM from address if replying by email.
> > > Well you could but it would be hard. you would have to have an encoder
> > > which will have DtoA's to simulate pots.
> > Have you ever seen a DAC that gives resistence as output? I haven't, but
> > if they exist I'd know a few nice things I'd like to do with them.
> Never came across a DAC that outputs resistance, but an alternative
> might be a digital potentiometer. Only problem there is the best
> resolution I've seen on digital potentiometers is 8 bits (256 discrete
> resistance steps)
> It might be resolution enough for sims, but then again it might not...
> Trips
http://www.dalsemi.com/DocControl/PDFs/pdfindex.html
These all look like 100Kohm, 256 position digitally controlled pots:
DS1868 looks similar to other two.
http://www.dalsemi.com/DocControl/PDFs/1868.pdf
DS1803 low power, serial synchronous bus interface and addressable
http://www.dalsemi.com/DocControl/PDFs/1803.pdf
DS1267 two wire serial port settable
http://www.dalsemi.com/DocControl/PDFs/1267.pdf
mandatory disclaimer - I haven't had a close look at the datasheets to
see if these are appropriate, I have glanced at them tho. You will need
to check them out for yourself if you really want to do this.
I must look at the PIC stuff too. ( http://www.microchip.com/ )
--
Bill Ryder Silicon Graphics New Zealand SGI V-Mail: 234 1456
Systems Engineer Ph: (+64 4) 494 6326
DISCLAIMER: Unless explicitly stated all opinions are mine not SGI's