After completing my short c-beam z-axis with 500w spindle I discovered the possibility to have the speed of spindle controlled by g-code. (S commands)
From the hardware side it’s fairy simple unless I’ve overlooked something.
My spindle power supply has a potentiometer and a ‘speed input’ 0-10V DC.
With a PWM-to-voltage module like this https://www.amazon.com/KNACRO-voltage-module-converted-voltage/dp/B06XB6J4FV/ref=cm_cr_arp_d_pl_foot_top?ie=UTF8 I should be able to adjust the speed via the arduino.
No the potentiometer will be removed I guess.
From 0 to10V input will determine the speed of the spindle.
The aurduino can not supply that, so the ‘PWM-to-voltage module’ will translate the PWM from the arduino to the appropriate output. from what I read for calibration is that you create a 50% PWM as input to the module and adjust tiny potentiometer on the module for a 5V output to the spindle power supply.
How that translates to spindle speed I don’t know yet, but have RPM meter on hand to test.
Edit to my questions:
This might fail because the arduino has already enough to do and can’t handle a constant or changing PWM in addition?
Edit2: I’m 12 years out of programming. Was hoping for a 'simple addition to “if” ore “case” loops that sends a signal to 1 unused pin and if nothing is connected, no harm is done (eliminates a switch to turn on/off).
I don’t fully understand the documentation on GitHub about the pinouts, but my interpretation that could easily be wrong, is that all the pwm pins are used. But I did find a thread that @blurfl mentioned the possibility of adding three pwm pins to the new motor control board… but Im not sure (hard to read through hundreds of posts on a phone)
It was a bad day until you showed up! Biggest THANK.
Have more then enough to dig and the PWM->0-10V will arive 3’rd Jan acording to amazon-rain-forrest-killers
ATmega2560. It has 54 digital input/output pins (of which 15 can be used as PWM outputs)
From their site.
2…13 + 45 & 46 = 14 from search and 46 seems to be or has been discussable.
Lets say 13.
Pin 13 seems to be free for the task of spindle speed.
That line looks to me like it is going to PWM the spindle control pin in servo more, but it will be a special kind of PWM meant to control a servo motor.
I’m shooting from the hip here but I think I remember pin 13 is used by one of the timer libraries we are using which means it can’t actually be used for PWM
Do you have a post that describes your cbeam zaxis with spindle build? Parts list, where you sourced them, how you put it together? I’m very interested…
I’ve ordered 8mm acrylic for the sled that will be cut on my desktop cnc.
I planed to put in the Garden when it’s a complete sled that has moved around.
I can easy pull the orders from aliexpress, did order stuff that does not fit and had to make it fit though
Might as well put it up in the garden tomorrow as collaboration, cause plenty of room for improvement but a clear target. Light weight, low CGZ, short, spindle Z-axis.
And these seem to be free. Not connected on the original shield and pulled out as aux ports on @bee 's TLE shield. 44 it shall be then (aux 7 on the TLE shield).
yes, this was to run a hobby-type-servo to move the on-off switch on a router.
It was tied to the M command, not the S command
If we can get the firmware to put out a PWM signal based on the S command, there
are a lot of ways to adapt it to actually modify the speed (including having a
servo with a wheel on it rotate the router speed knob )