I am continuing to plan the functionality of a front control panel for my CNC build, and had wanted to explore the ability to add a joystick to control axis movements.
I have been successful, and currently have a 3 axis joystick which can control the movement of the X, Y, and Z axes in both positive and negative directions, with the ability to select incremental or rapid movements.
For those who want a little detail, here is a brief summary of how it works:
The joystick is analog, and uses 3 potentiometers which output different voltages depending on the joystick position.
This information is input into the Arduino which reads the voltages.
I wrote a simple program which takes the analog input and assigns it to one of six digital outputs.
When triggered by the joystick movement, these outputs go HIGH, and send a 5VDC signal to one of 6 Masso G3 inputs.
The Masso inputs are assigned to one of the 3 axes and one of the two directions for a total of six uniquely assigned actions.
The button on top of the joystick is a momentary switch which controls a 5VDC signal to a 7th Masso input. This input is assigned to the Jog/Rapid function, and used to turn it on and off.
I have made a short video showing it functioning. See link below:
My next goal is to PWM outputs to see if I can get the movement of the joystick to control/change the velocity of the axis’ movement - small deflection of joystick=slow speed, speed increases as the joystick is further extended.
I already purchased and installed a 3rd party pendant. I wanted extra reach so I have it connected first to a terminal block at the front of my table. I also got one with a safety button so I don’t accidently activate it.
The 3 axis joystick was a personal goal to test its functionality, as well as my skills, as I had never owned or programed an Arduino before a few days ago .
I certainly like the pendant, especially for the set up work I am still doing, but I think having the joystick at the front of the table will also have benefits for quick moves that are not critical. I like my added touch screen, which is like the Elite Touch as far as use, but I don’t like having to use the small on screen jog arrows, especially when I want a closer eye on what/where the axis movements are (and that is with my monitor on a swivel arm right at my table - like the Elites but a bit more flexible).
I can see the benefits of being able to move in multiple dimensions like the joypad allowed on the BB controller, I do miss that since moving to the Masso. Have you looked into developing it using the joypad with USB/bluetooth via a Raspberry pi or something similar? I helped my kids develop something similar for a robot they were working on at school, was actually pretty easy with all the available libraries.
Agreed on the pendant vs the on screen controls for precise jogging during setup and adjustment, principal use case for me with the pendant.
I have not looked into the incorporation of a joypad. I set up a RPi along time ago to handle some of my home automation, but haven’t touched one since - which I suppose is a good thin in this instance . I wanted a fixed joystick though for my planned control panel, and not another loose UI like the pendant.
I am currently experimenting with the USB interface for a macro keypad. It works well, and with clear double layer keys I have some ease and efficiency - especially having assigned F11 and F12 keys for the overrides, and the knob for increase/decrease(+/-). Some combination of buttons will make it into my final panel design.
The one drawback of the current joystick is that it takes up 7 valuable inputs on the Masso. The 24 get used up quickly when you add an ATC with associated components, dry run laser, auto dust shoe, … . Maybe a USB/Bluetooth option may be worth persuing for that reason alone.
I’m at least a year behind you on the add on parts like an ATC but I see the potential struggle with the number of inputs. You could develop a way to use the pendant inputs but you’d be limited to one axis at a time for jog and you’d have to develop a way to disconnect the pendant selector switches for axis and resolution when using the joystick.
I think once I decide how I like to work, and what my typical projects, materials, and workflows will be, I will know better what UIs I will want to use, and where to place them.
I have learned a huge amount building all aspects of my ATC machine, and am really just stating on the machining side of things - I am looking forward to it.
I am working on aluminum now, and trying to develop good recipes for various toolpaths and the collection of end mills I have purchased. I finished some facing tests that turned out well - good test of successful(or not) tramming was . I have to remind myself that the Onefinity does not have the rigidity equal to a heavier cast machines with linear rails and guides, but I just can’t help trying to use it like it was, and keep expectations high but (somewhat?) realistic .
Looks great, the only thing that concerns me is input lag or perhaps more apt, signal buffering. In the video it looks like input lag is minimal, there might be some command buffering going on and the axis movement of the machine stops a moment after you stop the input on the controller. Is it possible to improve the response time here?
I agree completely with your observations and concerns. Given the simplicity of the system, I am not sure where or how the response time can be improved. It may be a limitation of the electronic components in the Masso controller, and how the signals are processed. The only variable I think I can control is the Arduino, and the program I have written is minimal, and I am not familiar enough with its hardware and software/chip to know if ‘lag’ can be improved.
I recently installed a 3rd party pendant, and its control of the axes seems a bit ‘snappier’ but there is still the continuation of their movement after the input is given. Although much improved with the latest V5.03 firmware, it still is taking a bit of getting used to as I have never used one (or a gamepad) to control axis movement before.
One other drawback, and I believe it is a limitation of the Masso hardware/software (I have asked and am hoping for a response on their forum), is the inability to move more than one axis at a time.
In the end for my workflow, I think my touchscreen, manual switches, pendant, and macro USB keypad programmed keys, will give the UI functionality I anticipate using.
in your video, it seems that in slow mode it reacts promptly and that it’s only in rapid mode that it slowly accelerates and decelerates. Is that true?
It could be a feature of the Masso controller to avoid too hard motion changes to save the hardware for lifetime. Are there jogging parameters somewhere in the user interface?
You could check this by leaving out the arduino and the joystick and just connecting switches to the Masso input ports this way. You would need no additional components. This way you could see if the delay comes from the Arduino or not.
The observed accelerations/decelerations are during rapids yes - similar with the pendant.
I certainly can connect a momentary switch to provide a VDC+ to one of the axis inputs as a test. This would be the simplest way of adding a joystick, and there are inexpensive 4/8 way ‘arcade’ type controllers that use such mechanical switches. Unfortunately these are all 2 axis, and I wanted 3 axis control and a convenient way of toggling between jog and rapid mode, which is why I ordered the joystick model I did - it has a momentary button on top (but also a way to fine tune the pots).