Topic: Gcode controlled fan with Panelolou 2.
Been searching around, and tinkering with the firmware, and sending Gcode commands to try and enable the extruder fan I just installed off my Panelolou Sanguino adapter board Transistor 1.
Reading on Both Ian's blog, and the Think3dPrint3d website it says I need to go to pin.h and enable fan control by changing the pin definition for the fan from -1 to 4.
My problem is the code I am told to change is:
#define FAN_PIN -1
to
#define FAN_PIN 4
But there are multiple instances of this throughout the pin.h file, and I have tried changing the Motherboard == 62 etc.... But no love.
Tested my fan to make sure it worked directly off a 12 volt supply, worked. I also tested my wiring to ensure there were no shorts. Also good.
Any ideas? What am I missing?
Thanks.
UPDATE - 02/18/2014
Ok, for anyone else who wants to rip there hair out if they too want to add a gcode controlled fan to their Panelolou 2 + Solidoodle setup, but can't seem to get it work. Make the following changes. You want to use transistor 2 on your Sanguino adapter board.Transistor 1 will not work until i2c is supported by firmware. Which I think it is already, but I haven't confirmed it. If it is I believe it's simply a matter of soldering a few jumpers together on the Sanguino adapter board that comes with the Panelolou 2.
Anyhow code changes as follow to the Pins.h file in the Marlin Soliforum Community firmware. What I changed the code too is anything that is red below.
/****************************************************************************************
* Sanguinololu pin assignment
*
****************************************************************************************/
#if MOTHERBOARD == 64
#define STB
#endif
#if MOTHERBOARD == 63 || MOTHERBOARD == 66
#define MELZI
#endif
#if MOTHERBOARD == 65
#define AZTEEG_X1
#endif
#if MOTHERBOARD == 62 || MOTHERBOARD == 63 || MOTHERBOARD == 64 || MOTHERBOARD == 65 || MOTHERBOARD == 66
#undef MOTHERBOARD
#define MOTHERBOARD 6
#define SANGUINOLOLU_V_1_2
#endif
#if MOTHERBOARD == 6
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega644P__
#ifndef __AVR_ATmega1284P__
#error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
#endif
#endif#define X_STEP_PIN 15
#define X_DIR_PIN 21
#define X_STOP_PIN 18#define Y_STEP_PIN 22
#define Y_DIR_PIN 23
#define Y_STOP_PIN 19#define Z_STEP_PIN 3
#define Z_DIR_PIN 2
#define Z_STOP_PIN 20#define E0_STEP_PIN 1
#define E0_DIR_PIN 0#define LED_PIN -1
#define FAN_PIN 28 //Needs to be pin 28 to use Transistor 2 on panelolou 2 Sanguino adapter board.
#if FAN_PIN == 12 || FAN_PIN ==13
#define FAN_SOFT_PWM
#endif#ifdef MELZI
#define LED_PIN 27 /* On some broken versions of the Sanguino libraries the pin definitions are wrong, which then needs LED_PIN as pin 28. But you better upgrade your Sanguino libraries! See #368. */
#define FAN_PIN 28 // Works for Panelolu2 too, should be 28 for Transistor 2 use and non broken Sanguino library.
#endif#ifdef STB
#define FAN_PIN 4
// Uncomment this if you have the first generation (V1.10) of STBs board
#define LCD_PIN_BL 17 // LCD backlight LED
#endif#ifdef AZTEEG_X1
#define FAN_PIN 4
#endif#define PS_ON_PIN -1
#define KILL_PIN -1#define HEATER_0_PIN 13 // (extruder)
#define HEATER_1_PIN -1
#define HEATER_2_PIN -1#ifdef SANGUINOLOLU_V_1_2
#define HEATER_BED_PIN 12 // (bed)
#define X_ENABLE_PIN 14
#define Y_ENABLE_PIN 14
#define Z_ENABLE_PIN 26
#define E0_ENABLE_PIN 14#ifdef LCD_I2C_PANELOLU2
#define FAN_PIN 28 // Uses Transistor1 (PWM) on Panelolu2's Sanguino Adapter Board to drive the fan, change to pin 28 to use transistor 2.
#endif#else
#define HEATER_BED_PIN 14 // (bed)
#define X_ENABLE_PIN -1
#define Y_ENABLE_PIN -1
#define Z_ENABLE_PIN -1
#define E0_ENABLE_PIN -1#endif
#define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
#define TEMP_1_PIN -1
#define TEMP_2_PIN -1
#define TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
#define SDPOWER -1
#define SDSS 31There you go, hope this helps anyone with this unique problem! I'll be seeing if I can get access to both my transistors by checking into what's needed for i2c support with my setup. I'll post an update if I figure anything else out.