This project has been abandoned!
Motorized Spool Rewinder to be used with the SMuFF and is a replacement for the SFB, in case you don't have the required space for spools and SFB behind your printer.
Core components are a set of geared DC motors and the according motor controller, as used in many other Arduino related projects (mostly in Robotics), and of course a decent stand, on which the motors are being mounted onto.
It's being fully controlled by the SMuFF controller via I2C interface, as the SMuFF knows best when to spin up the motors and which of them is in charge.
The design is based on my Refill-Master-Spool but standard spools can be used too (either from plastic or cardboard), if you use a decent spool adapter.
If you're not using the SMuFF but found this link somewhere on the internet, let me save both of us some precious time and tell you what the Spool-Rewinder is not:
It's not a standalone solution
It's not an AMS replacement or clone
It's not magically replacing any other solution out there
It does not take the amount of filament / spool sizes into account and hence
It's not using different speeds based on the fact above
In case you're aware of these limitations/facts but still want to know how to adopt it for a different MMU, head down to the end of this page, where I've put together all you need to take care of.
In case you haven't seen it yet...
This is (at least to my standards) a pretty simple project and there're not much part you need to source. Beside the 3D printed parts, there are several components you'll need to source, such as the geared DC motors and the controller shown below.
You need one geared DC motor per spool and one controller board (the Iduino ME704 or the Waveshare DC Motor Driver Module for Raspberry Pi Pico or alternatively the Adafruit DC Motor + Stepper FeatherWing) per 4 spools. Since the SMuFF is able to handle up to 12 tools, you'll going to need 3 DC motor controller boards for all tools, 2 if you have the "default" 5-Tools configuration.
As for the voltage rating of the DC-Motors: They are available in 3V, 6V and 12V. For this project I'd recommend the 6V version. You can use the 12V version as well (which is able to provide more torque), but keep in mind that they have an higher current rating. Usually 400 mA in contrast to the 6V version, which is rated for 100 mA. You'll need a PSU that's capable of delivering enough current (although, in this project only one motor at a time is active).
A word of warning: Please notice, that the DC-Motor controller has an input voltage range of 6-12V. If your 3D printer runs on 24V, you can't power it directly from there.
As the text in the picture above states, you don't need a Raspberry Pi Pico (RP2040), since the SMuFF controller will handle it all, but it's still nice to have this option, in case you want to use the rewinder with some other MMU.
The next component you'll need, is a bunch of Aluminium extrusions. The motor mounts are designed for 3030 / 3060 slot 8 extrusions. Though, since I've published the STEP files over on Thangs, you can redesign them to fit any other extrusion size.
In theory, you could even attach the motor mounts to a wooden shelf. That is, if you don't mind drilling some holes into it, for the mounts to be bolted on.
The length of the 3030 / 3060 extrusions depends on the amount of spools you want to handle. Each spool will need roughly 200 mm of space (in the Z direction). The extrusion base needs to be wide enough, to give the device a decent stability.
In addition you will need a set of M3 screws and M3 heat set inserts for the motor mounts and electronics housing. T-Nuts, bolts and corner brackets are needed for the extrusions. Which ones of the latter you need, again, depends on the type of extrusions you have or plan to use.
Print one of these motor mounts for each spool you're going to use. Keep in mind that there are two variants of this model. One of them mounts perpendicular to the extrusions, the other is slightly slanted (by 3 deg.), which may be used if you fear your spool could potentially slide off the Core-Driver.
For the best results, add Paint-On supports manually in the shown regions.
Also, if you mount them on the left and right side of the extrusion, make sure to mirror one set of them on the X-Axis when slicing.
Print also one of these Core-Drivers for each spool you have. These don't need supports. Only make sure giving those parts enough perimeters (walls), so that they're printed without infill to make them as stiff and sturdy as possible. The Core-Drivers have an outer diameter of 50 mm, on which the spools (with the according adapter) will slide on eventually.
If you're using my Refill-Master-Spool, print also one of these snap-fit spool cores for each spool. These also don't require supports but increase the perimeters to 5 or 6, so the snappers don't break easily when being snapped in.
If you're intend using standard spools, measure the inner spool diameter and print the Core-XX-Adaptor model accordingly. Those 3 on the left in the picture below (with the brim at the bottom) are meant to be used on cardboard spools.
Lastly, print the electronics housing, lid and cable-clamps. Those need no supports either.
Lastly, print the electronics housing, lid and cable-clamps. Those need no supports either.
After you've printed all the parts, it's time to wire up the electronics and assemble it all.
Before you wire up the controller board(s) to the motors, you need to set up the correct I2C address of each board. The SMuFF expects to find the controller boards at I2C address 0x41 for the first board, 0x42 for the second and 0x43 for the third.
By default, each board is set to I2C address 0x40, which will collide with the Multiservo board, if you use one on your SMuFF. Hence, and because each board needs it's own address, you must relocate the address bridges accordingly, as shown down below.
By "relocating" I mean physically de-soldering the 0R resistor on the left of the corresponding address-lines A0 and A1 and bringing it over to the right side (and soldering it there, of course). This step connects the address lines to +5V instead of GND. This process can be a bit tedious because those resistors are pretty small.
For the Adafruit FeatherWing board the base address will change to 0x60, though setting the address lines is the very same, except, the SMuFF will expect those on addresses 0x61-0x63.
Wiring the electronic components itself is pretty easy. The picture on the left shows you what goes where.
Before you solder the wires (AWG 28 is sufficient) to the terminals on the DC motor, make sure they are long enough. I've made mine 650 mm, 450 mm and 250 mm long, which is enough to reach down to the electronics box, which is mounted to the bottom extrusion. However, the lengths may vary depending on your setup.
For good measure, put ferrules on that end of those wires that'll go into the controller terminals, or at least don't tin them before you screw them in.
But before you do the latter, route the wires of each motor through the motor mount.
The wiring is pretty much the same on the FeatherWing board, except, it additionally needs the 3.3V to power the logic ICs.
If you're already using the FeatherWing Servo board, you're supposed to be familiar with the logic signal wiring.
Keep in mind: The FeatherWing boards are meant to be stacked by design, so the wiring of the I2C and logic power from/to SMuFF must be done only on one of those boards, which will work for the Servo controller too.
If you're stacking them all together (i.e. DC-Motor / Servo controllers), be careful with the motor power for both! If you're using 6V for the DC-Motors, it's safe to apply this voltage to the servos too; If the voltage if higher than that, you're probably going to fry the servos!
Keep in mind that polarity of the DC-Motors doesn't matter, since those motors will spin in either direction, though, keep an eye on the + (plus) sign on the motor itself and solder the red wire to it. Although it's configurable later on in the firmware, it can be quite confusing if one motor spins clockwise (CW) whereas the other spins counter clockwise (CCW).
The Motor Power terminal eventually needs to be wired up to the power jack of the electronics housing. Use an AWG 26 or AWG 24 cable for this. Also, be aware that the Motor Power wires of all boards will go to the same power jack.
Finally, the SDA, SCL and GND wires go to the pins 26-28 on the header (4, 17/18 on the FeatherWing), the other end gets soldered to the I2C input connector in the housing.
Keep in mind: The I2C is a bus, which means all three of these wires have to connect to the same three pins (26-28) on each controller board, which eventually will connect to the SMuFFs own I2C bus via the very same pin names.
The electronics housing was designed for these type of connectors:
From left to right:
female MPX connector (goes into one of the black mounting brackets, then both go into the housing)
MPX mounting bracket (they come in different depths)
male MPX connector (this connects to the 3 (4) IC2 wires on the SMuFF)
DC Power Jack (2.1 mm center pin, 8 mm bore)
When soldering the I2C wires to the male MPX connector, it doesn't really matter which of the 6 pins are being used, as long as they match the counter pins on the female connector.
MPX connectors are commonly used in the RC-Hobby sector and hence are pretty easy to source.
Because only 3 (4) pins are needed for the I2C bus, there's a bit of headroom for future extensions.
Assembling the wohle thing is the easiest part by far. Screw the motor mount to the extrusion by keeping the motor wires in position. Then attach the Core-Driver to the motor shaft and screw it down (poking the screwdriver through that little hole you see in front). Screwing it down is optional, since it's supposed to be a tight fit but it'll ensure the Core-Driver doesn't come loose mid-print.
Now route the motor wires nice and tidy down to the electronics box and connect them to the according motor terminals. That's basically all you have to do.
To use it, simply slide the spool onto the Core-Driver.
For this you need to have the latest firmware version compiled (3.25 if you're going for the Adafruit FeatherWing) and also the latest SMuFF-WebInterface (1.25 or newer). In WI go into the Settings-> Options and enable the Auto-Rewind-Spool option. There's also a speed setting, which tells the SMuFF how fast to rewind the spool. This is something you have to adjust according to the retraction speed of the SMuFF when reloading.
In the Settings under Materials you'll find two new options on each tool: Spool Motor and CCW. The motor number depends on your wiring of the DC motors to the Motor controller. Since each motor controller supports up to 4 DC motors, the motor numbering is:
Motor #0..3 is assumed output 1-4 on the 1st controller
Motor #4..7 is assumed output 1-4 on the 2nd controller
Motor #8..11 is assumed output 1-4 on the 3rd controller
It doesn't really matter which motor is assigned to which tool, as long as you feed the right spool into the right slot on the SMuFF.
If the CCW option is turned ON, this means spool is supposed to rotate counter clockwise when rewinding, CW otherwise.
In order to test the spool motors, go to the WI Console and send a M3 Sn On Tn command to spin the motor clockwise.
S expects the tool / motor number as parameter n, O the motor speed (n = 20..255) and T the spinning time in milliseconds (n = 1000 = 1 second). To spin the motor counter clockwise use M4 with the same parameters. If a motor spins in the opposite direction, untick the CCW option in the Settings accordingly.
If the motors are spinning in the right direction, load filament from one of the spools into the SMuFF, let it load the filament and unload after that. When unloading, the assigned spool motor is supposed to spin with the configured speed and rewind the spool.
You may need to decrease/increase the spool motor speed if it runs either too fast or too slow.
As stated initially, one could think of using this Spool Rewinder on a different MMU. This will at least require adding some software module, which is driving the communication over the I2C bus. The easiest way of understanding this communication is by looking at the board schematic.
As you can see in the schematic, the core component of this motor controller is not the RP2040 but the PCA9685 IC (a 16-Channel I2C LED Driver using PWM), which is very well known in the DIY community because it's mostly being used to control up to 16 servos (i.e. with the Adafruit 16 Channel Servo Driver Board).
This IC is in duty of managing two TB6612FNG ICs (each a Dual Fullbridge DC-Motor Driver).
The PCA9685 connects 3 outputs to one TB6612FNG motor driver channel (either PWMA, AIN1, AIN2 or PWMB, BIN1, BIN2). One of those lines operates in PWM mode and controls the speed of the DC-Motor, the other two control the mode, according to this table:
The Standby (STBY) isn't wired to the PCA9685, so you may ignore its states.
The PCA9685 also comes with an integrated I2C interface, which is used to receive commands from the main controller (i.e. any kind of MCU or even an Raspberry Pi).
In the original design of the (Waveshare) DC-Motor controller board, a Raspberry Pi Pico (RP2040) is supposed to control the PCA9685 IC, which is OK for a standalone solution (i.e. in some Robotics application) but not really necessary when connected to a 3D printer. At first glance this seems a strange design decision, since the RP2040 would be perfectly able to control those TB6612FNG ICs directly, but at a second glance, it would occupy many I/O pins on the RP2040 (12 to be precise), which wouldn't leave much room for controlling other stuff.
A 3D printer already has it's own controller board, and most of them are capable of handling the I2C interface, because it's an established industry standard. So, in order to use this DC-Motor controller, all there's needed is a broken out IC2 header on the 3D printer controller, which is then used to connect directly to the PCA9685 via the signals SDA, SCL and GND (the +5V line isn't needed here since the board is being powered by the integrated Buck converter).
If you have more than one DC-Motor controller board, keep in mind that the IC2 is a bus and the signals can be easily wired to all boards. The distinction, which of the board is in charge, happens by using it's module address (see section "Wiring up the electronics" above).
Additionally, there is a software library needed which utilizes the PCA9865 protocol to initialize the IC and to tell it which pin to set or reset. Luckily, there is such a library from Adafruit on Github, which bases on the Arduino framework (this is the one I'm using on the SMuFF).
All there is to implement for a different MMU, is a piece of software that either controls the Adafruit library or mimics the initialization and pin commands for the PCA9685. On the SMuFF I did it using the Adafruit library and adding this simple helper function:
According to the modes table of the TB6612FNG shown above, there are 3 states you have to take care of:
CW Rotation
CCW Rotation
Motor Off
The latter puts the DC-Motor driver in "high Impedance" state and lets the motor spin freely.
On a side note: Because the PCA9685 is a PWM driver IC which is supposed to output a waveform signal and hence expects a pulse width value, there's this little hack used to set a pin to a permanent HIGH state, which is writing a pulse width of 4095 to the according pin. Vice versa, a pulse width of 0 sets it to a permanent LOW state.
Eventually, all you need to do is to integrate a call to such a function whenever the MMU is unloading filament and let the according DC-Motor spin in the right direction in order to rewind the spool. The SMuFF turns the according motor on when it starts unloading and turns it off again as the sensor in the Selector (endstop) triggers. Pretty simple and straight forward.
On the Raspberry Pi (3/4B, not the Pico) one can achieve the same by using the Adafruit Servo Kit library for Python, as shown in this example here.