Prototype Arduino USB (atmega32u4) Pendant

More
18 Dec 2017 22:42 - 18 Dec 2017 22:51 #103319 by InMyDarkestHour
Finally have a working prototype USB pendant, seen as the system as a Joystick with Keyboard LEDs. Can be used with hal_input or Frank's Workshop hidcomp. USB stack used was LUFA www.fourwalledcubicle.com/LUFA.php

Coding was rather simple just building upon the Joystick example and adding a LED section to the report descriptor. The LUFA framework makes programming the MCU almost as easy as Arduino.

Refereeing to the photos are 3 white buttons, these will be used as touch off.
Next is a 4 way rotary switch to set jog speed, then a toggle switch to select between continous or incremental (step) jogging, the rotary switch on the right selects the jog size. I have only used 3 of the 4 positions on the rotary switches with the first position being zero. To make hal easier each rotary switch outputs a 2 bit value as an input to a mux.

Jogging is only enabled my the mcu when it receives a signal that axis is in manual mode. Touch off does not have this restriction.

Finally the two left most black buttons are Z+ and Z- and the group of four on the right operate the X & Y axis. The position of the toggle switch decides whether the 6 signals for Continuous or Incremental jogging are sent.....ie Buttons 1 to 6 are for Conitnous jogging and 7 to 12 are for Incremental jogging. The unused set of 6 are always sent as zero. I chose this as to make the hal implementation simpler.

Front panel label and design yet to be decided on. As the box has recess some thin aluminum is a likely candidate. I know it wont win any designs for compactness but it suits my personal needs. With a custom PCB and suitable switches it could be mad much smaller. (As can be seen usb yet to be installed....waiting for parts)

For an idea of size, the panel the buttons and rotary switches are on is approx 162x109 and the box is about 187x134 with the height about 30mm at the front and 50mm or so at the rear.....white buttons are at the rear.

Attachments:
Last edit: 18 Dec 2017 22:51 by InMyDarkestHour.

Please Log in or Create an account to join the conversation.

More
19 Dec 2017 22:02 #103366 by rodw
Nice, it is possible to select manual mode from the pendant with something like this
# --- PENDANT SELECT JOG MODE (Yellow Button)---
net pendant-jog <=  hm2_7i76e.0.7i76.0.0.input-30
net pendant-jog => halui.mode.teleop 

I'll leave it for you to sort out the input pin but in my case, my pendant has a yellow safety button so that the MPG is not enabled unless it is pressed. Pressing it triggers a relay in the control box. With a 1.8m square table to walk around, I have found this very useful!

Please Log in or Create an account to join the conversation.

More
19 Dec 2017 22:17 #103368 by InMyDarkestHour
Cheers Rod
I wanted the pendant disabled unless manual mode was selected.....I have a small garage with wayyyyy to much stuff packed in (tho once I'm fit & back at work the commy V6 can be moved from the garage into the 4Runner where it belongs)......sometimes things end up on top on other things.......As this is done via mcu firmware it's an easy thing to change it......which after some use may happen. Tho with my machine only being a benchtop mill everything should be within arms length.

I have another panel in the works, a hardware version of this wiki.linuxcnc.org/cgi-bin/wiki.pl?Halui, that will save having to use the keyboard for most common actions.
This one will be based on a Teensy++ 2.0.

Please Log in or Create an account to join the conversation.

Time to create page: 0.164 seconds
Powered by Kunena Forum