<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>FAN/Cooler control &amp;amp; Azteeg X3</title>
        <description> Anyone get the fan control to work on the Azteeg X3? Extruder cooler works fine, but filament doesn&#039;t... at least, not for me.

I&#039;ve had this problem since I got the board up and running actually (091r0).. and I just pushed 091r6 today to see if that&#039;d fix it (it didn&#039;t).

Anyone else have this issue? I had this problem once before and I fixed it, but it was awhile back (v091r0?) and I don&#039;t remember what I did. Config.h is attached here for anyone who wants to see what I&#039;m doing. I&#039;ve tried to manually define the fan pins as pin 5 for FAN_PIN and FAN_BOARD_PIN as pin 6 (does the fan board settings do anything? I can&#039;t figure out what causes it to turn on).

Now that I&#039;m at 091r6, I&#039;m going to have to hack it again to bring &quot;allow cold extrudes&quot; and fix the damn pid tuning thing bit again too..</description>
        <link>https://reprap.org/forum/read.php?267,324014,324014#msg-324014</link>
        <lastBuildDate>Sat, 16 May 2026 17:18:01 -0400</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://reprap.org/forum/read.php?267,324014,324532#msg-324532</guid>
            <title>Re: FAN/Cooler control &amp; Azteeg X3</title>
            <link>https://reprap.org/forum/read.php?267,324014,324532#msg-324532</link>
            <description><![CDATA[ Why pin 9? I don't have that specified anywhere in my configuration settings at all. <br />
<br />
The way the code *should* be working (unless I'm misreading it)<br />
<br />
Step #1. Read "configuration.h"<br />
<pre class="bbcode">

#define NUM_EXTRUDER 1
#define MOTHERBOARD 34

#include "pins.h"</pre>
<br />
2. STOP processing Configuration.h, go read pins.h:<br />
<pre class="bbcode">
&lt;... snip! ...&gt;
/****************************************************************************************
* Arduino Mega pin assignment
*
****************************************************************************************/
#if MOTHERBOARD == 33
#define MOTHERBOARD 3
#define RAMPS_V_1_3
#elif MOTHERBOARD == 34
#define MOTHERBOARD 3
#define RAMPS_V_1_3
#define AZTEEG_X3
#endif</pre>
<br />
So our motherboard is #34, which means RAMPS_V_1_3 gets defined, so does AZTEEG X3.<br />
<br />
<pre class="bbcode">
// pins.h cont'd



#ifdef RAMPS_V_1_3

#define LED_PIN            13
#define ORIG_FAN_PIN            9
#define PS_ON_PIN          12

&lt;... snip! ..&gt;

#ifdef AZTEEG_X3

&lt;... snip! ...&gt;

#define ORIG_FAN_PIN           4
#define ORIG_FAN2_PIN          5
#define LIGHT_PIN         6
#define BEEPER_PIN        33  // Activate beeper on extension shield
#define BEEPER_TYPE        1</pre>
<br />
3. in the RAMPS_V_1_3 section, ORIG_FAN_PIN was defined as #9. <br />
4. In the AZTEEG_X3 section, it was redefined as pin 4.<br />
5. Return to Configuration.h<br />
<br />
<pre class="bbcode">
#define FAN_PIN ORIG_FAN2_PIN     
#define FAN_BOARD_PIN 6

 &lt;... some parts removed ...&gt;
#define EXT0_EXTRUDER_COOLER_PIN ORIG_FAN_PIN
#define EXT0_EXTRUDER_COOLER_SPEED 255

&lt;.. snip! ...&gt;
#define FEATURE_FAN_CONTROL 1</pre>
<br />
5. FAN_PIN is set to ORIG_FAN2_PIN (which from pins.h in the Azteeg X3 section was set as 4.<br />
<br />
When the code runs, it looks like PWM control is done via HAL.cpp in the PWM_TIMER_VECTOR Interrupt block:<br />
<pre class="bbcode">

/**
This timer is called 3906 timer per second. It is used to update pwm values for heater and some other frequent jobs.
*/
ISR(PWM_TIMER_VECTOR)
{
    static uint8_t pwm_count = 0;
    static uint8_t pwm_count_heater = 0;
    static uint8_t pwm_pos_set[NUM_EXTRUDER+3];
    static uint8_t pwm_cooler_pos_set[NUM_EXTRUDER];
    PWM_OCR += 64;

&lt;.. snip! ..&gt;

#if FAN_BOARD_PIN &gt;- 1
        if((pwm_pos_set[NUM_EXTRUDER+1] = pwm_pos[NUM_EXTRUDER+1])&gt;0) WRITE(FAN_BOARD_PIN,1);
#endif
#if FAN_PIN&gt;-1 &amp;&amp; FEATURE_FAN_CONTROL
        if((pwm_pos_set[NUM_EXTRUDER+2] = pwm_pos[NUM_EXTRUDER+2])&gt;0) WRITE(FAN_PIN,1);

&lt;..snip!..&gt;
#if FAN_BOARD_PIN&gt;-1
    if(pwm_pos_set[NUM_EXTRUDER+1] == pwm_count &amp;&amp; pwm_pos_set[NUM_EXTRUDER+1]!=255) WRITE(FAN_BOARD_PIN,0);
#endif
#if FAN_PIN&gt;-1 &amp;&amp; FEATURE_FAN_CONTROL
    if(pwm_pos_set[NUM_EXTRUDER+2] == pwm_count &amp;&amp; pwm_pos_set[NUM_EXTRUDER+2]!=255) WRITE(FAN_PIN,0);
#endif</pre>
<br />
Since FAN_PIN isn't overridden anywhere else that I can find, the PWM ISR should be toggling FAN_PIN (pin 4) on and off..<br />
<br />
So it *should* be working just fine.. but it's not. I've tried defining random pins as well (4, 7, 11, etc.) and the fan always seems to spin @ about 50%, regardless what I send M106/M107 wise.]]></description>
            <dc:creator>CmdrKeen</dc:creator>
            <category>Repetier</category>
            <pubDate>Thu, 13 Mar 2014 21:28:06 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?267,324014,324064#msg-324064</guid>
            <title>Re: FAN/Cooler control &amp; Azteeg X3</title>
            <link>https://reprap.org/forum/read.php?267,324014,324064#msg-324064</link>
            <description><![CDATA[ you have to use the digital pin 9 <br />
to cool the print]]></description>
            <dc:creator>maralb</dc:creator>
            <category>Repetier</category>
            <pubDate>Thu, 13 Mar 2014 02:02:01 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?267,324014,324014#msg-324014</guid>
            <title>FAN/Cooler control &amp; Azteeg X3</title>
            <link>https://reprap.org/forum/read.php?267,324014,324014#msg-324014</link>
            <description><![CDATA[ Anyone get the fan control to work on the Azteeg X3? Extruder cooler works fine, but filament doesn't... at least, not for me.<br />
<br />
I've had this problem since I got the board up and running actually (091r0).. and I just pushed 091r6 today to see if that'd fix it (it didn't).<br />
<br />
Anyone else have this issue? I had this problem once before and I fixed it, but it was awhile back (v091r0?) and I don't remember what I did. Config.h is attached here for anyone who wants to see what I'm doing. I've tried to manually define the fan pins as pin 5 for FAN_PIN and FAN_BOARD_PIN as pin 6 (does the fan board settings do anything? I can't figure out what causes it to turn on).<br />
<br />
Now that I'm at 091r6, I'm going to have to hack it again to bring "allow cold extrudes" and fix the damn pid tuning thing bit again too..]]></description>
            <dc:creator>CmdrKeen</dc:creator>
            <category>Repetier</category>
            <pubDate>Wed, 12 Mar 2014 21:08:18 -0400</pubDate>
        </item>
    </channel>
</rss>
