Welcome! Log In Create A New Profile

Advanced

Adding fan to RAMPS 1.4 and Marlin

Posted by peddiparth 
Adding fan to RAMPS 1.4 and Marlin
September 23, 2012 12:05PM
I have a CPU Fan with 3 wires - 12v, ground, 5v (signal ?) to blow on the hot-end.
I am currently running it directly using PC power supply using just 12v and ground wires with a manual switch.

How can I hook this up to RAMPS 1.4 and control it with Marlin firmware?
Re: Adding fan to RAMPS 1.4 and Marlin
September 23, 2012 01:40PM
I will be happy with instructions to get a generic 2 wire fan to work with Ramps 1.4 (h/w connections) and Sprinter (or Marlin if possible).
I do not see Fan connections in RAMPS 1.4 wiki page.
Re: Adding fan to RAMPS 1.4 and Marlin
September 23, 2012 01:50PM
Hook the fan up to D9 i believe on the ramps shield. You can turn the fan on/off and measure voltage at the D9 connector and see if it is D9 or maybe it was D8? Not at a printer at the moment. Its one of the three connections.
Re: Adding fan to RAMPS 1.4 and Marlin
September 23, 2012 02:02PM
Thanks johnoly99 for the hint.
I was going about it the wrong way. I was thinking in the direction of connecting the 12v directly from PC power supply, and finding a 5v PWM connection for controlling the fan.
Re: Adding fan to RAMPS 1.4 and Marlin
September 23, 2012 02:31PM
Ahh, D9 is pwm from the board. M106 S(0-255)
Re: Adding fan to RAMPS 1.4 and Marlin
September 23, 2012 03:43PM
D9 is the 12V PWM from the board! Don't connect the fan's PWM pin to it or bad things might happen winking smiley
Just hook the 12V and GND wires from the fan to D9 on RAMPS.

Then use M106 S[0-255] for fan on / speed, and M107 for fan off, as johnolly99 said.

Edited 1 time(s). Last edit at 09/23/2012 03:52PM by orcinus.
Re: Adding fan to RAMPS 1.4 and Marlin
September 23, 2012 06:11PM
I checked D9 and it had 12V to ground. I connected the 12v & ground to D9 connectors. The fan now works ok.
Does the option for FAST PWM really work in Marlin? I noticed that my hot-end fan does not run under 70% power in the PWM.
Re: Adding fan to RAMPS 1.4 and Marlin
September 23, 2012 08:54PM
If it doesn't work < 70%, it quite probably won't work with fast PWM either, although it might help a little.
On most fans i've tried, if it doesn't work <70%, with fast PWM it will work to maybe as low as 60%, but with a lot of noise and a very very sharp drop in RPM from 60 to 80.

So not really very usable.

You can try adding a capacitor across D9 (in parallel with the fan). A resistor in series too, probably.
That should iron out the PWM a bit.
Re: Adding fan to RAMPS 1.4 and Marlin
September 24, 2012 12:50PM
3 wire fans do not have a PWM pin. The third wire is for RPM feedback. 4 wire fans do have a PWM pin.

All the fans I have tried run well down to about 20% PWM.


Help improve the RepRap wiki!
Just click "Edit" in the top-right corner of the page and start typing.
Anyone can edit the wiki!
Re: Adding fan to RAMPS 1.4 and Marlin
September 24, 2012 05:30PM
You're right, my bad.
That should've said "tach pin", not "PWM pin".

Regardless, though, point is, if you hook 12V to anything but 12V and GND, it won't work (unless you count production of magic blue smoke under work).
Re: Adding fan to RAMPS 1.4 and Marlin
September 25, 2012 11:06AM
Got myself an inexpensive pair of tiny (20mm) fans from CompUSA for $7. With 2 wires, no doubts this time smiling smiley

Thanks for your very helpful responses.
Sorry, only registered users may post in this forum.

Click here to login