Bukobot 3D Printer Forum

News: Added the Bukobot Parts List (BOM) to Wiki at http://bukobot.com/bukobot-parts-list
Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: Adjustable fan speed  (Read 736 times)

buildrob

  • Global Moderator
  • Full Member
  • *****
  • Posts: 123
    • View Profile
Adjustable fan speed
« on: February 12, 2013, 02:19:53 AM »
Has anyone got the adjustable fan speed working with the Azteeg X3?
I'm using pin D4 (for extruder fan) and D5 (PLA cooling fan) to control my fans.

I've got them basically working (I put "M42 P5 S255" in the slicer start code and "M42 P5 S0" in the finish code for the extruder fan) and then the Slic3r controlled cooling using M106 / M107.

What's not working is that if I set the fan speed to anything but 100% then the fan whines but doesn't turn. I tried disabling FAST_PWM_FAN but that didn't help. Has anyone got this working?

whosawhatsis

  • Administrator
  • Hero Member
  • *****
  • Posts: 598
    • View Profile
    • Whosawhatsis on G+
Re: Adjustable fan speed
« Reply #1 on: February 13, 2013, 09:16:19 PM »
The included fans are not variable-speed fans, and you should not attempt to run them at lower speeds. Reduced cooling of the top of the extruder can results in leaks that will ruin your extruder.

buildrob

  • Global Moderator
  • Full Member
  • *****
  • Posts: 123
    • View Profile
Re: Adjustable fan speed
« Reply #2 on: February 14, 2013, 10:27:14 AM »
Hi Rich,

The included fans are not variable-speed fans, and you should not attempt to run them at lower speeds. Reduced cooling of the top of the extruder can results in leaks that will ruin your extruder.

Actually I worked it out. The fans you have provided ARE variable speed fans but they voltage controlled speed fans and not PWM controlled fans (PWM controlled fans are more common in PCs and are usually characterized by a 3 pin connecter - power, ground and a PWM speed control pin).

The speed of these simple 2 pin fans is controlled by their voltage. Maximum speed is 12V. Speed decreases with input voltage.

Now I was assuming that the Azteeg fan pins provided a variable voltage controlled by the output pin. Despite doing an "AnalogWrite" to these pins (from the software) it is converted to a digital PWM signal. I.e., it switches between on and off very quickly where the average duty cycle is determined by the value written to the pin (between 0 and 255). On the Azteeg board this Arduino signal is switched through a MOSFET transistor so that it can control enough current to drive a fan, relay or LED strip. The PWM signal effectively causes the MOSFET to connect the output pin (on the board) to ground or leave it floating/unconnected. At a value of 255  it is connected to ground 100% of the time, anything lower oscillates the connection to ground. [I'm sure you understand this but I'm giving the background for others.]

Now as noted the 2-pin voltage controlled fans can't be speed controlled by a raw PWN signal.

However, it is really easy to use a capacitor (a 10uF Electrolytic Cap works fine for the size of fan we are using) and a diode will rectify this (pretty much any diode can be used as long as it can handle the fan's forward current - e.g., 1N4148 / 1N914 are two common ones). The capacitor smooths out the pulses into an average voltage for the fan and the diode stops the MOSFET from being driven in the reverse direction by the charge stored in the capacitor (which is not good for the driver circuit). [Both the Electrolytic cap and diode are polarized so make sure you get them the right way around]

I drew up a diagram of the circuit (attached). You can just solder the two components together and connect them in-situ on the X-carriage (or that's what I did anyway). Its works really well and has good speed control over the entire control range.

Now this is a separate speed controlled fan to my extruder fan.
This fan is for cooling the printed piece. Now slic3r has some nice speed control features in this area. Rather than running the fan at 100% all the time it can for instance run the fan at 30% and then pump to 100% when printing tricky overhangs or bridges.

My extruder fan is not speed controlled - it stays at 100% speed all the time although I have changed the firmware to automatically turn on the fan when the extruder temperature is >50degC and off again when it is below - no Gcodes required. I submitted a pull request for this feature to the Marlin firmware maintainer so it might eventually make it in as a standard feature.

[I have actually jury rigged up the cooling fan here: http://www.thingiverse.com/thing:9717 using the second extruder cooling fan on my Duo (the second extruder is not currently wired up). I've used the extruder fan printed mounting piece (the wider one) to attach this cooling fan shroud to the front on my primary extruder (using a M3 x 16 and nut). Its definitely not a long term solution but it works well enough to test out the cooling fan. I printed some overhang calibration tests and definitely see an improvement with the cooling fan on. The hot end heater has just has enough power to maintain a stable 178degC with the cooling fan on at 100% (the extruder is set to 182degC but can't hold this temperature with the fan on). This is another reason I'm glad I've got the speed control working so I don't normally have to run the fan at 100% all the time. ]
« Last Edit: February 14, 2013, 10:46:02 AM by buildrob »

 

BloQcs design by Bloc
SMF 2.0.3 | SMF © 2011, Simple Machines