Society of Robots - Robot Forum

Mechanics and Construction => Mechanics and Construction => Topic started by: Hal_Emmerich on September 05, 2010, 02:26:30 PM

Title: Joystick choices for a PWM circuit
Post by: Hal_Emmerich on September 05, 2010, 02:26:30 PM
Hi! I was hoping someone could help me choose a joystick for my project (which I talk about here: http://www.societyofrobots.com/robotforum/index.php?topic=11478.0 (http://www.societyofrobots.com/robotforum/index.php?topic=11478.0)).

At the suggestion of my professors, my circuit will likely use a LTC6992 PWM chip (http://cds.linear.com/docs/Datasheet/69921234f.pdf (http://cds.linear.com/docs/Datasheet/69921234f.pdf)) with a joystick as the varying input, which in turn will hopefully create a varying PWM output.

I need a joystick that has 2 degrees of freedom and two output wires (X and Y). The chip can only handle a 0 V to 1 V varying input, but I could always use resistors to modify the joystick output.

I was hoping to use a small and cheap joystick similar to the ones used in RC car controls.

EDIT: I have found this one here: http://www.newark.com/jsp/search/productdetail.jsp?SKU=01M8005&CMP=AFC-GB100000001 (http://www.newark.com/jsp/search/productdetail.jsp?SKU=01M8005&CMP=AFC-GB100000001)
This one would probably work, but I was really hoping for a smaller and cheaper joystick.

Unfortunately, I am having trouble deciding what joystick to use. I can only find really expensive ones, and I would like to spend less than $200 and pick the right one on the first try. If anyone can give any suggestions to help me, I would greatly appreciate it. :)

Thank you! :D
Title: Re: Joystick choices for a PWM circuit
Post by: Metal Slug 2 on September 06, 2010, 03:58:46 AM
Wow, that is an expensive joystick you found there :o :P.

I have the perfect solution: A thumb joystick (http://www.sparkfun.com/commerce/product_info.php?products_id=9032).  Those are probably identical to the ones found on a PS2 controller, and will provide output for both the x and y axes.  Assuming a little electronics knowledge, that thumb joystick should work out just fine.
Title: Re: Joystick choices for a PWM circuit
Post by: Hal_Emmerich on September 06, 2010, 10:55:57 AM
Thank you, Metal Slug 2! I will look into how to get my voltages from that type of joystick. And I know, that joystick I found is really expensive, and most others I found were over $100! Thanks again!
Title: Re: Joystick choices for a PWM circuit
Post by: madsci1016 on September 06, 2010, 11:20:05 AM
Those are probably identical to the ones found on a PS2 controller,

Or you can use a whole PS2 controller and Arduino.

PlayStation 2 Controller Arduino Library Demonstration (http://www.youtube.com/watch?v=LMgzF7qeeEY&feature=player_embedded#)

Details:

http://www.billporter.info/?p=240 (http://www.billporter.info/?p=240)

Depends on what your need is.
Title: Re: Joystick choices for a PWM circuit
Post by: Hal_Emmerich on September 06, 2010, 02:24:01 PM
Thanks, madsci1016! Wow, that was a great video! I will certainly look into how to do that with the link you gave. It's probably too advanced for my meager knowledge of electronics, but any details will help guide me in the right direction. Thanks again!
Title: Re: Joystick choices for a PWM circuit
Post by: Soeren on September 06, 2010, 03:54:15 PM
Hi,

I need a joystick that has 2 degrees of freedom and two output wires (X and Y). The chip can only handle a 0 V to 1 V varying input, but I could always use resistors to modify the joystick output.
There are lots of simple joysticks
Look at these (http://parts.digikey.com/1/parts-kws/joystick-potentiometers)
They probably comes much cheaper, this was just the first hit at Google.

Your chip seems to have an input impedance of 100MOhm, so anything up to 1MOhm total resistance will be allright.

For each axis, add a resistor of the same size as the variable one and put 2V over the serial connection, with the output from the common node, then you'll get a 0 to 1V response (the variable resistor in the pot should be from Gnd/0V and the regular resistor should go to +2V).

Any resistance between 100 Ohm and 470 Ohm should do.
A 1..10nF (experiment) cap on the output can reduce jitter from the pots.
Title: Re: Joystick choices for a PWM circuit
Post by: Hal_Emmerich on September 06, 2010, 04:25:31 PM
Thank you, Soeren! Those calculations help me immensely. I was very confused about where to place resistors in my design, so you've really helped me out. Thank you! :D
Title: Re: Joystick choices for a PWM circuit
Post by: knossos on September 13, 2010, 03:03:37 PM
I know its not small or anything, but as far as cheap you, you can't get much cheaper than something like this joystick below.

I pulled this out of an old analog Thrustmaster joystick I picked up at goodwill for $1.95.  I also got several switches and another pot all for use with other projects.

You can see it just has two pots, one for X and one for Y axis.  Should be easy to interface for your project.
Title: Re: Joystick choices for a PWM circuit
Post by: Hal_Emmerich on September 19, 2010, 02:46:15 PM
I know its not small or anything, but as far as cheap you, you can't get much cheaper than something like this joystick below.

I pulled this out of an old analog Thrustmaster joystick I picked up at goodwill for $1.95.  I also got several switches and another pot all for use with other projects.

You can see it just has two pots, one for X and one for Y axis.  Should be easy to interface for your project.


Thank you, knossos! Sorry for not replying earlier, I haven't remembered to check the forums for a little while. Thank you for that picture, it really helps me visualize how I am going to integrate my joystick into my design. It sounds like you are using it the way I was hoping to use mine. Thanks again! :D