Difference between revisions of "Plasma CNC"
Toby Catlin (talk | contribs) m (→12-09-2020) |
Toby Catlin (talk | contribs) m (→20-09-2020) |
||
Line 30: | Line 30: | ||
== Progress == | == Progress == | ||
− | === 20-09-2020 === | + | === 20-09-2020 GRBL works === |
The simple sketch showed it was possible to drive the HSS86 from an Arduino so it must be possible to get GRBL working if it can be configured to output the correct signals. | The simple sketch showed it was possible to drive the HSS86 from an Arduino so it must be possible to get GRBL working if it can be configured to output the correct signals. | ||
The default is for the output pin to be HIGH when on. Due to the wiring of the HSS86 we now need to pull the pin LOW to indicate on. Therefore the output signals for GRBL also need to be inverted so that LOW is on rather than high. | The default is for the output pin to be HIGH when on. Due to the wiring of the HSS86 we now need to pull the pin LOW to indicate on. Therefore the output signals for GRBL also need to be inverted so that LOW is on rather than high. |
Revision as of 09:03, 22 September 2020
Contents
Summary
Build a large sized XY CNC table capable of using a plasma torch to accurately cut metal.
- Project lead: Toby
- Team:
- Location: Metalspace
- Status: Design phase
Help wanted: electronics, cad, frame
Equipment
- 2x Y-axis 2m Rollon ELM65 enclosed linear rail
- 1x X-axis Rollon ROBOT130 X gantry
- 2x Servo motors 86HSE8N-BC38
- 2x HSS86 servo motor drivers
- 2x planetary gearboxes
- A crappy steel frame
The Rollon rails are very high quality industrial components that are sealed to dust. The Y axis rails use toothed belts inside the rail and the X axis used ball screws and twin linear rails. The motors are large high powered units with encoders that measure the actual movement and sends it back to the driver. This closed loop setup means that the driver can compensate for any missed step allowing for finer microstepping and increased reliability.
Docs
Software
Looking at the HSS86 datasheet it appear to work just like standard polou steppers that take a ENABLE, DIR & STEP signal input. Therefore a GRBL based controller should be ideal for driving the CNC.
I have successfully driven one of the motors using a basic arduino sketch to send pulse and dir signals. Setting the signals high +5 volts with a common ground did not work. The datasheet for HSS86 shows a common 5v with a on signal represented as pin output low. This requirement means that GRBL is not working and need to configure GRBL to invert the high/low signals.
Progress
20-09-2020 GRBL works
The simple sketch showed it was possible to drive the HSS86 from an Arduino so it must be possible to get GRBL working if it can be configured to output the correct signals. The default is for the output pin to be HIGH when on. Due to the wiring of the HSS86 we now need to pull the pin LOW to indicate on. Therefore the output signals for GRBL also need to be inverted so that LOW is on rather than high.
GBBL has a numbered config array that is stored on flash memory on the Arduino. The docs indicates that $2 controls "Step Pulse Configuration" and will invert any of the axis according to a bit mask.
$2=7 will invert all the axis
Once I had set this value and fixed a wiring mistake the X gantry moved using GRBL by sending Gcode over the serial monitor. It also followed the acceleration curves set by GRBL and was smoother than the simple sketch.
WOOT WOOT - this means all of the required functionality will work via GRBL
I also spent some time dialing in the steps per mm setting ($100) so that it would move the correct amount according to the steps sent. Ideally I would calculate this but I don't know the rollon specs or the planetary gearbox specs. Using a round guess I got it close with $100=300 but will need a dial indicator to imporve further.
12-09-2020 - Simple test sketch
The datasheet for the HSS86 shows that all the +5v pins should be connected and the signal pins pulled low.
This makes no sense especially as the previous owner had also wired ground together but seemed to be worth trying. I had some very useful discussion on slack and was suggested that GRBL was not good to test with as its pretty complicated with lots to go wrong. I switched to a much simpler sketch that essentially just set the output pins. I used the same pinouts that GRBL uses for the X axis (2,5,8).
const int stepPin = 2; //white const int dirPin = 5; //black const int enPin = 8; //red char data; float step_delay_time = 500; void setup() { pinMode(stepPin, OUTPUT); pinMode(dirPin, OUTPUT); pinMode(enPin, OUTPUT); digitalWrite(enPin, HIGH); Serial.begin(115200); } void loop() { if (Serial.available() > 0) // we give commands through serial monitor { data = Serial.read(); //command from monitor if (data == 'a') //stepper 1 right { digitalWrite(enPin, HIGH); digitalWrite(dirPin, HIGH); //motor will rotate write for (int x = 0; x < 500; x++) { digitalWrite(stepPin, LOW); delayMicroseconds(step_delay_time); digitalWrite(stepPin, HIGH); delayMicroseconds(step_delay_time); Serial.println(x); if (Serial.read() == 'x') //to stop { digitalWrite(enPin, HIGH); Serial.print("stop"); break; } } } }
Much to my surprise and pleasure this worked.
09-09-2020 - Test drive #1
The plan is to feed the HSS86 driver with the same signals as standard stepper motors. This is to send +5v to the STEP, DIR and ENABLE pins and have all the grounds connected together. I GRBL to send the pulses with universal gcode sender. After a few hours of fiddling nothing worked.