How to Use BIGTREETECH RGB Port for a Case/controller Fan
by SpiderSpartan in Workshop > 3D Printing
844 Views, 0 Favorites, 0 Comments
How to Use BIGTREETECH RGB Port for a Case/controller Fan
I recently upgraded my Ender 3 Pro with an SKR 2 controller. I loved the extra controllable fan ports. Went from always on hotend fan and switching the controllable port from fan to laser, to controlling all 3 independently. Only non-controllable fan left was the controller case fan and I couldn't let that stand.
RGB Port Config
In setting up my SKR2 I came across a note somewhere that the RGB port could be used for an additional fan, but couldn't find any further information on the subject. Based on information I found on the Neopixel LEDs the RGB port is designed for told me that the output is a 5V PWM signal. All I had to do to set it up was modify Configuration_adv.h
Enable:
#define USE_CONTROLLER_FAN
and set:
#define CONTROLLER_FAN_PIN PE6
Make sure to set the controller fan to editable for testing:
#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings #if ENABLED(CONTROLLER_FAN_EDITABLE) #define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu #endif
PE6 is the pin for the RGB port on the SKR2. I assume the same could be done with any boards with an RGB port. You will just need to use the correct pin assignment. This was honestly easier than I expected, although I did have some confusion around the M710 command and manually setting the speed. Marlin documentation says the command M710 A0 S255 should turn the fan on right away. I was not able to get this to work. What did work for my testing was setting the controller fan idle speed, M710 A0 I255. Just make sure to set it back to auto when done testing: M710 A1
Powering the FAN
Design
Now that we can control the fan we need a way to safely power it. Luckily I was unlucky enough to fry a fan MOSFET while initially setting up my laser on the SKR2. I bought a 20 pack of AO3400A MOSFETs to replace that and had the rest laying around to use on this project. I laid out a copy of the SKR2 fan PWM circuit using through hole parts I had on hand, except the surface mount MOSFET. I put a 3pin connector on one end where 2 pins go to the fan and 1 to a 24V source (This could go straight to the PSU or as I've done to one of the always on fan ports). The other connector is 2 pins for ground and the PE6 RGB PWM signal. I did this in EAGLE, which is free if you have a free Fusion 360 Hobbyist account.
Build
I took monochrome export layout png file in LaserWeb, used the filter/trace image editor to generate a trace svg image, and used that to generate a Laser Cut gcode file. I put a piece of electric tape on a copper clad board and used my laser to cut the trace outline in the tape. Then I peeled up the cut traces and sprayed paint on the exposed coper. Finally I pealed up the tape, leaving the only the traces protected for a PCB etch bath.
After completing this first build I tried using economy flat black spray paint from lowes as a mask and burning off paint to leave only the traces covered. This worked much better than the first attempt and will be my go-to PCB mask generator going forward.
Encase
With the board created I needed a way to keep it isolated in my controller case. What better way than to print a case. I exported the PCB as an image again, this time without the monochrome option.This can be saved as an svg file using Inkscape and that svg can be imported into TinkerCAD and used to build a suitable case. I've uploaded my case STL files on Thingiverse and here.
The last step is to make the cables and plug it all in. I used some 18 gauge security cable I got at Home Depot and some JST-XH connectors from Amazon.