Shop OBEX P1 Docs P2 Docs Learn Events
Any joystick control experts? — Parallax Forums

Any joystick control experts?

T ChapT Chap Posts: 4,223
edited 2006-12-06 00:23 in General Discussion
I need to learn about controlling some motors with joysticks. Ihave no knowledge about servos, but maybe that is an option for one of the systems. The project would require some of the motors to run continuously, with the postition of the joystick determining the speed. Other parts other system would require a fixed position, so that the position of the joystick sends the motor to a fixed position.

I can imagine a way to do either methods with a stepper, but am thinking that the stepper is not the best suited to the job. There are dumb DC motors that are doing similar tasks, with limit switches to stop the motors if needed. The first task is to find a joystick, my guess is that pots on the joystick are how it would usually be done to get positioning. Googling hasn't turned up good info yet. Anyy suggestioned would be great on where to start.

Comments

  • YendorYendor Posts: 288
    edited 2006-12-05 05:51
    Can you give us more details on your project?

    Some ideas:
    Servos would be used for a range of motion.
    PWM can be use for a straight DC motor for speed variability.
    Servos - just depends on stoping at a particular cycle or positioning.· E.g. spin 5 cycles and stop at 180 degrees.

    There are several Joystick types. What I would call Digital (uses switches)·or Analog·(uses pots).

    On a digital type (Atari), you could have the PWM increase/decrease the Duty cycle holding the stick up/down.
    Analog (PC), you could read the pot value and increase the PWM duty cycle that way as well.

    There's tons of joystick schmatics on the web. Try http://www.discovercircuits.com/J/joysticks.htm

    Just kinda depends on the type of action you're looking for on the joystick, and what overall function you're wanting to provide.

    Lettuce know!

    Post Edited (Yendor) : 12/5/2006 5:57:31 AM GMT
  • T ChapT Chap Posts: 4,223
    edited 2006-12-05 06:36
    Thanks for the info and link. I am looking into doing a project that is a boom with pan/tilt, plus an up/down for the boom, plus a motorized dolly on a track. Initially, all motors can be simple continuous motion PWM controlled by the joystick. What I am wondering about is, if each linear pot sits at 50% when in the center, how does the circuit know to reverse the motors when pulling back on the joystick for example. I assume a micro is required to read the state of each pot, and output a PWM and direction(phase) accordingly. Since dead center of a pot may be too hard to maintain a repeatable and precise result, either there needs to be switches incorporated to detect if the axis is centered, or let the micro consider a range or resistance as the center to accommodate for variances. Servos may be overkill, I am think just a motor that is standing still when the stick is centered, and when pushed forward, it ramps up to max speed relative to the position between the center detent and max forward. The opposite happens on reverse which is typical. The Propeller would be the preferred chip to use if anything already exists as an example.
  • kelvin jameskelvin james Posts: 531
    edited 2006-12-05 07:10
    The HB-25 motor controller may be a good option to look at for dc motor positioning with a joystick.

    kelvin
  • T ChapT Chap Posts: 4,223
    edited 2006-12-05 07:39
    The hb-25 looks like the solution. Must be a hot item since it can't be found in stock anywhere. It is not clear from the docs, but there seems to be a number of pulses that sets the stop, and aboe and beyond that number of pulses sets the direction and speed. One sample code shos 150 as the initial stop, one shows 750. For anyone familiar with it, is the first value of pulses sent set as the stop position regardless of its value?


    xinchang.en.alibaba.com/product/0/50217117/Potentiometer__Encoder____Switch.html

    www.happcontrols.com/joysticks/joysticks_amusement.htm

    Post Edited (originator) : 12/5/2006 9:09:15 AM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-12-06 00:23
    The hb-25 will be back in stock very soon.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
Sign In or Register to comment.