How to Control Speed of Small AC Motor
-
@GoremanX
A loud pump can cost you a marriage...but a pump that frequently varies speed can be equally annoying. It's a Pest or Cholera decision.
From your description, it could be an aquaristic air pump, but bigger? Maybe a smaller one would do? It still takes a while to get used to the humming of such aquaristic pump, but it won't cost you your loved ones -
@o_lampe Oh I've gone through multiple pumps in my search for the right one. The cylindrical air pump that looks like a phallic symbol and is a pain to mount:
the Nidec 24v brushless pump:
a Vivosun AC pump:
(that one was by far the worst one)Most were too noisy (though the Nidec could be silenced easily), or had very pulsating air flow. None of them had adequate airflow. It's been a very expensive journey. I think I've finally found the perfect pump, and it's this one. Smooth, plentiful airflow, almost zero vibrations, and by far the quietest so far.
Still, I like my workshop silent, and I don't always need max airflow.
-
@GoremanX I just configured a pin to control a hobby servo and it's "working" as far as my logic analyzer can tell.
- M950 S0 C"exp.heater3"
- M280 P0 S100
The M950 configures the pin as a servo output and sets the frequency to 50Hz
The M280 sets the servo's position to 100-degrees.The M280 Sxxx value and the actual angle of the servo will be related, but not precise if you know what I mean.
Now, can you add in M280 commands to your slicer to control your "fan" or do you need something else?
-
@alankilian It needs to work with M106 so that slicer-generated part cooling commands turn the fan on and control its speed. The slicer doesn't use M280. What you're describing would require manually adding M280 commands at appropriate places in the file to replace the M106 commands that the slicer generates. For example, in some of my profiles, the fan turns on at about 33% after layer 1 (M106 S85), then gradually gets faster until it reaches 1mm of height, at which point it's set to 100%. Other profiles have different settings, depending on material and nozzle size. I use different slicing software, some make it easier than others to modify gcode automatically. Ideally, the solution I use would "just work" with M106 and no special gcode editing would be required.
-
I tried creating a fan and running it at 50 Hz and I get an appropriate waveform.
M106 doesn't have a lot of resolution (as expected) to produce between 1 and 2 ms pulses.
- M106 L0 Sxx
-S12 is 1 ms
-S25 is 2 ms
So that will get you fan-control with at least a few steps of servo angle.
- M106 L0 Sxx
-
What will happen if you will increase the frequency to let's say 100Hz, will this improve the pulse width resolution? Will servos still interpret it correctly?
"even as short as 5ms works with some.",
Edit: http://www.manual.spirit-system.com/index.php?title=Servo_list
-
@zapta said in How to Control Speed of Small AC Motor:
What will happen if you will increase the frequency to let's say 100Hz, will this improve the pulse width resolution?
Yes it will.
The faster the pulse-rate your particular servo can receive the better the resolution you will get controlling it as a fan.
The math is: 1/(rate in HZ) / 255 is the number of second-per-bit for the high-going pulse. (Maybe / 256, but it doesn't matter)
- A 1 millisecond pulse will be 0.001 / (1/Hz/255) in "Speed units"
- A 2 millisecond pulse will be twice that.
So the 1mS pulse tells you how many "Speed counts" you have for fill servo angle change.
-50 Hz gives you 12
-100 Hz gives you 25
-200 Hz gives you 50 -
Thanks @alankilian, your explanation makes sense to me.
-
@GoremanX said in How to Control Speed of Small AC Motor:
270 degrees from completely off, but there's only 180 degrees of actual speed adjustment
You can probably stretch any range you want to 180 or 270deg with the addition of a resistor or two. The potentiometer acts as a variable resistor or a variable voltage divider and in both cases you can bias it with fixed resistors to have the exact range that you want.
Just a thought.
-
-
@alankilian That looks perfect! I have some servos I can use here, so I'm looking forward to trying it. Sadly, it looks like another one of my Duet 3 boards just died, so I'm left with no functioning 3D printer at this time until my warranty replacement arrives, and the reseller I bought the boards from still doesn't have inventory