PDA

View Full Version : Paging doctor CNC. ArduinoCNC and grbl help



DFBrews
02-09-2021, 19:17
Grant H
not a llama
and all other cnc and arduino speaking persons I?m having life issues and need some help.

I have a long term goal of building a portable 24? cut area cnc plasma cutter that can be stored on a wall when not needed.

Figured the best way to start is to build a plotter/drawing machine.
I am vaguely familiar with arduino able to grab code snippets from GitHub and piece them together to make things happen like WiFi fermentation and gardening controllers cascading led under glow lights for my tool box etc. simple stuff.

I stripped an old 3d printer for components and Built a plotter with a servo controlled z axis pen for lift and drop
I have x and y figured out steps calibrated limit switch?s etc. the home cycle works soft limits are good.

I had a hell of a time getting the servo to even move and after a couple weeks of fiddling around at lunch and a couple blown voltage regulators today I was finally able to get it to go up and down. The problem is that it is backwards down g code makes it go up. Using z+ end stop on the arduino shield as my pwm servo control

I am using grbl-plotter because is has a great GUI that will be useful in the future because it has a built in g code generator for a imple shapes and txt with out having to go to Inkscape or similar.

The creator seems to only offer a .hex file so I am unable to get into the spindle control file and see if there is something to comment or uncomment to reverse it.

I also tried mi grbl but my stepper motors hated it and would make a horrible grinding sound when moving even with microstepping jumpers set up and my drivers amperage calibrated.

I am not familiar with grbl enough to start from base programming and get the servo set up to work.

so if anyone is familiar with grbl and is willing to make a servo go up and down with m3 and m5 commands i needs some helps

Grant H.
02-09-2021, 19:35
Since you called it a Servo, and then talked about steppers later, I assume you are actually using a true servo for your Z?

Can you share make/model of the servo? Does it have a built in encoder?
Details of wiring from Arduino to servo?

Grant H.
02-09-2021, 19:55
I haven't tried to drive a servo from an Arduino, but the one thing that I am seeing routinely is folks running into issues with multiple GRBL libraries causing issues with the PWM servo control.

DFBrews
02-09-2021, 20:02
Since you called it a Servo, and then talked about steppers later, I assume you are actually using a true servo for your Z?

Can you share make/model of the servo? Does it have a built in encoder?
Details of wiring from Arduino to servo?

It’s an actual 180 degree servo made For r/c stuff
I have a length of gt2 timing belt and a couple idlers that move the pen a couple mm up and down
It’s a Amazon special sg90 form factor ybee brand 10 for 17 dollars i wouldn’t imagine it has an encoder.
Servo is wired 5 volt and ground as normal and the signal is into z stop + which i believe translates to digital pin 11. It may be D12 because I’m using grbl 1.1 and a version 3 cnc shield.

i purged grbl libraries each time after I found people having issues
This is the project i followed and printed all the components he laid out
https://www.diymachines.co.uk/arduino-cnc-drawing-machine

And this is the creator of the hex file which I install on the uno with x loader

https://github.com/svenhb/GRBL-Plotter

DFBrews
02-10-2021, 06:38
The creator on github got back to me already it was a simple task of flipping my m3 command pulse duration s200 and s800

I will get a video of the machine working and post it later

Grant H.
02-10-2021, 09:57
The creator on github got back to me already it was a simple task of flipping my m3 command pulse duration s200 and s800

I will get a video of the machine working and post it later

Nice. Glad to hear it got sorted out.

Erni
02-10-2021, 10:06
Following with interest but lack of time.

Not_A_Llama
02-10-2021, 10:28
You get the direction fixed, too? Would be an easy software fix if you wanted to post your config.

DFBrews
02-11-2021, 15:22
Llama I don’t have any way to get the config.h because I started with a hex file. I was able to get the direction fixed and working the problem I have now is the m3 s200 command when the g code is done doesn’t raise the pen back up so I have to manually jog it up. Trying to find a fix currently

Here is a video of it working



https://youtu.be/8aqiJAbGjFQ

Erni
02-11-2021, 18:32
So it looks like you need the hex file adopted for a servo which I assume you have. Then on his page it says to configure the setup with $$ when you are connected to the printer. In there are the settings. Did you get that part done?

DFBrews
02-11-2021, 21:19
So it looks like you need the hex file adopted for a servo which I assume you have. Then on his page it says to configure the setup with $$ when you are connected to the printer. In there are the settings. Did you get that part done?

Yup I have tweaked all of $$ to my specific machine
size feed rate steps etc.
The area I am dealing with is going be solved in the spindle.h file area
I don’t enough to start with base grbl and make my servo go up and down.


It might happen soon though