Swivel Arm Fan (SWAT)
INTRODUCTION!
I'm River. I'm 15 years old, and I like to call myself a "High School Roboticist."
This is a robot arm fan I made for fun! It's controlled via WiFi through a WebSocket in NODE-RED. The motion system is based on a swivel bearing module, which is used in VTOL jets to point the thruster in different directions. I'm just using it to point a fan in different directions. Swivel bearing modules are made up of segments with a sloped face on both ends. When you turn a section, it affects the orientation and position of all the segments above it. You can combine the angles of each of the segments to point the end effector in the position you want.
This project started out with me building a 3D printer. I had gotten a couple of old, broken 3D printers for parts, so I could build my own. It turns out, if you have supplies for three 3D printers, and you're only building one, you're going to have a good bit of extra stepper motors (who knew🤷♂️?). So I started looking for something else to build, and I came across a really cool mechanism made out of Lego, and as you could guess, it was a swivel bearing mechanism. I thought it was really cool, so I started making plans (not really knowing what I would use it for), and decided I could use my abundance of NEMA17s to move the joints. I did some more planning, and after about a week of trying to start designing some basic parts of it, like the shape of the segments, I kind of gave up on it, because I mostly use Tinkercad and rarely Fusion360. I just couldn't figure out how to design the shape of the segments in Tinkercad, so I decided to take a break on this project for a while. A month or two later, I started thinking about this project again, and this time I used the sketch tool and the sweep tool in Fusion360 to make the basic segment shape, and it worked much better. After making the basic shape, I imported it into Tinkercad and started designing the rest of it. Two months later, I had a swivel arm with a "thruster" on the end, which I nicknamed SWAT (swivel arm thruster). I decided I needed to use servos instead of stepper motors, so in the end, I didn't really find a use for my extra NEMA17s 😪.
One thing I learned from this project is that documenting everything well is very important. And so is keeping notes on stuff, like angles of cuts and measurements.
If anyone decides to make this, please let me know! I'd love to see it! Also, feel free to make changes, like adding or subtracting segments, or putting a laser pointer on the end of it, or anything else you think would be fun to add to it! And if you do decide to make it, keep in mind that this design was for fun. It wasn't made to be super precise and stable like an industrial robot arm.
CREDITS!
All 3d modeled parts were designed by me, using Tinkercad and Fusion360, except for the gears, which were made using an awesome parametric generator by Jason Koolman. Here's the gear generator: https://makerworld.com/en/models/1049303
The code was made by me, with some help from ChatGPT.
Supplies
COMPONENTS!
Note: To ensure that the components fit properly, when you come across something in these lists that has a link to other sites, I would advise you to use the ones provided by the links, because ones from other sources might not fit the 3D models correctly.
MG996r Servos with Six Point Star Horn x 5 (I used these ones. They also come with "little rubber M3 adapters"): Deegoo [4-pack] MG996R 55g Metal Gear Torque Digital Servo Motor For Futaba JR RC Helicopter Car Boat Robot
Little rubber M3 adapters for Servos
ESP32 with built-in Bluetooth x 1
Some really long jumper wires for the servos (I'm using 3 ft wires) x 15
Bread Board x 1
Power Supply for the servos (I'm a 5 1.2V NiMH AA batteries) x 1
3D PRINTED PARTS!
Swat Base x 1
Swat Bottom Gear Mount x 1
Swat Bottom Segment x 1
Swat Central Gear x 5
Swat Gear Mount x 4
Swat Idler Gear x 15
Swat Main Segment x 3
Swat Servo Horn Hub x 5
Swat Top Segment x 1
Connector Pegs (short) x 22
Connector Pegs (long) x 6
SWAT Propeller Segment (top) x 1
NUTS AND BOLTS!
12mm M3 bolts x 35
10mm M3 bolts x 18
TOOLS!
3D Printer (very important)
M3 Allen wrench
Needle nose pliers (optional, but they can be helpful for holding nuts while tightening screws)
A rubber mallet (optional but helpful)
OTHER THINGS!
6mm Airsoft BBs x about 450-500
Filament x How much you need depends on your printing settings, but I used around 1500g
Ball Bearings x 6. They need to have a thickness of 4mm, an outer diameter of 12mm, and a bore of 8mm.
Downloads
Printing Parts
First, you need to print all of the parts on a 3D printer. I'm mostly using PLA+, but some parts are made of PLA, like the base. Either filament works for all parts, though PLA+ is stronger.
Printing settings
I printed all the parts except for the base, the bottom segment, the fan, and the bottom gear mount with 2 walls, 5% infill (gyroid), 4 top layers, and 3 bottom layers, with a layer height of 0.2mm for quality and weight. You don't want the arm to be so heavy that the motors can't turn the segments.
The base, bottom segment, and bottom gear mount were printed with 3 walls, 15% infill (gyroid), 4 top layers, and 3 bottom layers with a layer height of 0.24mm. These are printed like this because they have to support the weight of the entire upper arm, so they have to be pretty strong.
I printed the fan with 1 wall, 0 infill, 2 top layers, and 2 bottom layers.
A good bit of these pieces will need supports, so don't forget to hit that support generation button.
Install Servos in Main Segments
Now we're going to use four 12mm bolts (and nuts) to secure the servos in place. Make sure the little rubber M3 adapters are on the servo, or the servo won't be secure. It's best to take the servo horn off during this step. Stick the servo wires through the hole in the back of the segment.
Assemble the Main Gear
Get the main gear piece and the servo horn hub, face the little six point star indentation away from the gear, and use three 10mm bolts to secure the hub to the gear.
Connect the Main Gear to the Segment
The main segment pieces have 8 holes on the side opposite the servo, and the main gear piece has eight hex rods sticking out of it. Take the main gear, line the rods up with the holes on the segment piece, and use a rubber mallet to hammer them together. After you've done that, put some airsoft BBs in the circular groove around the gear.
Note-you might have to widen the edge of the holes on the main segment piece, depending on your print quality (elephant footing, which is where the nozzle is too close to the bed, can cause initial layers to be a bit too big). I just put the end of my needle-nose pliers in the hole and spun it around a couple of times.
Assemble the Gear Mount
Now that we have a basic segment, we need a way to attach it to other segments and keep it in place. Take the gear mount and place it against the side of the segment with the gear on the end. Make sure the groove in the gear mount is facing the segment so the BBs fit into the groove. After you've done this, take the three idler gears and install them in the gear mount using three 12mm bolts (make sure the idler gears are all meshing with the main gear correctly!).
Congratulations! You finished one full segment! If you've noticed that the gear mount wiggles a bit when it's installed onto the main piece, don't worry, it's normal. When you attach segments together, it will stabilize them and remove most of the wiggle.
Now, repeat steps 2-5 two times so you'll have three segments.
Adding Connector Pegs
Now that you have three segments, it's time to prepare to attach them together! Do you see the 4 little hex holes on the bottom side of each of the segments? Hammer 4 connector pegs (short) into those holes.
Attaching Segments 1, 2, and 3
You've made it so far! I hope my instructions have been clear enough! This is the trickiest part yet, so hold on! We need to align the servos to the middle position before we attach the segments together. If we don't, the arm won't home properly, and your arm might not be able to point in some directions.
First: Wire your servo to your ESP32. Connect the signal pin on the servo to pin 13, then connect the GND and 5V pins on your servo to your 5V power supply, and connect the power supply GND and the ESP32 GND.
Second: Align your servo using the alignment sketch below.
Third: Attach the six point star servo horn to the servo with the screw that came with the servo. Make sure it's pointing in the right direction so it will line up with the servo hub on the segment that it will turn.
Fourth: Last of all, take another segment, put it on top of the segment you just calibrated the servo for, line up the hex pegs with the holes, turn the top piece so it's facing the opposite direction of the bottom piece, and hammer the two pieces together. Now you have two segments attached to each other! Softly turn the top segment to make sure the servo is properly situated in the hub. You should feel a little bit of resistance and hear a whirring noise. Don't turn it too far! Only turn it up to 90 degrees in each direction!
Repeat steps 1-3 with the last servo, and attach it to the bottom of the other two. Make sure they're lined up properly! if they are, it should look like the photo at the top of this step.
Install a Servo in the Base
Install a servo in the base exactly how you installed servos in the main segments. Use four 12mm M3 bolts and nuts to secure the servo. Make sure you have the M3 adapters in the servo! Put the servo wires out of the hole in the side of the base once it's installed.
Install Bottom Segment Servo
Same thing here, except with the bottom segment!
Assemble Main Gear
Same as step 3! Just screw the servo hub onto the gear piece with three 10mm bolts and screws.
Attach Main Gear to Bottom Segment
This step is the same as step 4. Just hammer the main gear piece with a servo hub attached to it onto the bottom segment, then put some airsoft BBs in the groove.
Attaching Bottom Gear Mount
No surprises here! This step is the same as step 5! Make sure the idler gears are oriented in the right direction, or they won't fit in the mount. Also, make sure you use the bottom gear mount, not the regular gear mount.
Install Segment Onto Arm
Now, hammer four short connector pegs into the top of the bottom segment, and then connect it to the other three segments. Just as before, make sure you use the sketch provided earlier to center the servo to 90 degrees before you attach the new segment. If it's not centered, your arm's movement will be limited, and it won't home properly.
Tip: Make sure to install the screw that holds the servo horn on the servo.
Install the Base
Congratulations! You've come so far! Next, we will install the base, which will allow it to turn side to side. Hammer six of the long connector pegs into the holes in the base, center the servo at 90 degrees the same way you have with all the other segments, attach the horn with a screw, then attach the base to, well, the base of the arm. Again, make sure your servo is centered at 90 degrees before attaching it to the rest of the arm.
Time to Bust Out the Super Glue!
As the title hints, it's time to glue the segments together with super glue! Use the super glue to glue the pieces that are attached to the segments with pegs to the segment. Don't glue the gear mounts to the main gears! If you do that, your arm will be glued in place! A good rule of thumb is, if you have two parts next to each other that move together, like a gear mount attached to the bottom of a segment, it's good to glue; if they don't move with each other, leave them be! Try to get the glue in between the parts you are gluing together.
Note: You might need to brace the arm to get the segments to stay flush with each other as it's gluing. I had to do this with the base and the bottom gear mount (2nd picture).
Take a Minute to Step Back and Congratulate Yourself!
Congratulations! You're almost done assembling the arm! Only one segment to go!
Install the Fan Segment
First, just like all the other segments, install the main gear onto the top segment, but this time install the open servo horn hub.
Second, again, like the other segments, install the main gear mount and idler gears. Don't forget the BBs!
Third, install it onto the top of the arm, the same way you did the other segments (with the short connector pegs, superglue, and making sure that the servo is centered at 90 degrees first).
Install the Fan
You're so close to being done assembling the arm!!! Put the SWAT Fan on the N20 motor, then slide the N20 motor into place on the fan mount and zip tie it down. Then, use 6 of the short connector pegs with super glue to install the fan mount onto the top of the arm.
Extra Stabilization
It's probably not the greatest if your arm falls over when it's trying to cool you down on a hot summer day, so take a plank of wood, and screw it down to the wood with six screws. There are six holes in the base for the screws. Or, you can just hold yours down with your hand or some big books like me 😅
Finish
Congratulations! You finished assembling the SWAT!
Set Up Remote
To set up the remote, you'll need to have NODE-RED installed on your computer. Simply, upload the flow down below (SWAT Controller Flow.json) to NODE-RED, and open the NODE-RED dashboard. Your computer should now be able to connect to your ESP32 through WiFi! When you move the joystick, the X and Y values get sent from your computer to the ESP32 over WiFi, and when you press a button, it sends a message, and depending on which message the ESP32 receives, it will move the servos or motor in the corresponding way.
How to use the remote!
If you move the joystick sideways, the arm will turn, and if you move the joystick forward and back, the arm will tilt the fan forward and back.
If you press HOME, it will bring all the servos to their home position (90 degrees), which will make the arm point straight up
SISO stands for Segment Isolation. If you press SISO, it'll make the bottom segment stay in place while you move all of the other ones. If you press it again, it'll keep the 2 bottom segments still. If you press it three times, it'll keep the 3 bottom segments still (you get where this is going, right?). The SISO UP button undoes the actions of the SISO DOWN button.
FLOW⬇️
Downloads
Wiring the Arm
First: Connect the GNDs and 5V pins of all the servos to the GND and 5V pins of your power supply.
Second: Add a jumper wire that connects the power supply GND to the ESP32 GND.
Third: Wire the signal pins for the servos like so. Base servo: 13 Second servo: 12 Third servo: 14 Fourth servo: 27 Fifth servo: 26
Fourth: Wire the fan to the power supply's GND and 5V.
Upload the ESP32 Sketch
As the title suggests, copy and paste the code below into Arduino IDE. Before you upload it to your ESP32, make sure you fill in the spots that I left blank. After you've properly completed customizing the code, upload it your ESP32.