Arduino, GRBL, Experiences So Far

User avatar
TReischl
Vectric Wizard
Posts: 4567
Joined: Thu Jan 18, 2007 6:04 pm
Model of CNC Machine: 8020 48X36X7 RP 2022 UCCNC Screenset
Location: Leland NC

Re: Arduino, GRBL, Experiences So Far

Post by TReischl »

Hey, that is a picture of my desk a week or so ago!!!

I have been sidetracked since getting the software/electronics working. A sidewalk of pavers, couple of adirondack chairs, etc. Good thing too, because I was waffling all over the place deciding what machine I wanted to build. Still waffling.
"If you see a good fight, get in it." Dr. Vernon Johns

BillK
Vectric Wizard
Posts: 594
Joined: Wed Mar 27, 2013 4:16 pm
Model of CNC Machine: CNC Shark Pro Plus
Contact:

Re: Arduino, GRBL, Experiences So Far

Post by BillK »

Yes, been busy too waiting to get this together. Bought a birch countertop from HD for the kitchen island that was long enough but not quite wide enough. So I added birch to the sides to handle the width issue, then decided to add cherry breadboard ends with a little carving on them to the ends. Also replaced a vanity top in a bathroom with sink and faucet, oh and how about a new floor since you already put in a new toilet, and lets change blinds and refinish the trim and add a new light fixture while your at it, and can you make a new frame for that mirror, lol. Very motivated to finish all that so I could have some play time with this over the last two days.

Like Ted says there is no one way to do this, some of the info on youtube and that you can google is outdated or incomplete if you really want to know the why of things. So you dive in.

If you’re thinking of swimming in this pool, you can buy the components that Ted laid out, I did minus one stepper motor. If you don’t normally deal with small wiring like this, get a nice pair of reading glasses, this is small stuff, your arms won’t be long enough. I bought 3 or 4 other things because I didn’t have them. New wire stripper (my old one is probably 35 years old), a box of 22 ga wire, 6 different colors (you’ll wish you had eight colors), a duPont connector kit with crimping tool, worth its weight for sure. They are relatively inexpensive and readily available. Learn how to solder correctly, and buy some Kester liquid solder flux. The stuff is magical enough to actually make me like soldering, lol.

I did my wiring different from Ted. Ted used what some would call “anode” style of hooking up the control circuit, I did “cathode’, both are acceptable and work. Basically it helps when you do the wiring to look at the project from the motor controllers perspective since that is where most of the connections are going to be. You have two circuits, the power circuit and the control circuit. You should follow the motor wiring for your A and B legs. My motors came with duPont female plugs, so I just made up male plugs on one end and wired the four wires into the controllers. You can bring power directly from your power supply for each controller, or you can hook them up in parallel like I did, doesn’t matter.

You can easily get confused if you watch too many videos on how Arduino’s work and how to program them. For this you really don’t need to know that, but it is nice to have that knowledge. You may want to make a fancy LED light show one day. This is more cookbook. See above where Ted answers my question about which pins to use on the Arduino, its really built in that way into the grbl code, so you have to use them. I connected my Arduino pulse and directions to the positive sides on the controllers and ran the negative back to ground on the arduino. Again doesn’t matter, but pick one, anode or cathode and do the ones you are doing the same way. Find the user guide for the controllers and you’ll learn about them.

There are a lot of versions of GRBL, once you find the download page, read it all the way to the end, there is a version for the Arduino Mega, I used that one. The one thing I found was you should know it is simple to change the settings for things like steps per mm, max distance, etc. in the Arduino IDE program. Its like old time programing to me. $10=1 enter, its changed, lol. Get the reference sheet to know what you are going to need. For some reason, they originally load all the variables with all out of range numbers, you will have to load them with reasonable values to get this to work. After you build your machine, you fine tune all that to make the machine run correctly and precisely.

Then there is UGS, universal Gcode sender. It does work OK for a free download, graphics are OK and the rest. I’ve seen worse and better that you have to pay for.

How does it run? Great! How do I know the motor are turning the right direction and amount? I don’t, you can adjust that later. I ran a quick V-carve, 5 minutes, no smoke, no zaps, no errors. Then I ran a 15 minute 3D carve, nothing really heats up or anything, just the sound of the power supply fan and the motors turning. Oh and yes on your Vectric software there is a post processor for both inch and metric GRBL.

I won’t tell you the mistakes I made, only the stuff that worked. Most of my confusion surrounded not knowing the software well, so it was easily overcome. I’ve done a lot of household wiring over the years, everything, but not too much of this, so I’m happy with the result here and now to dream more about the new machine I’ll build.
BillK
https://www.facebook.com/CarvingsByKurtz

User avatar
TReischl
Vectric Wizard
Posts: 4567
Joined: Thu Jan 18, 2007 6:04 pm
Model of CNC Machine: 8020 48X36X7 RP 2022 UCCNC Screenset
Location: Leland NC

Re: Arduino, GRBL, Experiences So Far

Post by TReischl »

BillK wrote:
Wed Mar 24, 2021 8:41 pm
....
There are a lot of versions of GRBL, once you find the download page, read it all the way to the end, there is a version for the Arduino Mega, I used that one. The one thing I found was you should know it is simple to change the settings for things like steps per mm, max distance, etc. in the Arduino IDE program. Its like old time programing to me. $10=1 enter, its changed, lol. Get the reference sheet to know what you are going to need. For some reason, they originally load all the variables with all out of range numbers, you will have to load them with reasonable values to get this to work. After you build your machine, you fine tune all that to make the machine run correctly and precisely.
......
I think you may have meant UGS (Universal G Code Sender) not Arduino IDE though. The only thing I did in the Arduino IDE was load UGS onto the board.

The important thing about wiring one of these up, as Bill mentioned, is picking a method and stick with it, either anode or cathode. There is one video on line that can really lead you astray, the guy claims that he had to shift the pin assignments by 1 to get it to work. What I think he really needed to do was get a pair of glasses so he could read those itty bitty numbers on the board correctly, LOL.

BTW, figuring these things out is really handy for other stuff around the shop. I added a power feed to my manual mill using a stepper and arduino board. That took a bit of programming in the Arduino IDE, but not anything horrific. If you need to do something similar let me know and I will share my code, no problem. Another project is a hand engraver pump. They are really REALLY pricey, but are easy enough to build if you have a lathe. I use the stepper and arduino to control the pump speed.

I think the crazy settings that come with UGS are probably for 3D printers, maybe not. But yep, they are way out of whack. In UGS there is a panel that will come up showing all the settings. Messing around with them taught me a lot about how those motors work and what they can do.
"If you see a good fight, get in it." Dr. Vernon Johns

BillK
Vectric Wizard
Posts: 594
Joined: Wed Mar 27, 2013 4:16 pm
Model of CNC Machine: CNC Shark Pro Plus
Contact:

Re: Arduino, GRBL, Experiences So Far

Post by BillK »

Hi Ted,

Actually it was Arduino IDE that I used before I realized I could edit in UGS. In IDE under tools, serial monitor, type $$ and the list comes up and you can reset the variables there. Maybe the last time I do it there now that I know UGS can also be used.
BillK
https://www.facebook.com/CarvingsByKurtz

User avatar
TReischl
Vectric Wizard
Posts: 4567
Joined: Thu Jan 18, 2007 6:04 pm
Model of CNC Machine: 8020 48X36X7 RP 2022 UCCNC Screenset
Location: Leland NC

Re: Arduino, GRBL, Experiences So Far

Post by TReischl »

Ahhhh, I never bothered to run it from the IDE, just loaded it onto the board. Interesting. . . .learn something every day.
"If you see a good fight, get in it." Dr. Vernon Johns

Post Reply