DIY Pendant (sort of)

This is where you talk about Plugins. How they are made and how they work, show examples.

DIY Pendant (sort of)

Postby matt_b » Sun Sep 19, 2021 11:18 pm

Hi,

I recently decided that I wanted a wired pendant for my CNC router (I prefer wired to wireless), but did not have enough spare IO left on my AXBB to wire one up directly. Having had bad experiences with various USB HID type pendants in the past (and not having been able to get any support when they've had issues), I decided to roll my own - That way, any problems would be entirely my own fault!

Rather than design and build the physical pendant myself, I decided to use a fairly common Chinese pendant (you've probably seen one at some point) which just contains the axis/step select switches, an E-Stop and encoder wheel - No intelligence, just a simple multi-core cable interface. This is connected to an Arduino Nano which keeps track of encoder wheel movements and polls the E-Stop and axis/step selection switches. The interface with UCCNC is achieved via the Nano's serial-over-USB interface and a custom UCCNC plugin.

Full details can be found on GitHub (https://github.com/mattbucknall/mpg-nano). All Arduino firmware and plugin source code is published under the MIT license. I'm posting this message here just in case the project information is of use to anyone. The plugin source code is a bit scruffy, because I don't really do C#, but it works well enough.

The testing I have done with my CNC router has gone well so far. If the encoder wheel is turned really fast (deliberately stupidly fast), the Arduino occasionally drops a couple of counts, but I've not found this to be of any consequence in practice - I use UCCNC's readouts to keep track of where I'm moving the machine, not the graduations on the encoder wheel. In any case, there is never a need to turn the wheel at such a silly speed during normal use.

Matt.
matt_b
 
Posts: 3
Joined: Thu Jun 03, 2021 8:36 pm

Re: DIY Pendant (sort of)

Postby mickenordin » Mon Mar 07, 2022 9:42 pm

Hi Matt, Thank for sharing your code for the mpg plugin.
I've tested your code for the plugin but build for a Arduino Nano Every and it get an "OK" status in UCCNC, but I have one problem with the delta action.
When the plugin request the mpg status by sending an "S" the mpg sends, for example, [S000509] (X-axis,10x step,delta=5,CW direction) but the UCCNC start moving much more than the 50 micron it's supposed to.
Turning encoder 5 steps the other direction sends [S3FFB09] (X-axis,10x step,delta=5,CCW direction), the same problem with moving more than 50 micron.
Question: Is this the correct HEX code to be sent with this conditions?
Or are there other parameters in UCCNC I've must setup to get this working?
I don't have any debugger yet to analyze this.
Br,
/Micke
mickenordin
 
Posts: 1
Joined: Tue May 05, 2020 1:59 pm


Return to Plugins

Who is online

Users browsing this forum: No registered users and 9 guests