My GRBL pendant

Share your Shapeoko created projects!
bluecamel
Posts: 84
Joined: Fri Feb 07, 2014 5:27 pm

My GRBL pendant

Post by bluecamel » Mon Apr 14, 2014 4:32 am

Howdy folks. I'm working on making a pendant/controller for the Shapeoko. My ultimate goal is to have a controller box that can be used without a computer attached, including:
  1. joystick to control X and Y axes with a button to toggle to Z axis control (gcode will be sent to the Shapeoko arduino/gshield from another arduino over serial)
  2. rotary encoder to change step size/speed (maybe a display to show the current step size)
  3. E-stop
  4. GRBL reset
  5. GRBL hold
  6. GRBL start/resume
  7. switch for arduino/gshield power
  8. switch for spindle power (DW660)
  9. switch for vacuum power
  10. a nice wooden box to hold it all (made on the Shapeoko, of course)
I have a lot to learn to pull this off and it's going to take a while, so I thought I'd share the journey like a build log.

I've decided to make it using all/mostly arcade controls. I'm not a huge gamer but I have lots of friends who are and I've grown to love the aesthetic.

I'm going to make the case last, since I still need to figure out all of the electronic bits and the placement of all the controls. So, I was going to start with a plastic container with the controls mounted on the lid, but what I had handy was the cardboard box the joystick was delivered in. I can now say that I've drilled holes in cardboard. Believe me, I'm laughing at the ridiculousness of the prototype as much as you are ;)

Here it is in all its glory: http://imgur.com/a/PNXy0/all

I've attached an Arduino sketch for capturing the joystick input. I'm having trouble doing the same for the rotary encoder and fear that I borked it while trying to solder wires to it. Hopefully I'll figure that out soon and move on to getting arduino to arduino serial communication worked out.
Attachments
Joystick.txt
(1.43 KiB) Downloaded 743 times
Shapeoko 2 ..::.. DW660 with 3d printed mounts, HDPE version of IC's dust shoe

crazeegeek
Posts: 118
Joined: Thu Mar 13, 2014 9:37 pm

Re: My GRBL pendant

Post by crazeegeek » Mon Apr 14, 2014 6:31 am

I think using the cardboard box is resourceful and do not find it ridiculous at all. As long as it works and gets you to the end goal, then stick with it.

bluecamel
Posts: 84
Joined: Fri Feb 07, 2014 5:27 pm

Re: My GRBL pendant

Post by bluecamel » Mon Apr 14, 2014 5:22 pm

crazeegeek wrote:I think using the cardboard box is resourceful and do not find it ridiculous at all. As long as it works and gets you to the end goal, then stick with it.
Thanks! I know it will help me figure out all of the bits for a better final version. I still can't stop laughing when I look at it though.
Shapeoko 2 ..::.. DW660 with 3d printed mounts, HDPE version of IC's dust shoe

bluecamel
Posts: 84
Joined: Fri Feb 07, 2014 5:27 pm

Re: My GRBL pendant

Post by bluecamel » Fri Apr 18, 2014 4:13 am

I'm closer to a layout that I like: http://i.imgur.com/zmwVxoM.jpg

I'll have more space between the controls and hopefully etched labels, and a couple of different controls when I get them.

I also got the rotary encoder figured out, mostly. It occasionally misses steps but I suspect it's something in my code. I'll keep working on that.

I also got the arduino sending commands to another arduino over serial. It was much easier than I expected. I need to put some timing control in or it'll probably smash my machine up.

I've attached my two test scripts. Next, I'll get the Nokia screen figured out. At least, I want it to display the current step size/speed.

Sorry if this is boring for you guys. I know most of you are far beyond this stuff, but I figure another newbie can learn from this in the future.
Attachments
Encoder.txt
(738 Bytes) Downloaded 452 times
Joystick_Serial.txt
(1.93 KiB) Downloaded 501 times
Shapeoko 2 ..::.. DW660 with 3d printed mounts, HDPE version of IC's dust shoe

awesomename
Posts: 40
Joined: Tue Mar 04, 2014 11:49 pm

Re: My GRBL pendant

Post by awesomename » Fri Apr 18, 2014 5:17 am

bluecamel wrote:I'm closer to a layout that I like: http://i.imgur.com/zmwVxoM.jpg

I'll have more space between the controls and hopefully etched labels, and a couple of different controls when I get them.

I also got the rotary encoder figured out, mostly. It occasionally misses steps but I suspect it's something in my code. I'll keep working on that.

I also got the arduino sending commands to another arduino over serial. It was much easier than I expected. I need to put some timing control in or it'll probably smash my machine up.

I've attached my two test scripts. Next, I'll get the Nokia screen figured out. At least, I want it to display the current step size/speed.

Sorry if this is boring for you guys. I know most of you are far beyond this stuff, but I figure another newbie can learn from this in the future.

How do you like the amazon fire?

bluecamel
Posts: 84
Joined: Fri Feb 07, 2014 5:27 pm

Re: My GRBL pendant

Post by bluecamel » Fri Apr 18, 2014 3:20 pm

awesomename wrote:
bluecamel wrote:How do you like the amazon fire?
I really like it. It's fast. There are, of course, some silly things (like searching for shows that I own in SD and I have to go through menus to get around it trying to sell me the HD version, or worse, the lack of Amazon Cloud Player). But it's far better than any other streaming device I've used.
Shapeoko 2 ..::.. DW660 with 3d printed mounts, HDPE version of IC's dust shoe

jjubenv
Posts: 46
Joined: Thu Dec 12, 2013 6:42 pm
Location: Ontario, Canada

Re: My GRBL pendant

Post by jjubenv » Thu May 01, 2014 2:41 pm

How are you coming along with this? This is really cool. Are you planning a pass-thru of sorts to allow a PC connection to transmit jobs? I'm just starting to design an implementation of some extra controls like e-stop and spindle power.

bluecamel
Posts: 84
Joined: Fri Feb 07, 2014 5:27 pm

Re: My GRBL pendant

Post by bluecamel » Fri May 02, 2014 1:09 am

jjubenv wrote:How are you coming along with this? This is really cool. Are you planning a pass-thru of sorts to allow a PC connection to transmit jobs? I'm just starting to design an implementation of some extra controls like e-stop and spindle power.
Sorry I haven't updated for a while. I was pretty sure everyone else here was way beyond me on this stuff so I was waiting until I had more to show. It's going pretty well, but slow. I've had a lot of things to figure out and they're slowly coming together, but I haven't had as much time to work on it as I'd like.

Here's a version of the panel I cut out this weekend: http://imgur.com/a/G04AX

I've had to make the controls a little tighter than my initial blue-sky design since I'm hitting the limits of my work area and adjusting things on the machine. I've also had issues with the Nokia screens from Sparkfun. 3 out of 4 have been DOA but Sparkfun has been great to deal with on that and I finally have one that works well. I've also been getting a couple of relays going (https://www.sparkfun.com/products/11042) for powering the spindle and gshield. I've decided to hold off on the vacuum power for now, as I'm nowhere near settled on a vacuum solution yet. Dealing with high voltage scares the hell out of me so I'm going really slow and careful on that.

As for a passthrough, I'm hoping so. I've switched to an Arduino Micro (same chip as Leonardo) since it gives me an extra hardware serial port and USB host if I (or others) decide to use it. Right now, my goal is just to be able to send basic gcode to control things with the joystick and axis toggle/speed controls. I'm 98% sure I can do that and still plug the Arduino with gshield into the computer when needed, but ideally it would be a single connection and the secondary microcontroller will pass everything through from the controller. I somehow doubt that will be easy though, as I inevitably run into things I'm not familiar with. Figuring out interrupt debouncing was one of those that took me a while, for example ;)

I'm hoping to bring all of the disparate pieces together this weekend and actually start controlling the machine. I'll definitely update and share my code and box layout when I have it settled a little more.
Shapeoko 2 ..::.. DW660 with 3d printed mounts, HDPE version of IC's dust shoe

bluecamel
Posts: 84
Joined: Fri Feb 07, 2014 5:27 pm

Re: My GRBL pendant

Post by bluecamel » Fri May 02, 2014 1:17 am

Oh, and for anyone following. The rotary encoder issues were solved by using this guy's library (everything else missed steps) https://github.com/medecau/QuadEncoder

I finally got my shipment of 1/8 birch stock this evening so things should be coming closer to a conclusion this weekend.
Shapeoko 2 ..::.. DW660 with 3d printed mounts, HDPE version of IC's dust shoe

bluecamel
Posts: 84
Joined: Fri Feb 07, 2014 5:27 pm

Re: My GRBL pendant

Post by bluecamel » Fri May 02, 2014 1:29 am

Oh, by the way, I'm sure my button configuration is questionable. I'm still not sure and I'm the type of person to leave far too many options. For now, it's this:

green = GRBL resume
yellow = GRBL pause
white = GRBL reset
blue = Arduino reset
E-stop = true stop, normally open power to gshield, closed when pushed, fuck you GRBL

I think that's absurd for now, but I'm sick of unplugging and plugging in the machine when shit goes sour. I'm sure that this will fix most of that.
Shapeoko 2 ..::.. DW660 with 3d printed mounts, HDPE version of IC's dust shoe

Post Reply