hi,
I would like to connect a joystick to a KRC4 controller to move the robot in four directions (forward, backward, left, right) using four separate inputs—one for each direction. Can anyone recommend a suitable joystick for this setup, or suggest an alternative method to achieve controlled movement in these four directions based on predefined positions in the code?
joystick connecting with krc4
-
Peterpal -
March 4, 2025 at 10:19 AM -
Thread is Unresolved
-
-
I would like to connect a joystick to a KRC4 controller to move the robot in four directions (forward, backward, left, right) using four separate inputs—one for each direction. Can anyone recommend a suitable joystick for this setup, or suggest an alternative method to achieve controlled movement in these four directions based on predefined positions in the code?
In what mode? What inputs, and what kind of inputs, are you planning to use?
Weirdly enough, an old Atari 2600 joystick would be a simple approach. AdaFruit sells a simple joystick that might work: https://www.adafruit.com/product/480?gQT=1
You want a joystick that uses switches, not analog outputs, based on your description. OTOH, if you have analog inputs, you could use an analog stick and program speed control that way, although that would be more complex.
Having done this before, you're going to have an overshoot issue -- if you're holding the stick and want the robot to keep moving, there's going to be a lag between release and stop. And this gets worse if you program for blended motion as opposed to "stepped" motion. You'll also need to add some sort of motion limiting to ensure someone can't joystick the robot into a collision.
-
the only requirement for connecting joystick is that signals are electrically compatible with inputs. if using digital joystick, voltage and current rating of the contacts must be compatible with digital inputs. basically anything rated for 24VDC and some 10mA or more will be fine.
if using analog joystick, one need to account for type of analog inputs (voltage or current), range etc. and make sure that potentiometers in joystick are suitable for direct connection (voltage, current and power).
when sensors specs are not compatible with inputs, it is still possible to use them by using suitable interface.
-
Thank you for the information, it was helpful.
-
I 100% concur with SkyeFire and panic mode comments.
I looked at this on a Kawasaki where I could use DIO or add an additional analog input board but I decided to go one step further and develop something using arduino's:
- Handset RF transmitter (not wifi) with Chinesium ebay mini analog joysticks and buttons.
- Receiver unit which was connected to Kawasaki via TCPIP.As stated by SkyeFire and panic mode blending all this for smooth transitioning, filtering out 'deadbands' within the analog outputs, ensuring suitable voltages/current, min and max ranges and sometimes when the joystick was released it and centralised, the reading was never stable and the Kawasaki was seeing this and moving even when no joystick was in use so filtering that needs to be considered.
I introduced a psuedo deadmans using 2 buttons as the main motion trigger before reading the analog signals.
In my case, I also had the lag between RF transmittiing and RF receiving, encoding to TCPIP and then decoding in the Kawasaki before actually responding to contend with as well as some handshaking for motion requests too.
So it was quite 'clunky' in operation but conceptionally was working.
Again as earlier stated, you also have to consider what speed you want to jog at and interpolation modes, whether to employ selectable speeds, the robot limits to then factor in to prevent collisions or driving the EOAT into the arm and all the usual stuff a teach pendant jogging operation automatically does.
So just integrating a joystick requires some depth of exactly what you want to achieve as your end goal.I never got to complete it due to this and time (I must pick it up again at some point).
But it was lots of fun and frustration and very time consuming with all the coding not only on the arduino's but also the Kawasaki too.I would have a crack at it as I think you will enjoy the journey and all the fun and frustrations.
If your interested I put it on my youtube channel interfaced with KRoset (Kawasaki OLP):
KRoset (Licensed Version) -3D Printer, Arduino and KRoset funtime.
I would hazard a guess something could be done with KukaSim in a similar way for development if you haven't a live robot to use.Good luck with your journey though......