Tagged: needle cutter; ESC; PWM
February 10, 2019 at 4:20 pm #88535
Hey, i have just finished building my MPCNC, and im looking to attach a foam cutter needle with a brush less motor and ESC Controlling it, does anybody know if theres a way to control the speed of the ESC using the ramps board output and gcode. instead of me attaching a servo tester inline and manually controlling the speed?
I know the ESC takes pulses, i thought about using the servo outputs, just unsure if this has been done somehow.
CheersFebruary 11, 2019 at 1:33 am #88604
Hi, I’m working on something that will do that in he future : a Foam Cutter Speed Controller.
It takes 2 inputs : a servo tester’s output, and rotation sensor (inductive sensor for now), and uses a PID loop to ensure a “constant” — that is once I’ve found the correct PID parameters– running speed (like V1PID).
I plan on adding a third input (switched from the Servo tester) switch so that it can take the same outputs as done with the M3/M5 S (or O) parameters from the RAMPS, but I’ll need to see how to configure it.
I’ll probably have to check all configurations threads which concern the LASER/Spindle commands. One small hurdle is I see the LASER/Spindle option is conditional on not using servos, whereas I use one for ZHoming/Bed Levelling
There should be 3 modes at the end : pure Servo tester (or pot when I get one), PID from tester/pot, and command from RAMPS.August 3, 2019 at 9:05 pm #108336
This maybe helpful. I wrote this up after I was able to control my ESC:
My needle cutter: https://youtu.be/iOU6zelXMo8 has worked great for me since I ordered the hardware, printed the parts and assembled it about a year ago. I’ve been using the servo tester method to start and stop the needle, like most other people. But, I’ve always wanted it to be able to turn off and then end of a sheet of foam board. I’ve tried to figure it out myself without success. I’ve waited patiently for someone else to post how they successfully did it. Finally, I’ve figured it out and feel I need to help others because I’ve seen others with this same request in multiple locations. Here’s how I did it:
MPCNC with a Needle cutter used for DTFB (purchased through V1Engineering)
RAMBO Board with Dual End Stops
Firmware Version: Marlin-MPCNC_Rambo_T8_16T_LCD_DualEndstop based on bugfix-2.0.x
Uncomment line 2122 in Configuration.h and upload to RAMBO board.
From: //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
To: #define NUM_SERVOS 1 // Servo index starts with 0 for M280 command
The V1Engineering’s discussion on laser’s, spindle speed, and pwm wasn’t working for me, but they gave me valuable clues.
I looked up the pinout locations for servos in the /src/pins/pins_RAMBO.h file. I didn’t change any of the pin callouts. The RAMBO board says:
#define SERVO0_PIN 22 // Motor header MX1
#define SERVO1_PIN 23 // Motor header MX2
#define SERVO2_PIN 24 // Motor header MX3
#define SERVO3_PIN 5 // PWM header pin 5
I decided to use Servo 0 to connect to my ESC. Now, I searched for PIN 22 in the pinout schematic.
I had never really looked at these kind of schematics before, but deciphered that pin 22 was the middle of 5 pins on MX1.
So, I wired the ESC ground pin to the ground on MX1 and the signal pin on PIN 22 of MX1 (the middle pin on MX1). [My ESC main power leads are wired directly to the 12V mains].
Added this Gcode to my programs. I use Estlcam (which has worked great for me.)
At Program Start:
M280 P0 S040 ; Give low PWM signal for ESC to boot up
G04 S3 ; Pause 3 seconds for ESC to turn on
M280 P0 S080 ; PWM signal for Needle cutter. Change S<value> to required PWM signal
At Program End:
M400 ; Pause and wait for all moves to complete
M280 P0 S040 ; Turn off Needle Cutter
You must be logged in to reply to this topic.