586,283 active members*
3,930 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > Hobbycnc (Products) > Use Joystick to control 3 Axes.
Page 1 of 2 12
Results 1 to 20 of 38
  1. #1
    Join Date
    Feb 2006
    Posts
    5

    Use Joystick to control 3 Axes.

    Hello all,

    Who can tell me know how to use Joystick with HobbyCNC board to control x, y, z axis? This one is easy for user to set 0,0,0 point or mill some simple shape. I don’t want to use Joystick via USB port because I have to turn PC on when do this. Give me your advice please. Thank you.

  2. #2
    Join Date
    Sep 2006
    Posts
    245
    It would not be too hard if you are good at electronics. I would tear apart a cheap joystick and replace the electronics with a PIC or AVR microcontroller. The HobbyCNC board needs 2 signals (direction and step) for each stepper motor. The step signal needs to pulse at the rate you want to turn the motor, and can be proportional to the joystick position. The output signals are just TTL level signals sent to a parallel port connector.

    I plan on building one in the near future.

  3. #3
    Join Date
    Feb 2006
    Posts
    5
    Thank you Steve323, When do you start? Please take a photo when you accomplish this one. Do you have schema for this one? How do you think if i make another board with joystick and combine parallel with HobbyCNC board? is it possible?

  4. #4
    Join Date
    Sep 2006
    Posts
    245
    Sure, I will post some pictures. It may be a week or two before I finish. I have small children that limit my available hobby time.

    There is not much to the schematic. The total component count will probably be 4 batteries, a 5V regulator, an AVR processor, a crystal, and the joystick potentiometers. The AVR has analog inputs that can read the potentiometers directly. The outputs can directly drive the printer cable, although I may add a buffer. I will probably also add some LEDs to monitor the input signals.

  5. #5
    Join Date
    May 2004
    Posts
    13
    Why is a joystick needed?

    I was thinking it would be easier to control and simpler to with a box that had a toggle switch and buttong for each axis. The switch would control direction (up/down for z or y and left/right for x). The button would control the steps (pulses). The pulses could be generated by a simple 555 timer chip. Come to think of it a small potentiometer could be added below each button to control the step rate (faster / slower). I thought this box would look like a pendant you see on some machines.

    What do you guys think?

  6. #6
    Join Date
    Sep 2006
    Posts
    245
    That would be an option also. A small microcontroller has an advantage that it can be programmed to shut off if the limit switches are reached. It just depends on what is easier for you to build.

    I will probably make mine using potentiometers from a gameboy type controller. They are like tiny joysticks and would fit easily into a pendant type control.

  7. #7
    Join Date
    Dec 2006
    Posts
    204

    schematic

    I am new to all of this, just now started my build of a cnc machine. Have ordered a conrol board from hobbycnc and have not made up my mind on which software to use. If you would post pictures and schematic, I would like to look into building one.
    Thanks
    Dan

  8. #8
    Join Date
    Sep 2006
    Posts
    245
    Here is a picture of my joystick controller. The joystick is available from Digikey for around $6. It appears identical to the two devices found in a cheap gameboy type controller. The CPU is a 28 pin Atmel AVR microcontroller. I built it using point to point wiring, although it would have been easier to build a small circuit board.

    My setup has 3 pushbuttons. One button switches between XY or ZA mode. One button selects only the strongest of the X or Y direction to allow moving just one axis in a straight line. The third button is slow mode to limit the max speed. LEDs light up to show the active axis plus plus the status of the home inputs. I also added jumpers to gang the 4th axis with the X axis because my router has 2 X axis stepper motors.

    The joystick is programmed to have 100 different delay values ranging from 0.25 to 0.00025 seconds. This gives reasonably smooth control from really slow to the max limit before the motors stall out.
    Attached Thumbnails Attached Thumbnails joystick.jpg   schematic.jpg  

  9. #9
    Join Date
    Dec 2006
    Posts
    204

    joystick controller

    could this be use with software where the software is use to run a program, and the joystick could be use to set the router in place if you were cutting a lot of the same pattern out one piece of wood?
    Dan

  10. #10
    Join Date
    Sep 2006
    Posts
    245
    No, that would require an input port and an output port so the device could sit in-line. I would be worried about missing pulses or messing up the timing, so I only have an output port.

    It might work with a parallel port switch box although it would probably jump when switching between the two. Cheap switch boxes are not usually debounced.

  11. #11
    Join Date
    Jul 2005
    Posts
    35
    I am pretty sure that Mach3 will let you do this already.

    -=sHrEk=-
    -=sHrEk=-

  12. #12
    Join Date
    Dec 2006
    Posts
    40
    Quote Originally Posted by 7ofclubs View Post
    I am pretty sure that Mach3 will let you do this already.

    -=sHrEk=-
    Let you do what, exactly?

  13. #13
    Join Date
    Apr 2005
    Posts
    3634
    .

  14. #14
    Join Date
    Mar 2006
    Posts
    759
    Quote Originally Posted by Switcher View Post
    .
    May I quote you on that, Switcher?
    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

    "If the women don't find you handsome, they should at least find you handy"
    -RedGreen show.

  15. #15
    Join Date
    Dec 2006
    Posts
    204
    If you do, you want have much to say.
    Dan

  16. #16
    Join Date
    Apr 2005
    Posts
    3634
    Quote Originally Posted by massajamesb View Post
    May I quote you on that, Switcher?
    I was going to say the same as "7ofclubs", that Mach3 will let you add a game controller.

    I had a link, I just can't find it (for a step by step on doing this in Mach3).



    .

  17. #17
    Join Date
    Dec 2006
    Posts
    40
    Quote Originally Posted by Switcher View Post
    I was going to say the same as "7ofclubs", that Mach3 will let you add a game controller.

    I had a link, I just can't find it (for a step by step on doing this in Mach3).



    .
    Does Mach 3 let you just reference it from the Joystick port on the sound card?

  18. #18
    Join Date
    May 2005
    Posts
    1810
    I am currently using a plug and play, USB joystick (Logitech game controller) in Mach 3 - if I can configure it to work, anybody can! I altered the buttons to allow me to start, stop and pause a program and I use the joystick portions to jog all axii on the machine in manual mode. It was simple and it was less than $20.

    It's pretty tolerant of the chips and oil, too.

    Scott
    Consistency is a good thing....unless you're consistently an idiot.

  19. #19
    Join Date
    Dec 2006
    Posts
    204
    I am building the joystick from the plans that was posted by STEVE 323 and if someone that has it hook up where they are using Mark 3 - I would like some help to show me how to hook it up.
    Dan

  20. #20
    Join Date
    Dec 2006
    Posts
    40
    I am building the joystick too, but instead of using an analog joystick, I am using a directional membrane pad, and a digital readout with a PIC microcontroller to handle sending the coordinates between (what I hope), an LCD and the software.

    Don't forget that you have to program the firmware into that microcontroller.

Page 1 of 2 12

Similar Threads

  1. 21i TB joystick....
    By patrickb in forum Fanuc
    Replies: 7
    Last Post: 07-13-2006, 11:20 AM
  2. joystick
    By phe259 in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 5
    Last Post: 03-27-2006, 07:37 AM
  3. Adding a Joystick.
    By on7tim7 in forum Mach Mill
    Replies: 0
    Last Post: 01-10-2006, 08:33 PM
  4. Standalone Joystick Stepper Control
    By kochevnik in forum CNC Machine Related Electronics
    Replies: 15
    Last Post: 08-28-2005, 11:22 PM
  5. Joystick Control
    By Sanghera in forum DIY CNC Router Table Machines
    Replies: 11
    Last Post: 06-16-2004, 05:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •