Introduction: Wireless UGS Pendant
In the past couple years I have been playing with CNC. I have built and modified and rebuilt probably about 4 CNC machines. I started out with a CNC Router made completely out of 3/4" plywood. I was immediately hooked. I eventually redesigned the CNC Router into a full aluminum 80/20 extrusion unit capable of 20"x30". I also have a 3 axis 3W laser CNC capable of about 24"x24". On my first CNC Router, I used a parallel TB6560 3 axis controller with LinuxCNC. I never got around to adding a Pendant before I got the wild hair, to rebuild with an Arduino based controller. On the Parallel board adding a Pendant would have been pretty straight forward, almost plug and play. There are plenty of options out there for it. Not so much for Arduino. There are a few projects out there dealing with it but they all seem to start off strong and never finish. Or at least they never post their finish.
Universal G-Code Sender has, in the options, key mapping for just about every function. My other favorite CNC controller program is LaserWeb4. They are just beginning to map keyboard keys to jog functions but they aren't quite there yet. I came across a program, pretty old, made for the Flight Simulator community. HIDMacros.eu With this program and a USB Keypad or even Keyboard all sorts of macros and shortcuts are available.
I have seen post where they suggest that this could be used for graphics and other programs. Like buttons to quickly choose paint brushes or modes. Pretty much the sky is the limit here.
Step 1: The Pendant
I found on Amazon this wireless keypad. It is pretty basic. They sell them with more or less keys. This one has the standard 10 key with a few extra keys.
Step 2:
Using HIDMacros.eu and the key map feature in Universal GCode Sender. I setup my keys to suit my needs. With the numlock key you can get up to 40 keymaps and macros. I Opted to leave the numlock in the default position and map my keys that way. There are more than enough keys for my purpose. I could have left the general layout for UP, Down, Left, Right, Page Up, Page Down etc. But I prefer the X,Y, Z like you see above. My first labels were just white sticky labels with the icon laserjet printed on it. I did spray clear coat on before applying for extra durability.
Step 3: Fancy
After I got everything the way I liked it. I decided to make it a little fancy. My labels this time I printed with a black background on a color laser printer. I made several copies, 4 sets on one page. The reason I made so many copies is for the next part. So that the white areas stay white and not show through the actual key icons, I turned the page over and lightly at first sprayed with black spray paint. You have to start out really light or the paint bleeds through. Add a couple more light coats until it is fully black. Then, I turned it over and sprayed it with clear coat. Again, really light to start with. It too will discolor the white and bleed through. If you try it you will see why I made so many copies. Then I picked the best looking of the bunch and cut out with a razor knife. If you get white edges where you cut it out you edge it with Sharpie. I just ran the label edge on the Sharpie, instead of trying to draw on it.
To attach, I sprayed (again lightly) with spray adhesive. The solvent in the spray will also mess up the label. Ask me how I know...
This works great for me. I will still look for a hardware solution. I would like to be able to pause my CNC job and adjust position with the keys. That would require a direct parallel passthrough solution. There are a few of those projects out there that look promising. They appear to be abandoned. Maybe I can build on what they started.
12/4/2018 - Update I attached the labels I used. (some stolen from the web) Print it double sided and you will get the black on the back side of the page.
14 Comments
2 years ago
I'm using the Enter button on a different Key Pad for Stop but unable to get it to change in the command. I know it can be done but I'm missing something some place. If anyone had the answer please let me know. Thanks
Question 4 years ago on Introduction
What a great post and idea. I got one of the Amazon keypads, but I'm having trouble getting things to work properly. Could you, or would you explain how you made everything work? Especially, can't get the Z axis increase/decrease to work properly. Have downloaded a macro recorder program, but not sure how to integrate that with the keymap assignments and other non-listed actions in the UGS keymap list.
Looking forward to your help!
Tom
Answer 4 years ago
So sorry I am just now seeing your question. I have been out of the garage for awhile. If you use the HIDMacros.eu program I referenced above the instructions tell you how to reference the keys and map them to corresponding key strokes. There are a couple keys that don't want to play nice, like the "00" key. You have to take into account the double keystroke that is programmed into the key originally. I have not used any other macro recording software. The HIDMacro.eu is not particularly a macro recorder but a keystroke mapper. Think of it that way. Also, you have to tinker with USG key mappings to get them all to match.
Reply 2 years ago
Thanks for writing this up! How did you distinguish between the 00 and 0? I can use either HidMacros or LuaMacros, but haven't figured this part out!
Question 3 years ago on Introduction
So trying to sort out some of your buttons... most are self explanatory, but some I don't get...
What is the button...
... to the right of the Num Lock?
... below Num Lock (with recycle logo)?
... above the Home Key?
... to the left of Set Zero?
Answer 3 years ago
- Right of NumLock "Spindle Toggle"
- Recycle icon is "Soft Reset"
- Above "Home" is Macro "Camera Zero" (I have an Endoscopy Camera with a software crosshair mounted on Z. that I have X Y offsets predefined to set precise zero point.) Much better to set zero with a larger bit (6mm) Great for lining up after bit change.
- Next to that is Macro "Zero Probe" (Again switch is temp placed on surface and bit is slowly lowered until switch is activated. Z is zeroed with offset.)
Reply 3 years ago
I couldn't sort out how to add macro's to hotkeys...
I looked for a way to turn the tool on and off but didn't think to search for Spindle... (/headdesk)
Didn't think about Soft Reset... that's probably a good one to have...
I have a Touch Probe and macro's that go with it, If I can sort out how to run a macro...
Disclaimer: I'm on a Raspberry Pi... I was able to do some voodoo with remapping keys to get some non-standard keys to work.
Reply 3 years ago
Once you create Macros and save them, they show up in the keymap list in the macros section.
Question 4 years ago on Step 3
Hi. I've a similar question to TomD264 - I'm doing a very similar project using a stream-deck, there are some actions which don't appear in the UGS keymapper - for example jogging diagonally. Have you been able to map this as a true diagonal movement (as opposed to x and then y).
Many thanks Robert.
Answer 3 years ago
I don't think that is possible through UGS without a macro. You can jog to location with you mouse by right clicking a location and selecting goto (not sure of the exact wording) I don't have a prob stair stepping. Plus I mostly just jog to set zero point.
Answer 4 years ago
No, It never has been a problem to X over then Y over. I don't think it is possible. Even other Arduino GRBL programs separate the directions. For large moves, I generally kill the power and move by hand. I have moved my homing position closer to my origin so there usually isn't a need to do large moves.
3 years ago
thanks for sharing idea
Question 4 years ago on Step 2
hello, thank you for this usefull tutorial.
Would you please share also the labels you made ?
Thanks :-)
Answer 4 years ago
Thanks for the suggestion. Done.