Welcome! Log In Create A New Profile

Advanced

addition of a fan

Posted by morrist 
addition of a fan
February 28, 2012 04:54PM
Hello,

i have been using the techzone monolithic electronics with sprinter firmware. i would like to write in a bit of code so i may turn on a fan. i was wondering if this has been done and how. any documentation on it would be great



Morrist
Re: addition of a fan
February 28, 2012 05:29PM
M106 = on

M107 = off

If they are on a PWMable pin then you can send a PWM command as well to set the speed.

M106 Snn (nn being a number between 0 and 255)


FFF Settings Calculator Gcode post processors Geometric Object Deposition Tool Blog
Tantillus.org Mini Printable Lathe How NOT to install a Pololu driver
Re: addition of a fan
February 28, 2012 06:36PM
my question is more of how to write it to a certain pin. i am familiar with the g and m code, but wasnt sure where on the board i would power a fan from
Re: addition of a fan
February 28, 2012 06:36PM
I use a Sanguinololu and it has 1 PWM pin, would this command work with it?
Re: addition of a fan
February 28, 2012 07:45PM
Have a look in Pin.h you will see the FAN_PIN for your board if not you will need to add it. Once the pin is set up you can control it through the software.

Morrist I am not sure how many open pins your electronics has but as long as you have at least one free pin of any type you could at least control the fan on/off maybe not PWM.

The Atmega pins can handle 40ma directly so for a small fan you should just be able to connect it directly to the pin. If you want to control a larger load you will have to run it through a transistor like the hotend and/or heated bed. To add a transistor you could buy components and make up a small board or buy a small motor driver like [www.pololu.com] which would allow you to control two motors.


FFF Settings Calculator Gcode post processors Geometric Object Deposition Tool Blog
Tantillus.org Mini Printable Lathe How NOT to install a Pololu driver
Re: addition of a fan
February 28, 2012 07:49PM
thank you sublime, i will post the results tomorrow evening. i wont get time until tomorrow to try,



morrist
Re: addition of a fan
March 02, 2012 07:45PM
Can i ask which pin you are using

Rob
Re: addition of a fan
March 05, 2012 08:34PM
still havent gotten around to adding the fan, and i have been considering adding a heated bed. Is there any kits or components the community is learning towards?
Re: addition of a fan
March 05, 2012 10:36PM
PCB heatbed MK2
Sorry, only registered users may post in this forum.

Click here to login