Welcome! Log In Create A New Profile

Advanced

Controlling 50 fans RAMPS 1.4

Posted by Cliint 
Controlling 50 fans RAMPS 1.4
February 22, 2016 06:55PM
Hello all,

This is my first time posting on here so I figured I would give it a go. This project has no real practical application to my knowledge. But I just want to see if it is possible. I'm a mechanical designer, and often want to exparement with ideas. My main problem is my lack of electrical and programming knowledge. Ok enough about that, here is the problem.

I would like to have the standard setup for controlling my 3d printer with the standard ramps 1.4 and the ardunio mega. On top of this I was wondering it it was possible to control 5, 10 or even 50 fans. I was wondering if you could turn different ones on and off at a random time programed with M codes.

It's just a thought challenge really.

Edited 1 time(s). Last edit at 02/23/2016 05:43AM by Cliint.
Re: Help with an Idea
February 23, 2016 03:45AM
Do you need simple on/off or pwm control?

On/off = use shift registers as IO expanders.

If you can use the same pwm for all enabled fans then use shift registers such as 74hc595 to enable individual fans, and have the pwm triggering OE pin. This will cause the outputs to go high z while the pwm is high. A lot of pull down resistors then ensure the fans are off during high z.

If you want 50 individually programmable fan speeds then I suggest you look for pwm capable io expanders. I do not know their numbers, but I know that Intel Galileo gen1 uses some.

By the way... Help with an idea is basically the topic of the whole forum. Something like controlling 50 fans would have been more descriptive. :-)
Re: Help with an Idea
February 23, 2016 05:42AM
It would be just a Simple on off, no adjustment of fan speed would be require. Would you be able to use M codes to turn these on and off?

Sorry for the title, I was not really thinking as I just finished a long day at work. Thank you for your help, it is truly appreciated.
Re: Controlling 50 fans RAMPS 1.4
February 23, 2016 09:04AM
You will probably need to modify your firmware for that. I don't know if any of the current firmwares has spi targeted M codes in them.

Otherwise you may be able to bitbang spi over a few gpio, using existing M codes for each level change. While this is terribly inefficient and slow, you will probably change fan states once every several seconds, so it should be a functional solution.
Re: Controlling 50 fans RAMPS 1.4
February 25, 2016 02:35AM
You might need to add a flight controller just incase the thing takes off smiling smiley
Re: Controlling 50 fans RAMPS 1.4
February 25, 2016 04:06AM
Thank you for you suggestions. I am having a hard time finding reference to modifying the firmware to add M codes. Would anyone have a good source? Or even an example?

Also, what pins would best be used with the ardunio when it is connected to the ramps 1.4?

I will tie this thing down so it is not to take off.
Re: Controlling 50 fans RAMPS 1.4
March 28, 2016 04:34AM
My question is... are you going to control all that fans while 3D printing?
If not, you could ditch the RAMPS board and go with another shield that exposes all its I/O pin. (Google Arduino Mega shield to give yourself an idea)

As for firmware modification, you should find the code that handles G-code and M-code, modify the code to accept your custom G-code, and set an action when that code is received.
The location of the code, along with the difficulty to modify it, varies between firmware,
Re: Controlling 50 fans RAMPS 1.4
August 08, 2016 06:53AM
Not sure if anyone follows, but - there is quite a number of available I/O pins on RAMPS. Not 50, but still plenty.
You can set each one to your likings - e.g. I am using pin 36 to control the lights for the printer, so my webcam can "see" something using
M42 P36 S255
to turn pin 36 on, and
M42 P36 S0
to turn it off.
Works no problem.
There is ~16 pins at the end of RAMPS ready for use, there is 5 more for servos, you can use pins for unused extruder, too and there is PS-ON pin.
And, if none of this works, you can always expand the number of pins using 3 I/Os and serial-to-parallel expansion. Will not be very fast or efficient, but will work.
Re: Controlling 50 fans RAMPS 1.4
September 26, 2016 12:48PM
Thank you rklauco, that will get me started.
Re: Controlling 50 fans RAMPS 1.4
February 09, 2017 04:25AM
Nice Idea
Sorry, only registered users may post in this forum.

Click here to login