1

Topic: Fan setup on pin 4 not working

I have a problem with trying to use a fan on a Sanguinolou board on my Solidoodle.  I updated my mother board from amega644p (atmega644p) to a mega1284p (atmega1284p) chip. I down loaded Solidoodle-Marlin_v1-Solidoodle_Marlin_v1_beta. I compiled the firmware for the mega1284p chip, Sanguinolou board V1.3 and uploaded it to my Solidoodle 3.  Everything works OK,  but when I try to add fan control to pin 4 in the firmware it does not work and the bed heater will not turn on with the button in slicer ( slic3r), but the fan control and slider on my slicer ( slic3r ) will control the bed header. The fan setup I have is the same as I had on the old chip (mega644p ) and there it work.  For some reason the firmware is confusing D4 (PB4) which is the fan output pin with D12 (PD4) which is the bed heater output pin.

2

Re: Fan setup on pin 4 not working

Have you confirmed the pins on the new chip and set the pins.h in your firmware accordingly?

Printing since 2009 and still love it!
Anycubic 4MAX best $225 ever invested.
Voxelabs Proxima SLA. 6 inch 2k Mono LCD.
Anycubic Predator, massive Delta machine. 450 x 370 print envelope.

3

Re: Fan setup on pin 4 not working

Yes the Atmega1284P foot print is the same as the Atmega644P.

Trying to print PLA with the Solidoodle was a nightmare so I wanted to add a cooling fan to see if that helps anything to keep the plastic from flowing all over the place.
so I downloaded and printed (from ABS) this nice fan duct:
added a MOSFET and followed all the instructions here
http://www.soliforum.com/post/2316/#p2316
but still could not get the fan running from inside Repetier.
I found out by pouring over the Sanguinololu firmware that I have to actually enable the fan pin and update the firmware on the board.
In the file pins.h you have to change #define FAN_PIN -1 to
#define FAN_PIN 4
but attention, you’ll have to do it in the right section of the file, in the definition for the Sanguinolulu board 62, so look for in there…

Fun fact, the Marlin firmware uses a very strange way of assigning pin numbers – not Atmels way of doing it, nor the physical pin numbering on the chip, but consecutive numbers for digital pins and another set of numbers for the PORTA pins (so pin 4 means actually physical pin 5 on the Atmega644P and Atmega1284P, go figure!). Fortunately there’s an ascii-schematic for the Atmega644 in pins.h – just not for the Sanguinolulu…