PWM Fan Control Mach3


Results 1 to 11 of 11

Thread: PWM Fan Control Mach3

  1. #1
    Member
    Join Date
    May 2011
    Location
    USA
    Posts
    18
    Downloads
    0
    Uploads
    0

    Default PWM Fan Control Mach3

    I have a DIY 3D printer (running Mach3) that I am wanting to add a filament
    cooling fan to. I would like to use a simple 40mm PC PWM fan (4 wires) and have
    Mach3 control it using the spindle speed PWM... is this possible? I am using a
    Campbell Combo Board. As I mentioned the fan has 4 wires (12v, grnd, PWM, and
    tach). 12v & grnd I think are obvious, but where does the PWM wire need to
    connect and is the tach wire even needed? Don't really care about precise RPMS,
    just want to be able to have an off, low, med & high speed that is controlled by
    Mach from the g-code.

    Similar Threads:


  2. #2
    Registered
    Join Date
    Nov 2013
    Location
    USA
    Posts
    88
    Downloads
    0
    Uploads
    0

    Default

    If your control board has spindle control its probably 0 to 10 volts for a vfd motor drive, the fan uses a 5 volt logic signal for control.
    You would need to make something to convert the signal and level.

    Why not just use a control relay for coolant to run the fan ?



  3. #3
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    24216
    Downloads
    0
    Uploads
    0

    Default

    The PWM signal can be made with a 555 IC usually, or there are simple ones on ebay.
    Couldn't you just change the rpm with a simple manual control using the above?
    Al.

    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  4. #4
    Registered
    Join Date
    Nov 2013
    Location
    USA
    Posts
    88
    Downloads
    0
    Uploads
    0

    Default

    Wasnt sure how much work you wanted to do to control the fan speed, thats why I sugested to use the mist or flood relay to turn on and off the fan.
    M7-M9 codes for on off

    http://www.google.com/url?sa=t&rct=j...58187178,d.aWc

    http://www.google.com/url?sa=t&rct=j...58187178,d.aWc

    If this is typical for most fans then you could use the spindle output to control a lm555 as a pwm but it wouldnt give a full range of speed, maybe a lm339 could be used.
    Theres a few simple designs out on the web for fan control with both chips, just leave out the mosfet driver and hook the pwm input direct to the ic. Power the ic off 5 volts for the right output voltage for your fan.

    You should be able to use the tach signal too, if your breakout board has the input for it. Since it looks like it would be 3-5 volt signal from the fan.

    This is just ideas, I havent tested or tried any of this from a breakout board.



  5. #5
    Member neilw20's Avatar
    Join Date
    Jun 2007
    Location
    Australia
    Posts
    3757
    Downloads
    0
    Uploads
    0

    Default

    On the bench, have you tried a variable voltage on the PWM input line to the fan? This might be getting more complex than the problem really is(n't)

    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. THREE ways to fix things: The RIGHT way, the OTHER way, and maybe YOUR way, which is possibly a FASTER WRONG WAY!


  6. #6
    Registered
    Join Date
    Jan 2013
    Location
    USA
    Posts
    119
    Downloads
    0
    Uploads
    0

    Default

    You can use the mist relay to turn on the fan motor.
    But the pwm signal turns on and off with the spindle relay.
    Seems to me if you took the pwm signal from mach and
    connected it to the pwm input of the fan, it should work.


    Why not turn on and off the fan based on temperature.
    After all You are trying to control is the temperature.

    Could you explain exactly what you are trying to accomplish?
    When does the fan turn on, and why you need control the fan speed
    rather than using single set speed?



  7. #7
    Member
    Join Date
    May 2011
    Location
    USA
    Posts
    18
    Downloads
    0
    Uploads
    0

    Default

    Thanks all for the replies...
    What I am trying to accomplish is to have the g-code control the fan speed. There are settings in Slic3r that adjust the fan speed based on the couture/area (1st layer, bridges, walls) being printed and Slic3r adds these commands to the g-code it generates. I am currently set up so that the g-code will start & stop the fan (through the mist relay), but there is no control of the speed (100% or zero). I can set up a manual control but some of the parts I print may take 3-4 hours and I can't stay with the machine the whole time. I am wanting to do something similar to what Mzones has in his post connect the fan pwm input to the pwm output from Mach, but I'm not sure where to connect to my BOB (Campbell's Combo Board).



  8. #8
    Registered
    Join Date
    Jan 2013
    Location
    USA
    Posts
    119
    Downloads
    0
    Uploads
    0

    Default

    andysims

    I have this working. I'm at lunch right now will give you more info tonight.
    Just want to make sure that you don't need the pwm signal for anything else?
    Mach will only produce one. Do you have a unused relay on your BOB?
    I am assuming that that the spindle relay is on when you want the fan on, (M3)
    Is this true? Is the M04 command and a relay available?


    I have no experience with 3d printers.
    If you could post what pins are being used for and which are not being used.
    This would be very helpful.

    Mike



  9. #9
    Member
    Join Date
    May 2011
    Location
    USA
    Posts
    18
    Downloads
    0
    Uploads
    0

    Default

    Thanks Mike

    I am not using the pwm signal for any other purpose. My BOB has 4 relays... currently one is used for the charge-pump, one applies power to the temperature controls, one turns the fan on & off, and one is not used. M3 & M4 are not being used, heating circuit is energized by M8 (Flood) & Fan is controlled by M7 (Mist)... the following pins are being used:

    2 - x step
    3 - y step
    4 - z step
    5 - A step (extruder)
    6 - x dir
    7 - y dir
    8 - z dir
    9 - A dir (extruder)
    10 - e-stop
    13 - limits (wired in series)
    14 - Output 2 (power to temp controls through Relay 2 - M8)
    16 - Output 3 (power to fan through Relay 3 - M7)
    17 - Charge-pump (Relay 4)

    any suggestions are appreciated.



  10. #10
    Registered
    Join Date
    Jan 2013
    Location
    USA
    Posts
    119
    Downloads
    0
    Uploads
    0

    Default

    andysims

    Ok first of all some people wont agree with me here.
    I hooked this with both 3 and 4 wire fan motors
    On the fan motor i'm only using the positive and negative wires.
    I am not using the pwm input or the sense wires.


    I am going t assume here that the following are correct.

    Pin 1 is hard wired on BOB to relay 1
    Pin 14 is hard wired on BOB to relay 2
    Pin 16 is hard wired on BOB to relay3
    Pin 17 is hard wired on BOB to relay 4


    To turn on the fan you must use one the spindle relays( MO3 or M04 )
    The only time that the pwm signal is active is when either
    M03 or M04 are active;


    Some how we need to find a output pin for the PWM signal !!!!
    Can we turn on the fan on with same relay as the temp controls ?
    Is there access to pin 14 signal?

    If so Use M03 on pin 1 for temperature controls and power up fan.
    The M05 command turns on the PWM signal.
    Use pin 14 for the PWM signal.
    M05 turns these off.

    To verify my approach that I'm taking here, do this.
    Connect 12v to fan motor, Connect 5v to fan motor, Connect 3v to fan motor.
    If these all work, It will work.

    As far as your charge pump I think you may have issues there too.

    Attached is a schematic of a simple inexpensive and it works.

    Hope this helps you out


    Mike

    FANCONTROL1.zip



  11. #11
    Registered
    Join Date
    Jan 2013
    Location
    USA
    Posts
    119
    Downloads
    0
    Uploads
    0

    Default

    andysims

    Here's another approach, Connect the pwm signal from Mach
    to the vfd on the bob. Connect positive vfd analog output signal to the positive fan wire.
    Connect the neg fan wire to com.
    The vfd on the bob out puts 0 - 10V.
    This means fan will only at about 83 per cent compared to 12v.
    In ports and pins /spindle settings, set pully ratios 0 / 100
    Using S0 in the G code will turn motor off
    Using S100 in the G code will turn fan on full speed.
    This would eliminate using one of the relays for turning fan on and off.
    However one of the spindle relays need to be activated to have the pwm signal active.

    Do check specifications that that output is rated high enough to handle the current.
    We're only talking about around 5 watts @ 400 mA.



    Mike



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

PWM Fan Control Mach3

PWM Fan Control Mach3