Does anyone here have experience with the TinyG and using the PWM output to directly drive an ESC for a BLDC spindle? I've been doing research and I'll do testing this weekend, but I wanted to see if anyone had experiences to share. https://github.com/synthetos/TinyG/...Version-0.97#pwm-group-pulse-width-modulation https://github.com/synthetos/TinyG/blob/master/firmware/tinyg/spindle.c
Dang. Good point. Likely I'll have to send them a pull request for that feature (luckily I'm a programmer with embedded experience). Seems like an oversight in the code.
Actually, thinking about it, I can just send an M3 with the max RPM followed by an M5 right? As the ESC init only happens during power up, it'll be like the homing sequence and only done once on startup.
It depends on what you ESC wants... I don't know if they all want the same thing... Here is the code I use for my arduino to arm it (found on youtube actually): here is the link to download the code: https://www.sendspace.com/file/jrtfu0 void initialize_motor() { Serial.print("Arming the motor! \n"); delay(3000); Serial.print("Setting low speed! \n"); myMotorBR.write(5); delay(4000); Serial.print("Setting high speed! \n"); myMotorBR.write(180); delay(4000); myMotorBR.write(10); Serial.print("MOTOR IS READY! \n"); delay(2000);
Every ESC I've ever used has the same power on calibration sequence. The quad copter board I use can calibrate all of my ESCs at once knowing this. So, I think I can write some Gcode to calibrate the ESC. I'll hopefully let you guys know after the weekend. Thanks for the reminder in any case.
I don't know if this is of any help to you http://openbuilds.com/builds/software-speed-control-of-a-brushless-dc-bldc-motor-from-mach3.762/ Tweakie.
Yeah, I saw that build, but the TinyG has the ability to control the PWM output pulse size/duration with enough control to run a servo/ESC directly. The only issue I see is the one mentioned above about calibrating the low/high range for the ESC on startup. The TinyG phase low/high controls the min/max pulse width. That is used in conjunction with the speed low/high and the M3 value to set the pulse width. So, unlike a 0-100% PWM signal, this is able to generate the exact pulses needed. Or so it seems. I do like your board in that you can manually control the speed though.