Sbase/Smoothieware - Use a Free PWM Pin and Power Expander or SSR to Control Fans.

7,740

44

21

Posted

Introduction: Sbase/Smoothieware - Use a Free PWM Pin and Power Expander or SSR to Control Fans.

Running out of available spots to attach a heated bed, hotend or a fan we do thankfully have the option to use one of the General Purpose Input/Output (GPIO) pins on the MKS Sbase and combine it with a Solid State Relay (SSR) to power the attached device.

Please correct me if I use the GPIO term in error here. I am not educated in electronics :)

I am not going to use a standard SSR, but instead a Power Expander. I'm using the Power Expander as it is really small and more effective than any SSR out there.

Why PWM pin

I am going to use a PWM pin to control some 12v fans on my 24v system and need the ability to adjust them up and down and not just on and off.

If we just wanted to turn them on and off, we could use the analog pins on the upper left corner of the board, labeled J8. One of them is a Gnd as well, making it really easy to set up.

At a later point, in the very near future, I am going to make another instructable using a standard SSR and one of the non-PWM pins to turn an attached fan or led on and off.

Step 1: Finding an Available PWM Pin

Aside from the PWM pins allready packed with a Mosfet (heaters and fan outputs) our EXT2 output has 2 PWM outpus and we also have one in our J8 pin group in upper left corner and an unused one from E1, unless you use all 5 drivers.

PWM-pins list and location

  • P1.23 - J8 pin upper left corner
  • P2.12 - E1 - Epsilon external driver pins. Upper right-ish corner.
  • P3.25 - EXP2 lower right side where an LCD might go.
  • P3.26 - EXP2 lower right side where an LCD might go.

See the photo for exact location.

Note:If you are using a SmartController (LCD) it is connected to the EXP2 and you can not use these PWM pins for other things. They are used to turn the controller back and forth

Step 2: Configuring Smoothieware to Use New Pin

Configuring firmware is one of the easy things when we talk Smoothieware.

In my photo I have listed all of our available PWM pins and uncommented the ones I do not use.

You can see how I have uncommented the standard FAN pin 2.4 and enabled the pwm pin on E1; 2.13.

Now we just need to do the wiring.

Step 3: Wiring Sbase to Use Our New Settings

PWM pins on Sbase delivers 3.3v or so and is considered + in regards to wiring.

Note: I recommend using wires easily recognizeable when doing electrical and electornical things. Like red for power/+/vin and black for -/gnd.

Sbase to Power Expander

Now simply connect your red dupont wire to the PWM P2.13 and lead it down to the signal/control + on the Power Expander. Do the same for your black wire from GND to -.

DC input

I use a smallish 12v 3amp DC-DC converter which I have configured to give 12v output. I draw wires from + and gnd to the Power Expanders input + and - respectively

Note: Do use a converter with more amperage than you want. Many out there are much lower than this 3amp version.

Note: if you are going to use the same voltage as you have in your system in generel: meaning you just use PowerExpander as a sort of Mosfet to add an extra device, you just skip the DC-DC converter.

DC Output

Now you simply draw lines from +/- output to your fan. I recommend you do a measuring using Multimeter while setting output speed on your fan.

Crimping wires

Instead of just twisting your wires, I recommend finding some sort of pin to terminate it with instead. I mostly just use the male dupons pin which can be bought very cheaply, for these thin wires. Then put some heatshrink on it to cover exposed metal.

I use some larger pins for my bigger wires, but do not know the name of those, as I buy them locally.

Have fun!

Now your all set up, and everytime your controller starts the fan, it is going to activate the PowerExpander, which will power the fans with 12v instead of our normal 24v :)

Share

Recommendations

  • Epilog Challenge 9

    Epilog Challenge 9
  • Paper Contest 2018

    Paper Contest 2018
  • Sew Warm Contest 2018

    Sew Warm Contest 2018
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

13 Comments

Hi,

Nice job!

I wonder if a RRD Fan Extender (https://www.geeetech.com/reprap-ramps14-rrd-fan-extender-p-683.html) will do the job instead of the power expander?

I guess it might.
I'm using various mosfet boards as well, which are basically fan extenders.

Try searching for "arduino mosfet board" on ebay or similar.

Cheers

Hi,

I wanted to control heatthink fan and smoothieboard fan (so they stop making noise once the print job is done). To do this I use a simple mosfet and 10k resistor. Base on this website (http://bildr.org/2012/03/rfp30n06le-arduino) taking motor as fans. The input pin is the 1.22 because I didn't need pwm but it can be done with a pwm pin as the 1.23.
The config.txt can be easily modify using the smoothie page.

Using mosfet and resistors, which needs to be soldered, is much too much bother for most people.. too much hassle and potential for errors and such.

I'm not attacking Smoothieware. I'm PROMOTING smoothieware. FOR FREE.

What I am doing is helping people for free. Doing your work. For Free.

I'm stating facts about the unfriendly tone of your Google groups, as thousands of people see them (gathered from all the countless messages I recieve).

It's ok you view it differently, since you have promoted that kind of environment.

Just please do not come over here, and ruin the good mood.

In this forum, we try to HELP each other. Not Critize each other.

No, you were definitely attacking the Smoothie project, but you are such a coward that you have since deleted your messages. Because *everything* you say in them is false. You talk about events that *only happened in your head*, they do not exist except in your imagination, and the document I compiled proves that.

Regarding your "document".. I can put together an endless list of pointless attacks you have made, here, on your own foras, github and especially on the reprap forums.. but I try to focus on furthering the community, not hammering anyone.
Yes, I can get carried away now and then, I am humand, and this is not my work, so my work cap is not on... but I do not go search for people to annoy.. like you do here.

Can't you see how bad it is you come here like this Arthur? I'm freaking trying to promote Smoothieware, but you, as the people who has most to gain, work very actively to destroy it by being so darned negative.

I sent you this document, and you answered it via email, and in your answer, you explained that you DID NOT EVEN READ IT.

This document explains in detail how the things you are saying are false, with proof and links and quotation, and you are SO SURE you are right you do not even read it. That is insane !

The accusations you are making against the Smoothie project or against me are *false*, the things you say happened happened *only in your head*, and if you were to read the document, you would *see that*.

Anybody believing dintid's constant accusations against Smoothie, *please* read the document :

goo.gl/TYLslk

Hi Dintid,

I was long searching for these details. Thanks for such excellent write ups with MKS sbase boards. I am using this board in my printer as well and it seem to have worked pretty well so far. I have one question though. I am presently using dupont style JST connectors for the connections which is rather flimsy as this board needs 2.54mm pitched xh-JSTs. I tried to crimp some with spare XH receptacles but horribly failed wasting some of them. The connectors you are using are these pre-crimped or have you crimped it? What crimp tool do you use to get it done?

I have crimped my own motor wires. I usually start using a needle-clamp (I think it's called that. I'm danish). I then use a very cheap crimp tool I bought in Biltema (Scandinavian store). But it's the same as any cheap crimp tool you can buy anywhere.

Sometimes tweak it with my needle-plier after crimping to make it fit into the plugs.