added posts up to 2017

This commit is contained in:
Matthew Tran 2023-07-07 01:55:52 -07:00
parent c43de3f880
commit 3a7baa3cff
86 changed files with 521 additions and 12 deletions

View File

@ -17,6 +17,6 @@ Manufacturing the blade was easily the hardest part of the entire project. I wan
Somehow I didnt take any pictures of this lightsaber by itself before it hit the scrap bin. Heres what I do have. Somehow I didnt take any pictures of this lightsaber by itself before it hit the scrap bin. Heres what I do have.
![](/assets/img/2015/lightsaber-v1.jpg) {% include figure image_path="/assets/img/2015/lightsaber-v1.jpg" %}
{% include video id="EBRMI2jJulM" provider="youtube" %} {% include video id="EBRMI2jJulM" provider="youtube" %}

View File

@ -15,7 +15,7 @@ Immediately after finishing v1, I decided to build another lightsaber. Of course
Just like v1, I stuck to using a chrome sink tube for the hilt. Mechanically speaking, the hardest part would be attaching the two side blades to form the crossguard. I didnt really have the tools nor the knowledge to make a very secure connection. After some trial and error screwing around with PVC on a band saw and drilling some holes, I had a surprisingly sturdy connection. Ill admit I also used a good amount of hot glue. Just like v1, I stuck to using a chrome sink tube for the hilt. Mechanically speaking, the hardest part would be attaching the two side blades to form the crossguard. I didnt really have the tools nor the knowledge to make a very secure connection. After some trial and error screwing around with PVC on a band saw and drilling some holes, I had a surprisingly sturdy connection. Ill admit I also used a good amount of hot glue.
![](/assets/img/2016/lightsaber-v2-hilt.jpg) {% include figure image_path="/assets/img/2016/lightsaber-v2-hilt.jpg" %}
Next up was figuring out the blades. v1 used a 3/4″ ID, 1″ OD polycarbonate tube which is really heavy. While it provided durability, I reasoned that I wasnt designing my lightsabers to duel with, so a 7/8″ ID, 1″ OD tube would work just as well while also cutting down significantly on weight. Mounting the blades was also a challenge because I didnt really have the tools to make a precise 1″ hole. I ended up using a bunch of masking tape and screws to hold the blades securely. Next up was figuring out the blades. v1 used a 3/4″ ID, 1″ OD polycarbonate tube which is really heavy. While it provided durability, I reasoned that I wasnt designing my lightsabers to duel with, so a 7/8″ ID, 1″ OD tube would work just as well while also cutting down significantly on weight. Mounting the blades was also a challenge because I didnt really have the tools to make a precise 1″ hole. I ended up using a bunch of masking tape and screws to hold the blades securely.
@ -27,11 +27,11 @@ With the sound figured out, I moved onto the blade. I wanted to make a Makoto Ts
The circuit board housing all the electronics was really nothing special. I remember making a PCB for it but used Sharpie as an etch resist because the toner transfer method just didnt work. Everything was stuffed into the hilt. The circuit board housing all the electronics was really nothing special. I remember making a PCB for it but used Sharpie as an etch resist because the toner transfer method just didnt work. Everything was stuffed into the hilt.
![](/assets/img/2016/lightsaber-v2-electronics.jpg) {% include figure image_path="/assets/img/2016/lightsaber-v2-electronics.jpg" %}
It took a bit of effort, but heres the finished lightsaber v2. Somehow, I literally didnt take any pictures of it by itself. It took a bit of effort, but heres the finished lightsaber v2. Somehow, I literally didnt take any pictures of it by itself.
![](/assets/img/2016/lightsaber-v2-three.jpg) {% include figure image_path="/assets/img/2016/lightsaber-v2-three.jpg" %}
{% include video id="E7cj5idGys4" provider="youtube" %} {% include video id="E7cj5idGys4" provider="youtube" %}

View File

@ -28,7 +28,7 @@ The interesting part of the design was my strategy for doing the dice. Initially
Later on in the school year, I noted that all of the dice were by default ones side facing up. On any standard dice, this meant that the six side was facing down. Thus, to get all the dice six side facing up I just needed to flip them all. Keeping in mind the limitations of what my arm could manipulate, I came up with the idea of using a clear sheet of plastic with tape laid over it sticky side out. At first I tried placing the sheet over all the dice, but that had consistency issues. The strategy that worked just about every time was placing the sheet down, placing the dice on top of it, and then flipping the whole thing over to get all sixes. Later on in the school year, I noted that all of the dice were by default ones side facing up. On any standard dice, this meant that the six side was facing down. Thus, to get all the dice six side facing up I just needed to flip them all. Keeping in mind the limitations of what my arm could manipulate, I came up with the idea of using a clear sheet of plastic with tape laid over it sticky side out. At first I tried placing the sheet over all the dice, but that had consistency issues. The strategy that worked just about every time was placing the sheet down, placing the dice on top of it, and then flipping the whole thing over to get all sixes.
![](/assets/img/2016/robot-arm-2016-dice.jpg) {% include figure image_path="/assets/img/2016/robot-arm-2016-dice.jpg" %}
## Electrical ## Electrical
@ -44,7 +44,7 @@ One problem that showed up during the year was that the claw motor would randoml
Before even considering competing at Nationals, I had to first compete at Troy SciOly team tryouts. Right after I finished the arm, I pretty much practiced whenever I could. After about 10 tries, I was able to get a max score. Then I just kept working to be faster and more consistent. Before even considering competing at Nationals, I had to first compete at Troy SciOly team tryouts. Right after I finished the arm, I pretty much practiced whenever I could. After about 10 tries, I was able to get a max score. Then I just kept working to be faster and more consistent.
![](/assets/img/2016/robot-arm-2016-first.jpg) {% include figure image_path="/assets/img/2016/robot-arm-2016-first.jpg" %}
Eventually tryouts came along. With regards to Troy SciOly, I was just that kid who went to Muscatel. I didnt have a reputation yet. I stood there at tryouts looking at all the other robot arms people built. It was safe to say I was a bit intimidated. I still remember everyone asking me, “Are you going to beat Jared?” He was more or less the engineer guy at SciOly at the time. Not wanting to be even more nervous after watching everyone, I went first. My heart was beating out of my chest during that entire 3 minute run. At the end of it, I had a max score. While everyone else went, I was still nervous because I didnt consider what I did to be that impressive. After everyone went, I realized I had won. I was in the team. Eventually tryouts came along. With regards to Troy SciOly, I was just that kid who went to Muscatel. I didnt have a reputation yet. I stood there at tryouts looking at all the other robot arms people built. It was safe to say I was a bit intimidated. I still remember everyone asking me, “Are you going to beat Jared?” He was more or less the engineer guy at SciOly at the time. Not wanting to be even more nervous after watching everyone, I went first. My heart was beating out of my chest during that entire 3 minute run. At the end of it, I had a max score. While everyone else went, I was still nervous because I didnt consider what I did to be that impressive. After everyone went, I realized I had won. I was in the team.
@ -52,7 +52,7 @@ Eventually tryouts came along. With regards to Troy SciOly, I was just that kid
Throughout the year, my robot arm performed admirably. I even got 1st at the State competition. However, due to how well the arm performed and how much work my Electric Vehicle needed, I made virtually no functional changes to the arm since October. I did keep on practicing and practicing until I consistently got max scores with the dice tiebreaker in about 2min 15s. At the national competition, I got yet another perfect run. However, like I said before the task was very simple so I ended up only getting 5th. Considering my arm only cost $400 and I built it back in October, I was pretty satisfied. Throughout the year, my robot arm performed admirably. I even got 1st at the State competition. However, due to how well the arm performed and how much work my Electric Vehicle needed, I made virtually no functional changes to the arm since October. I did keep on practicing and practicing until I consistently got max scores with the dice tiebreaker in about 2min 15s. At the national competition, I got yet another perfect run. However, like I said before the task was very simple so I ended up only getting 5th. Considering my arm only cost $400 and I built it back in October, I was pretty satisfied.
![](/assets/img/2016/robot-arm-2016-nats.jpg) {% include figure image_path="/assets/img/2016/robot-arm-2016-nats.jpg" %}
Heres a couple pictures of the robot arm. Since we had to document everything, I actually have pictures of it. Heres a couple pictures of the robot arm. Since we had to document everything, I actually have pictures of it.

View File

@ -19,7 +19,7 @@ Coming in from rotation during the SciOly 2016 season was Electric Vehicle. The
Being the clueless sophomore I was, I started out completely focused on accuracy. I really didnt know anything about proper mechanical design or what factors to consider. The most precise motor is generally a stepper motor, so I started with that. I threw 4 of them onto an MDF baseplate along with an Arduino Mega and some stepper drivers. Heres the result: Being the clueless sophomore I was, I started out completely focused on accuracy. I really didnt know anything about proper mechanical design or what factors to consider. The most precise motor is generally a stepper motor, so I started with that. I threw 4 of them onto an MDF baseplate along with an Arduino Mega and some stepper drivers. Heres the result:
![](/assets/img/2016/electric-vehicle-2016-v1.jpg) {% include figure image_path="/assets/img/2016/electric-vehicle-2016-v1.jpg" %}
I remember bringing v1 to Troy to do some testing. It was decently accurate, but far from enough to account for its slowness. Mr. Wahl even commented on how slow it was. It was pretty clear that I needed something much faster. I remember bringing v1 to Troy to do some testing. It was decently accurate, but far from enough to account for its slowness. Mr. Wahl even commented on how slow it was. It was pretty clear that I needed something much faster.

View File

@ -21,7 +21,7 @@ With the coil and sensor assembly done, I got to work on the control electronics
After a bit of coding and screwing things together, I finished assembling v3. For safety, I made sure to implement a max on time for the coils. Heres the one picture I took of it. After a bit of coding and screwing things together, I finished assembling v3. For safety, I made sure to implement a max on time for the coils. Heres the one picture I took of it.
![](/assets/img/2016/coilgun-v3.jpg) {% include figure image_path="/assets/img/2016/coilgun-v3.jpg" %}
Heres a video of me testing how fast it could shoot. I just let the bullet fall back down to the first stage so the coil gun would send it flying back up again. Heres a video of me testing how fast it could shoot. I just let the bullet fall back down to the first stage so the coil gun would send it flying back up again.

View File

@ -29,7 +29,7 @@ For our Physics 2 project, we each had to build a wooden tower based off the yea
Since this was my first tower, I based my design off of other towers. I pretty much just drew a couple lines on paper so that the bottom was wide enough to stretch across the square in the test apparatus and the top would fit the loading block. For the cross bracing I just drew lines at an equal spacing so that the Xs formed were roughly smooshed squares. Since this was my first tower, I based my design off of other towers. I pretty much just drew a couple lines on paper so that the bottom was wide enough to stretch across the square in the test apparatus and the top would fit the loading block. For the cross bracing I just drew lines at an equal spacing so that the Xs formed were roughly smooshed squares.
![](/assets/img/2016/tower-drawing.png) {% include figure image_path="/assets/img/2016/tower-drawing.png" %}
If I remember correctly, it had to be 50cm tall and stretch across a 20cm square hole. Rotating the tower 45° enabled making the bottom slimmer, so I could make it about 15cm wide instead of 20cm. If I remember correctly, it had to be 50cm tall and stretch across a 20cm square hole. Rotating the tower 45° enabled making the bottom slimmer, so I could make it about 15cm wide instead of 20cm.
@ -37,7 +37,7 @@ If I remember correctly, it had to be 50cm tall and stretch across a 20cm square
With a design finished, I proceeded to building the tower. The first step was picking the wood. I picked wood based on my intended mass of around 8g to balance maximum possible efficiency and availability of high quality balsa sticks. After a bit of searching through the piles of balsa sticks we were provided, I identified a couple 1.5g 1/8″x1/8″x36″ sticks for use as the main supporting structure and a couple of 0.5g 1/16″x1/6″x36″ sticks for the cross bracing. Next, I set up my kitchen countertop (flattest table I had) to make a tower. With a design finished, I proceeded to building the tower. The first step was picking the wood. I picked wood based on my intended mass of around 8g to balance maximum possible efficiency and availability of high quality balsa sticks. After a bit of searching through the piles of balsa sticks we were provided, I identified a couple 1.5g 1/8″x1/8″x36″ sticks for use as the main supporting structure and a couple of 0.5g 1/16″x1/6″x36″ sticks for the cross bracing. Next, I set up my kitchen countertop (flattest table I had) to make a tower.
![](/assets/img/2016/tower-setup.jpg) {% include figure image_path="/assets/img/2016/tower-setup.jpg" %}
To stick pins into and provide a backboard, I used some foam poster board I had from awhile back. It wasnt particularly flat, so I used some weights to hold it flat while I taped it to the table. For glue, I used the gel Gorilla Glue superglue because its thicker and fast drying. Theres specialized superglues out there but I didnt bother. For its sharpness, I used an X-ACTO knife. To stick pins into and provide a backboard, I used some foam poster board I had from awhile back. It wasnt particularly flat, so I used some weights to hold it flat while I taped it to the table. For glue, I used the gel Gorilla Glue superglue because its thicker and fast drying. Theres specialized superglues out there but I didnt bother. For its sharpness, I used an X-ACTO knife.

View File

@ -13,7 +13,7 @@ Coming into the SciOly 2017 season, the biggest change made to Electric Vehicle
Keeping in line with my desire to make the user experience with the vehicle as simple as possible, I kept the laser sighting system. To aim it, I would just aim to the right of the cans to account for the curvature of the path. After a lot of test trials, I was able to get the vehicle relatively accurate. Keeping in line with my desire to make the user experience with the vehicle as simple as possible, I kept the laser sighting system. To aim it, I would just aim to the right of the cans to account for the curvature of the path. After a lot of test trials, I was able to get the vehicle relatively accurate.
![](/assets/img/2016/ev2017.jpg) {% include figure image_path="/assets/img/2016/ev2017.jpg" %}
At tryouts, the vehicle failed spectacularly. The one thing I failed to account for was the quality of the surface. The floors in our science building were notoriously dirty, which drastically reduced the coefficient of friction. This led to the steering not working at all and the vehicle headed straight into a wall. For reference, I had calibrated my vehicle for a clean hardwood gym floor like what we usually see at competition. This is a prime example of when optimizing for competition instead of just getting past tryouts really didnt work. At tryouts, the vehicle failed spectacularly. The one thing I failed to account for was the quality of the surface. The floors in our science building were notoriously dirty, which drastically reduced the coefficient of friction. This led to the steering not working at all and the vehicle headed straight into a wall. For reference, I had calibrated my vehicle for a clean hardwood gym floor like what we usually see at competition. This is a prime example of when optimizing for competition instead of just getting past tryouts really didnt work.

View File

@ -0,0 +1,166 @@
---
title: Robot Arm 2017
date: 2017-05-20
categories: projects school scioly
excerpt: Tasked with the manipulation of stacks of pennies, I went through 4 revisions of robot arms before I had one good enough for the National competition.
header:
teaser: /assets/img/2017/robo2017-v4.jpg
gallery:
- image_path: /assets/img/2017/robo2017-v3-1.jpg
- image_path: /assets/img/2017/robo2017-v3-6.jpg
- image_path: /assets/img/2017/robo2017-v3-2.jpg
- image_path: /assets/img/2017/robo2017-v3-5.jpg
- image_path: /assets/img/2017/robo2017-v3-3.jpg
- image_path: /assets/img/2017/robo2017-v3-4.jpg
gallery2:
- image_path: /assets/img/2017/robo2017-v4-4.jpg
- image_path: /assets/img/2017/robo2017-v4-7.jpg
- image_path: /assets/img/2017/robo2017-v4-8.jpg
- image_path: /assets/img/2017/robo2017-v4-1.jpg
- image_path: /assets/img/2017/robo2017-v4-5.jpg
- image_path: /assets/img/2017/robo2017-v4-6.jpg
- image_path: /assets/img/2017/robo2017-v4-3.jpg
- image_path: /assets/img/2017/robo2017-v4-2.jpg
---
<sub>Written 9-29-19</sub>
Coming into the SciOly 2017 season, it was clear that the rules had completely changed from the previous year. Last years task was easy enough that pretty much everyone at Nationals got a max score. Just looking at the new task, I could tell that perfect scores would be incredibly hard to come by. This year there would be 5 stacks of 10 pennies each placed around an archery target, all initially heads up. To maximize our score, we had to flip all the pennies, spread them out so theres no overlap, and then push them as close to the center of the target as possible.
## v1
Since I initially wanted to focus on the end effector design, I started out by modifying my robot arm from last year. The new rules required a longer reach and smaller base, so I started by cutting down last years base and extending the arm by a bit. Since the base was so small, I couldnt use the 10 lb. dumbbell from before. I ended up cutting several steel sheets to make a 10 lb. stack. My ears were ringing after using the angle grinder for so long but it worked out. Decent ear protection was quickly added to my toolbox.
### End Effector
Next up was the end effector. My idea was to create a sort of cylinder that could be placed over a stack of pennies. Then I would pinch the bottom penny to hold the stack in place. From there Id lift the whole stack above the ground, flip it over, and dump the contents onto the archery target. Then Id go in and spread the pennies out so that they dont overlap.
One interesting part of designing the end effector was making a linear actuator to get the servo to pinch parts. Because of the size restrictions, I designed the rail myself. Getting the tolerances good enough to balance friction and backlash took some trial and error. I attached it using superglue and later used acetone.
### Parallel Mechanism
Next, I modified the arm to make the end effector parallel to the ground at all times. This would make it far easier to reliably pick up stacks of pennies. Im still not completely sure what the exact name of the mechanism is, but I call it a parallel mechanism. I built one a couple years ago, but I never understood why it worked. Upon closer inspection and experimentation with my Vex parts, I realized how simple it was. Essentially build two linked parallelograms. The offsets for the linkages were chosen to ensure proper operation over the entire range of motion.
{% include figure image_path="/assets/img/2017/robo2017-v1.jpg" caption="Only pic I took" %}
Testing the arm out, it was safe to say that it did not perform very well. It certainly could pick up every stack of pennies and flip them over. However, dealing with overlapping pennies and moving them around took too much time. It also felt more like a last minute hack than an actual solution to the problem. Still, the things I learned from this arm paved the way for v2.
## v2
With v2, I decided to completely do away with the parallel mechanism design. The task didnt really involve manipulating objects in 3D space, except for maybe moving pennies up and down. After some research, I decided to use a SCARA design, which works really well with 2D workspaces. It would also lessen the load on the motors since they didnt really have to carry anything, just move things side to side.
### End Effector
Before implementing the SCARA design, I needed to revamp the end effector design. The main issue was quickly spreading out the pennies without overlap. My head coach Mr. Wahl had the brilliant idea of having a single penny thick slot at the bottom of the tube that could let pennies out one at a time when dragged across a surface. The prototype worked absolutely perfectly, so I went with it. I was worried about the coefficient of friction at first, but a quick jolt gets all the pennies to slide out, so it works.
{% include figure image_path="/assets/img/2017/robo2017-v2-end.jpg" %}
Heres the finalized end effector. The slot at the bottom is two sided, so pennies would only exit in one axis. Two servos control flipping the entire container over and changing its rotation. Another servo on the container holds the penny stack in place so that it doesnt fall back out when flipping. Yet another servo uses a string to lift and lower the container. As you can probably tell, I used quite a few servos, but my controller design made it all relatively intuitive.
### SCARA
Next up was attaching the end effector to an arm. Since I didnt yet have experience in making stiff 3D printed parts, I just used some fiberglass and carbon tubes. The “shoulder” joint was constructed with a Vex motor and potentiometer like last year. After some PID tuning, it worked rather well. Motor choice for the “elbow” joint, which was heavily limited by space, proved tricky but I found a workable servo. The issue was that servos typically arent tuned for high inertial loads, so there were oscillations.
{% include figure image_path="/assets/img/2017/robo2017-v2.jpg" %}
Score-wise this robot arm was a vast improvement from v1. I really liked trying out a completely new arm design. However, the biggest issue was getting enough reach out of the arm with my at the time amateur design skills. The arm really pushed the size limits of the rules, which is something I dont like doing. Joint stiffness was also an issue as the arm tended to curve at medium extension. Overall, the arm worked well, but it didnt feel reliable or clean enough to take to Nationals.
## v3
Dissatisfied with v2, I started work on yet another arm. With more CAD experience behind my belt, I got to work designing an almost entirely 3D printed arm. I intended for this arm to be the culmination of everything I learned from v1 and v2, fixing everything from reliability to usability to aesthetics and more.
### End Effector
Since I knew v2s end effector was pretty reliable, I didnt spend too much time redesigning the end effector. In fact, if I remember correctly, I literally took the v2 end effector and slapped it onto v3 when I was done and took that to tryouts. The only real change I made was gluing on an arc to aid in moving pennies around.
{% include figure image_path="/assets/img/2017/robo2017-v3-end.jpg" %}
### Parallel Mechanism (Again)
My main focus for this robot arm was improving accuracy and speed of the joints. I liked the SCARA design, but at the time lacked the mechanical know-how to implement it more effectively. Knowing exactly how the parallel mechanism worked by this point, I started off with motor choice and torque calculations. Since I needed the precision, I used some stepper motors I had lying around for the turret and shoulder joints. Due to still not having enough torque and some backlash issues, I added some rubber bands. The elbow joint was trickier because of the high inertial load like with v2, but after going through 3 or 4 servos I found one that worked.
{% include gallery %}
The arm performed very admirably. Scores werent vastly improved from v2, but usability, flexibility, and reliability improved. Still, I was not satisfied with the rubber bands and the oscillations caused by the servo motor in the elbow joint. The end effector also had a bit of friction and was not the most pleasant to use. Overall, it performed very well, but there were so many little things I wanted to improve. What it did do was cement the design I would use for the final iteration.
## v4
During winter break, I decided to completely redesign the arm. v3 performed well at tryouts but I knew it wasnt good enough for Nationals. With a lot of experience under my belt, I listed out all of the problems in the previous arms and immediately got to work.
### End Effector
Surprisingly, I actually ended up working on the end effector later in the year but it proved the most important thing to upgrade.
#### Knife Ramp
One issue that popped up while using v3 was that the servo used to hold the bottom of the penny stack broke after awhile. I was basically stalling the servo to provide a pinching force, which likely damaged the cheap motor controller. While I did upgrade to a name brand servo, I still wanted to ensure the problem would never show up again. Wanting to exercise my knife sharpening skills, I came up with the idea to make a steel ramp that would slide under the penny stack. It worked very well.
{% include video id="rCeLL677wQQ" provider="youtube" %}
#### Omnidirectional Penny Slide
From a usability point of view, I didnt like how the pennies could only slide out in two very specific directions. There was also a decent amount of friction that caused me to mess up sometimes. To fix this, I made the slot omnidirectional, letting pennies slide out in any direction. I did add a couple arcs to aid in pushing pennies around which restricted some motion, but overall there was a lot more wiggle room. Also, bearings vastly improved the smoothness of the sliding.
#### Stiffness Improvements
An issue that popped up during testing was that under too much pressure, the end effector mount would flex. One end of the end effector would lift up a bit, making picking up stacks difficult. To fix this, I added a shaft on the opposite end of the flipper servo to support the end effector on both sides. Making room for the shaft did take a bit of redesigning to ensure it didnt interfere with other parts.
#### Suspension
During one of the invitationals, I learned that the arm was actually strong enough to lift the front of its base off the ground. Sometimes this also put the end effector out of alignment. To fix this, I added a weight at the front, negating any leverage the arm had with respect to the base. This worked, but created a new problem. The stepper motors in the joints would skip steps when pressed against the ground, which I did quite often. To ensure I wasnt applying too much pressure and have a visual cue for that, I designed a suspension system.
Since I didnt have much space or weight to work with, I experimented with 3D printed parts, pen springs, and aluminum shafts. I ran out of #4-40 set screws, so I designed some tight fitting clips made of PETG as clips to hold the aluminum shafts in place. Two springs provided just the right amount of feedback to work well. My favorite part was the igus-style PLA linear bearings I printed. It took some trial and error with the scaling, but eventually I got the bearings to slide smoothly.
#### Laser
This doesnt really need its own subheading but yes I did add a laser to help with stack alignment 😁. To comply with SciOly safety rules, I used a Class II laser module.
{% include figure image_path="/assets/img/2017/robo2017-v4-end.jpg" %}
### Mechanical Design
Looking back at the design of the arm, I am still somewhat astounded that I didnt use any assemblies in CAD to model it. The dimensions and relation of every part was done on paper and then modeled in Fusion 360. This does explain some of the bulkiness and slight design flaws of the arm though.
To improve accuracy and precision, I switched all of the high load joints to stepper motors and optical quadrature encoders. Since I didnt want to run two stepper motors together like in v3, I switched to a single NEMA 23 motor for the shoulder. To lighten the arm and make room for the encoder, I moved the elbow motor to the base, using a similar parallelogram mechanism to transfer the force. Due to not having good places to mount the encoders directly to the shafts, I used some timing belts to couple them to the turret and shoulder shafts.
#### 3D-Printed Planetary Gearbox
Since stepper motors dont directly have enough torque to drive the arm, I had to use a gearbox to increase the torque. Doing some calculations, I needed around a 4:1 or 5:1 gear ratio. This meant a planetary gearbox would likely work best. The issue was the size constraints I was dealing with. Most stepper motor gearboxes were taller than they were wide, but I needed a flatter gearbox. Wanting to learn how to print custom gears, I decided to try my hand at designing one myself.
Doing some research, I chose to use herringbone gears for their high load, low noise capabilities. The issue was that these gears arent natively supported in Fusion 360, but theres a [plugin](https://apps.autodesk.com/FUSION/en/Detail/Index?id=9029586664984391977&appLang=en&os=Win64). To make a herringbone gear, I just made two helical gears that were mirrors of each other and combined them. The ring gear was a little trickier due to tolerances, but I found that scaling the gear up by about 1.01 provided a perfect fit with the planet and sun gears. The gearbox was layered, including separating the ring gear into two helical gears, to aid in assembly.
#### Structure
Structurally speaking, I started by reusing the 10 lb. sheet steel base. Since v3 had stiffness issues, I switched to using carbon fiber tubes for the arm material. Instead of drilling holes in the tubes, I designed clamps to mount them. Favoring modularity, I used the same encoders and gearboxes for everything. The parts for the parallel mechanism all used standard skateboard bearings and old aluminum and fiberglass arrows I had lying around. My carbon fiber arrows were reserved for v3, which was being kept as a backup. Everything was pretty much held in place using a screw at some point or another. All the moving parts were supported by bearings and hardened steel shafts. Looking back, most of these parts actually came from me wanting to build a 3D printer during the next summer.
{% include figure image_path="/assets/img/2017/robo2017-v4-structure.jpg" %}
### Electronics
With the mechanical designed worked out, I got to work on the electronics. The first step was to pick stepper drivers. One issue I ran into with v3 was that the cheap DRV8825 drivers I was using broke often, likely due to having a high load and bad cooling. Coupled with the fact that the NEMA 23 motor I was using needed about 4.5A, far higher than the 2A limit of the DRV8825, I definitely needed to look for new stepper drivers. Looking on Amazon, I learned about the popular TB6600 board. After much trial and error, I found out that the standard cheap design couldnt supply above 2A, which was only ok for the NEMA 17 powered joints. Eventually I learned that buying the board that didnt look as professional was the one that could actually supply 4A.
One issue I had with v3 was processor speed, which was due in part to my relative lack of coding experience at the time. To fix this, I bought the fastest Arduino supported board on the market at the time, the Teensy 3.6. It has interrupts on all pins, so I could hook up multiple encoders without worry. It was also blazingly fast, so I didnt have to worry about analog reads and calculations.
Wire management was also pretty interesting since I didnt account for it in the mechanical design. I really liked how I fit the wires for the end effector inside the carbon tubes. For the rest of it, I just used a bunch of zip ties and cut wires exactly to length.
### Putting It All Together
Heres some pics of the completed robot arm. I did make some changes over the course of the year, like trying out new materials like PETG and Alloy 910. I also made a bunch of backup parts.
{% include gallery id="gallery2" %}
## Competition
At Nationals, my heart was racing during the entire 3 minute run. Despite my countless hours practicing and improving the robot, I was still nervous. At the end of it, I was left with a sense of accomplishment and a 2nd place medal. The task was far more difficult than last year, so I was glad that I could still compete with the best of the best. Whats pretty cool is that Nationals was held at Wright State University in Dayton, Ohio, which was where it was held when I was in 7th grade, so a lot of great memories came back.
Earlier in the year, Troy went to the Golden Gate SciOly invitational at Berkeley. It was held at the same time as our Regional competition, so we sent our B team there. They didnt have a robot arm to use, but thankfully I hadnt taken apart v3 yet. With only the night before to learn about the arm and practice using it, they got 1st! I saw that as an absolute win.
Anyways, heres a video of my run at Nationals.
{% include video id="1560xrgF_hw" provider="youtube" %}
Heres a video of one of my practice runs earlier in the year. Its better quality, but I did mess up a bit.
{% include video id="srLk5yr19Lk" provider="youtube" %}

View File

@ -0,0 +1,90 @@
---
title: Hovercraft 2017
date: 2017-05-21
categories: projects school scioly
excerpt: What initially seemed simple turned out to be an incredibly fun and rewarding experience. An interesting challenge with a clever solution to match.
header:
teaser: /assets/img/2017/hovercraft-2017-v2.jpg
gallery:
- image_path: /assets/img/2017/hover-2017-v1-cad-back.jpg
- image_path: /assets/img/2017/hover-2017-v1-cad-front.jpg
gallery2:
- image_path: /assets/img/2017/hovercraft-2017-v2-weights.jpg
- image_path: /assets/img/2017/hovercraft-2017-v2-bottom.jpg
gallery3:
- image_path: /assets/img/2017/hovercraft-2017-v2-front-pcb.jpg
- image_path: /assets/img/2017/pcb-tonertransfer.jpg
gallery4:
- image_path: /assets/img/2017/hovercraft-2017-v2-dowel.jpg
- image_path: /assets/img/2017/hovercraft-2017-v2-switch.jpg
---
<sub>Written 9-14-19</sub>
An interesting event that came in during the SciOly 2017 season was Hovercraft. The engineering portion of the event involves building a hovercraft that has a mass of 2kg and can travel a certain distance in a certain amount of time.
## v1
Seeing as the biggest source of points for the hovercraft came from being 2kg, I tackled that issue first. To begin putting together a design, I started by researching the physics behind hovercraft. I wont go into too much detail, but the gist is that air from a motor with attached propeller/impeller is redirected out to the perimeter of the base downward, lifting the hovercraft. Air is trapped underneath the hovercraft as it lifts and is kept there by the fast moving air around the edges. A skirt helps improve lift, hover height, and stability.
The main restriction in the rules involves only being able to use two brushed motors. Technically, brushless motors were allowed in the form of cooling fans, but finding one powerful enough wouldve been a challenge. Its also more fun designing a custom lift system. If I remember correctly, theres an 18cm diameter limit to propellers and they had to be shielded with 1/4″ holes. The base hovercraft size was limited to about 20cmx30cm. With these design requirements in mind, I got to work.
{% include gallery %}
I had only just gotten started in CAD and 3D printing so my design was bulky and not particularly well thought out, but it worked. After printing it out, I slapped on some motors, shielding, and steel BB weights and got to testing. Eventually after a bunch of testing and stacking two 4 blade propellers to make an 8 blade one, I got the hovercraft to lift its mass of 2kg.
{% include figure image_path="/assets/img/2017/hover-2017-v1-weights.jpg" %}
{% include video id="crctNnbew_o" provider="youtube" %}
Easily the biggest issue with this design was its inefficiency. The motor drew around 80A and burned out rather quickly. It was also incredibly loud and barely produced enough lift for 2kg. Also since it hovered about 0.5mm off the ground, there was effectively zero friction, making it harder to control.
## v2
Seeing how poorly v1 performed, once I had enough time I immediately got to working on a new design. This time I used actual designs for real hovercraft with air redirected around the edges and a skirt. I also switched from an axial propeller to a centrifugal impeller. Propellers are good for things like helicopters because they can move a lot of air at a high velocity but perform poorly in a relatively enclosed area with a lot of back pressure. Centrifugal fans perform well in these situations. The CAD files are all over the place, so heres some half assembled pics.
{% include gallery id="gallery2" %}
The impeller design was surprisingly straightforward. I tried a bunch of different combinations of number of fins, diameter, curvature, and angle in order to optimize lift and current draw. Eventually I settled on something like this.
{% include figure image_path="/assets/img/2017/hovercraft-2017-v2-impeller.jpg" %}
After getting the hovercraft to lift its 2kg efficiently, I started working on all the add ons to do the rest of the event.
### Skirt
Although the hovercraft was effectively frictionless already, the hover height was barely perceptible. One of the rules is that to be considered hovering one must be able to press down on one side, let go, and see it rise back up. A 0.1mm gap is very hard to see, so I got to work on a skirt. Using some Tyvek, I put together a very basic skirt to get hover height to about 15mm. I was actually looking for ripstop nylon, but I bought the wrong material. This also had the side effect of making weight balancing much more tolerant and increasing friction with the ground.
### Timer Circuit
Easily the most difficult part of the event was the timing. If I remember correctly, we had to make the hovercraft travel somewhere between 1-2m in 5-25s. The exact distance and time would be revealed at competition. Since hovercraft are effectively frictionless, this made it really hard to be able to adjust the forward thrust to achieve such times. I also had to keep in mind that the hovercraft had to not stop for more than 3 seconds at a time. Even more, microcontrollers werent allowed, only pure transistor logic.
My basic idea was to make the hovercraft oscillate around the starting position and then after a certain amount of time, it would move forward at top speed. After a ton of experimenting with H-bridges, I gave up on the idea of having the thruster go forward and reverse. Eventually, I noticed that friction on the bottom of the hovercraft and the side rails were actually enough to stop the hovercraft given a small starting velocity. This gave me my eureka moment where I realized that I only needed to pulse the thruster forward once every 3 seconds (2.5 to be safe) to keep the hovercraft moving. Friction would stop it between pulses.
To implement my idea, I learned about astable multivibrators since ICs werent allowed. I also designed a delayed pulse generator to turn on the motor after a designated amount of time. Whats really cool was that I got to apply my knowledge of RC circuits from Physics 2 to calculate the correct resistor and capacitor values. I made a prototype on perfboard and later used EAGLE to design a PCB which I made, with barely any success, using the toner transfer method with a clothing iron.
{% include gallery id="gallery3" %}
I dont remember why I used a relay because I used a MOSFET elsewhere to do the motor switching, but it was probably because I didnt know enough about transistor logic at the time. On the other hand, the circuit did work perfectly.
### Front Switch
While competing at the state competition at CalTech, I was devastated to see that my design malfunctioned. The timer circuit wasnt turning on. Immediately following competition, I figured out the issue. In order to determine when to start the timer, I used an IR sensor at the front to see when the starting block was removed. In almost all conditions, including outdoors, the sensor functioned perfectly. However, in the specific room that was used for competition, there mustve been an excess in 900nm IR light or something because the front sensor wasnt working.
In order to ensure this problem would never show up again, I decided to design a mechanical switch to replace the IR sensor. To guarantee that the hovercraft would pass the starting line, which is when timing starts, when the starting block is removed, I made the thruster go full power forward when the block is in front. Propeller inertia would provide a bit of initial thrust. This meant that the front switch had to have a very low actuation force. Doing measurements, I determined it had to be in the range of &lt;50g. For fun and also because I didnt want to find and buy a matching switch, I designed my own.
{% include gallery id="gallery4" %}
The switch made setup a little bit harder but I never ran into the IR issue ever again. To this day I still want to revisit that room at CalTech with an IR camera to figure out what happened.
## Competition
At nationals, my design worked absolutely perfectly. It was about 0.2s off which was as good as I could reasonably expect. I dont remember anyone else having quite as clever a design, but since the concept is relatively simple Im pretty sure other people independently came up with the same design themselves too. After doing my run, one of the proctors shook my hand because of my design. I was pretty happy about it at the time because before I didnt think what I did was that impressive. Later on, I realized that the proctor that shook my hand was actually Dr. Gerard Putz, cofounder of SciOly!
{% include video id="e-ZPYg3Z1aE" provider="youtube" %}
Whats pretty cool is that Mr. Wahl, my head coach for SciOly and amazing teacher, actually used this video of my hovercraft to teach applications of RC circuits in future Physics 2 classes.

View File

@ -0,0 +1,40 @@
---
title: CNC Router
date: 2017-06-01
categories: projects
excerpt: Seeing how much a 3D printer revolutionized my engineering, I decided to design and build my own CNC router.
header:
teaser: /assets/img/2017/cnc-v1.jpg
gallery:
- image_path: /assets/img/2017/cnc-hardware-2.jpg
- image_path: /assets/img/2017/cnc-hardware-1.jpg
---
<sub>Written 9-2-19</sub>
Seeing how revolutionary buying a 3D printer was to how I engineer, I decided to build a CNC router. I had two weeks between the end of the school year and the beginning of my internship to complete this project, so it was quite the squeeze. Before the end of the school year, I put together a list of parts to buy so I could get started quickly.
## Hardware
I dont remember every little part that went into the CNC router, but the construction consists of 20mm aluminum extrusions (go metric!), linear rails (the cheapest ones on Amazon), lead screws, NEMA 23 steppers, and a DeWalt DWP611 router.
My budget was around $700, which I did achieve. However, I had to compromise on stiffness by using 3D printed parts. In the future, Ill replace a lot of the plastic components with aluminum. Still, for a lot of the joints, 3D printed parts proved stiff enough. I designed the CNC router before I learned how to do assemblies in Fusion 360, so there isnt one file that captures the entire thing. Instead, heres a pic of when I completed the hardware.
{% include gallery %}
## Electronics
Since I initially wanted to build a 3D printer, I had a RAMPS 1.4 board and Arduino Mega so I used that. Since I was using NEMA 23 steppers, I couldnt use standard DRV8825 or A4988 drivers that normally fit in a RAMPS board. Instead I bought some TB6600 on Amazon. For some reason, the ones that come in a nice metal case cant output their rated 4A, but the more sketchy-looking ones with a large aluminum heatsink can.
Cable management was a pretty big deal because having a cable snag or even worse get caught in the router bit would be very bad. Using cable chains and stuffing wires into the aluminum extrusions channels, I made everything pretty neat. One issue I did run into was noise affecting the limit switch wires which I ran right next to the stepper motor wires. I fixed this by adding a capacitor next to the Arduino.
## Software
To power the CNC router, I used an Arduino Mega version of the popular grbl software. To send commands to the CNC router, I used bCNC running on a Pi Zero W. Later on, I switched over to cncjs which has a much nicer web interface but no leveling command.
## Conclusion
After two weeks, I had a pretty decent CNC router. It worked really well on wood and plastic, but left something to be desired with aluminum. It probably didnt help that I was using the cheapest bits I could find on Amazon. Over the course of the rest of the summer, I taught myself CAM using Fusion 360 and upgraded some parts of the CNC router to deal with thermal and stiffness issues. I also added a dust shoe. Overall, a worthy addition to my toolbox.
{% include figure image_path="assets/img/2017/cnc-v1.jpg" %}

View File

@ -0,0 +1,75 @@
---
title: CalState LA Internship
date: 2017-07-20
categories: school
excerpt: For my summer internship during junior year of high school, I worked at CalState LA designing a low-cost, lightweight robot arm for a teleoperation robot.
header:
teaser: /assets/img/2017/csula-1.jpg
gallery:
- image_path: /assets/img/2017/csula-2.jpg
- image_path: /assets/img/2017/csula-3.jpg
- image_path: /assets/img/2017/csula-4.jpg
- image_path: /assets/img/2017/csula-5.jpg
- image_path: /assets/img/2017/csula-6.jpg
- image_path: /assets/img/2017/csula-7.jpg
- image_path: /assets/img/2017/csula-8.jpg
- image_path: /assets/img/2017/csula-9.jpg
- image_path: /assets/img/2017/csula-1.jpg
---
<sub>Written 9-1-19</sub>
As a requirement for the TroyTech program, we had to do an internship during the summer after junior year. I ended up doing my internship at CalState LA with Professor Shen. Among the various tasks he presented me, I chose to work on a low-cost, lightweight robot arm for a teleoperation robot he and a couple students were working on.
In the interest of time, I will gloss over many of the details that went into the arm, especially the iteration and testing process. I will more or less summarize the result of my work and a basic narrative. Ok, I already do this with most of my posts, but this one especially because my draft is looking way too long.
## Design Requirements
Before even starting to work on the robot arm, I did a bunch of research into existing robot arms on the market, looking into factors like cost, size, strength, weight, etc. One company in particular, Kinova, built a robot arm that pretty much satisfied every requirement we were going for, except it cost over $20k which was way outside our budget. Still, the specifications of their robot arms served as the basis for a couple of design goals for my robot arm. Heres the basic requirements I laid out:
- Cost: ~$2k
- Weight: <3kg
- Reach: >800mm
- Joint speed: 8rpm
- Carrying Capacity (at max extension): 0.5kg
- 7DOF (later reduced to 5DOF)
- Go from scratch to finished product in 8 weeks
## Brainstorming
In order to simplify the process and improve modularity, I decided to create general purpose joints. The joint had to be able to handle the maximum load which was at full extension parallel to the ground with a 0.5kg weight at the end. Doing some rough calculations and estimations of weight distribution, I found that, including a safety factor, this general purpose joint would have to handle 20 Nm of torque.
For a motor, I ended up using an off the shelf hobby brushless motor. Balancing specifications like Kv, weight, and power to ensure I would still meet my requirements, I chose ~1000Kv motors of about 3542 size if I remember correctly.
For the gearbox, I needed high stiffness, high load, and low backlash. This necessitated something like a strain wave gearbox, but since those are quite expensive, I decided to design my own.
Inspired by Haddington Dynamics Dexter robot arm whose sine wave encoders achieve arbitrary precision, I decided to design my own too. I originally wanted to build the Dexter arm, but back in the day not enough files were released despite it being an open source project.
## Making the Gearbox
Based on my motor choice and the lead acid battery we were using, the gearbox needed to have a 1:900 reduction. This is quite high, even for a strain wave gearbox. Handling 20Nm in a relatively compact package was also no easy task. [Heres](https://en.wikipedia.org/wiki/Harmonic_drive) an explanation of how strain wave gearing works.
In order to get output from the flexspline, the standard implementation is to use a cup attached to the flexspline. However, this results in a very thick gearbox. Doing more research, I found out about Harmonic Drives [pancake gears](https://www.harmonicdrive.net/products/component-sets/pancake/fr-2) which were exceptionally thin. Once I understood the design, I immediately got to trying to get it 3D printed.
{% include figure image_path="/assets/img/2017/csula-mini-cad.jpg" %}
I somehow didnt get any close up pictures, but it did work perfectly. Next I moved onto making the 1:900 gearbox, which is where multiple challenges showed up, included gear tooth strength, material stiffness, and noise. I used two 1:30 stages to get the 1:900 gear ratio.
{% include figure image_path="/assets/img/2017/csula-big-cad.jpg" %}
I also somehow didnt get any close up pictures of this, but after quite a bit of testing and iteration I had a gearbox that I was satisfied with.
To sum it up, after 6 weeks of development, I finally had a 3D printed 1:900 dual stage strain wave gearbox capable of a 20Nm load, which was something that didnt exist yet as far as I knew.
## Putting the Arm Together
With the general purpose joint done, I got onto assembling a couple of them together into a robot arm. Because of weight, I used 1:50 gearboxes with stepper motors for the wrist joints. I really liked how I routed all of the wiring through the carbon fiber tubes that made up the arms. After designing a couple of mounts, I got to printing and assembly.
{% include gallery %}
Before I knew it, my 8 weeks were up and I had to head back to high school. I only barely finished assembling the arm and the electronics. The code wasnt even near completion. Still, I left behind enough documentation and files so that other students could pick up the project. In fact, over a year later I found out that they had replicated my robot arm!
{% include figure image_path="/assets/img/2017/csula-repl.jpg" %}
I didnt think my arm was particularly well designed, so I was pretty flattered that it was good enough to replicate and continue working on.

View File

@ -0,0 +1,24 @@
---
title: Mousetrap Vehicle
date: 2017-10-27
categories: school
excerpt: For a Physics C project, we built a mousetrap vehicle according to the SciOly rules for that year.
header:
teaser: /assets/img/2017/mousetrap-old.jpg
---
<sub>Written 8-31-19</sub>
One of the projects we did in Physics C was to build a mousetrap vehicle that followed the SciOly rules that year. I had to work on Mission Possible and Hovercraft so I didnt spend too much time adjusting my vehicle to be super accurate. I did get it to be pretty fast though. An unintended side effect of my design was that the aesthetics ended up being pretty on point (according to friends).
{% include figure image_path="/assets/img/2017/mousetrap-cad.jpg" %}
I designed my own wheels to reduce weight as much as possible, using tires from some wheels I bought from Pololu awhile ago. The base plate was CNC milled from the carbon fiber plate I used for Electric Vehicle.
{% include figure image_path="/assets/img/2017/mousetrap-old.jpg" %}
The goal of the mousetrap vehicle was to push a cup forward a certain and then reverse and stop at a certain point. At first I tried using one mousetrap for forward and then another for backward, which didnt work very well. I switched back to the traditional method of using both mousetraps together and just switching the wrapping direction of the string.
{% include video id="Isw6XLnJpFA" provider="youtube" %}
{% include figure image_path="/assets/img/2017/mousetrap-donate.jpg" caption="wheels donated!" %}

View File

@ -0,0 +1,51 @@
---
title: Salad Tongs
date: 2017-11-07
categories: school
excerpt: Star Wars themed salad tongs I made during IB Design Tech.
header:
teaser: /assets/img/2017/salad-final-2.jpg
gallery:
- image_path: /assets/img/2017/salad-card-1.jpg
- image_path: /assets/img/2017/salad-card-2.jpg
- image_path: /assets/img/2017/salad-card-3.jpg
- image_path: /assets/img/2017/salad-card-4.jpg
- image_path: /assets/img/2017/salad-card-5.jpg
- image_path: /assets/img/2017/salad-card-6.jpg
- image_path: /assets/img/2017/salad-card-7.jpg
- image_path: /assets/img/2017/salad-card-8.jpg
gallery2:
- image_path: /assets/img/2017/salad-final-1.jpg
- image_path: /assets/img/2017/salad-final-2.jpg
- image_path: /assets/img/2017/salad-final-3.jpg
---
<sub>Written 8-29-19</sub>
One of the projects we had to do in IB Design Tech was designing salad tongs. It was a course not only about CAD using SolidWorks, but also the entire design process. Not only was this class super fun and educational, it also formalized the process of designing products. Being mostly self-taught, its really nice having a name for a lot of things I do automatically and being shown a couple of details that I never wouldve learned on my own.
Surprisingly, I dont have any of the documentation we made for this project. It was probably all on the Google Drive which was deleted after I left high school. Instead, Ill just give a brief overview of the entire design process to the best of my memorys abilities.
## Design Process
First, we defined our problem, salad tongs. Then we did a bunch of research to come up with design requirements, a list of general ideas that our product had to eventually fulfill. In addition, we took hand measurements of every student in class as well as family members. We also took a look at past designs to help with the design requirements as well as the next stage: brainstorming. During brainstorming, we came up with different approaches and designs to solve the problem. Afterwards, we made design specifications which had a lot more detail than the design requirements, including material choice, manufacturability, etc.
With the design specifications finished, we moved on to cardboard prototypes. We used these prototypes to demonstrate the fulfillment of pretty every specification that wasnt final material specific. Heres some pictures of the cardboard prototypes:
{% include gallery %}
## Final Design
After we were satisfied with out cardboard prototypes, we moved to SolidWorks to finalize our design for manufacturing with acrylic. I actually used Fusion 360s sheet metal mode to design the salad tongs then moved them into SolidWorks. I couldve done it in SolidWorks, but we didnt have time to learn sheet metal mode formally.
{% include figure image_path="/assets/img/2017/salad-cad.jpg" %}
Manufacturing was pretty interesting because my design was different from everyone elses. Not only did it have difficult to plot curves, but it also had engravings for the Star Wars symbols (Rebels and Empire). This necessitated the use of my CNC router to cut out the tongs. I used Fusion 360s excellent CAM feature to make the tool paths. After a slightly stressful routing process, I sanded and polished every edge. Back at school, I used the heat strips provided to do all the bends.
{% include figure image_path="/assets/img/2017/salad-cam.jpg" %}
Similarly to the cardboard prototypes, we also had to document how our salad tongs fulfilled every requirement in the design specifications. At the end of the day, I was left with experience in the engineering process and a nice set of salad tongs.
{% include gallery id="gallery2" %}

View File

@ -0,0 +1,63 @@
---
title: Lightsaber v4
date: 2017-11-29
categories: projects
excerpt: With a bit of free time and a bunch of parts I had lying around, I constructed the 4th iteration of my lightsaber.
header:
teaser: /assets/img/2017/lightsaber-v4-2.jpg
gallery:
- image_path: /assets/img/2017/lightsaber-v4-2.jpg
- image_path: /assets/img/2017/lightsaber-v4-4.jpg
- image_path: /assets/img/2017/lightsaber-v4-5.jpg
- image_path: /assets/img/2017/lightsaber-v4-1.jpg
- image_path: /assets/img/2017/lightsaber-v4-3.jpg
---
<sub>Written 8-31-19</sub>
During my dive into making PCBs for SMD components, I decided to see how small I could make a lightsaber. Since I was working on SciOly at the same time, I couldnt spend much time on it. With this next version, I decided to make the electronics easily removable and repairable. I didnt want to cut the metal casing this time, so I had to figure out a way to hide the switches underneath it. Looking back, this is probably simultaneously the cleanest design Ive done internally and externally but also the most randomly thrown together.
## Picking Components
Being a random project done in a very short time frame, I didnt have time to handpick what electronic components I wanted to use.
First, I had to figure out what processor I wanted to use. Using a butane torch lighter (dont do this!) and some careful heating, I was able to desolder the Atmega328P-AU off of an Arduino Pro Mini. Then, using some fine soldering skills, I attached wires in the right places to test the chip.
{% include figure image_path="/assets/img/2017/lightsaber-v4-fine-soldering.jpg" %}
Next, I picked the motion sensors. I didnt have a spare accelerometer lying around, so I used some vibration sensors from Adafruit. The heavy sensor was good for clashes while the light one was good for swings. Of course, using an accelerometer and measuring the acceleration vectors magnitude would have worked far better. Sadly, I didnt realize this until years [later](https://matthewtran.dev/2019/07/wireless-accelerometer/).
For the microSD card holder, I repurposed an adapter by soldering wires to it. It worked really well and was relatively easy to bring into CAD. Of course, using an actual microSD holder that is soldered to the PCB would be more reliable and easier to use.
Last I had to figure out the hidden switches. I recently learned about capacitive switches and wondered if they could work through a metal casing. Its possible to use two metal layers and sense the capacitance between the two, but this proved difficult to get working since the capacitance was so small. One thing I noticed while trying to get capacitive switches working was that the case flexed ever so slightly when pressing it, enough to short the sense pin to ground. Thus, I didnt need a capacitive switch anymore. Just squeezing the case and doing a digitalRead() would work.
## Blade Construction
The blade was very similar in construction to v1-3 except this time I used about a hundred leftover UV LEDs to make a purple blade. One thing I failed to account for was that polycarbonate filters out UV, so the blade ended up being pretty dim.
I also used some clear gift wrap on the outside to create a smooth look when the blade was off. The LED string is wrapped with thin packing foam and wrapped tight with clear packing tape. Compared to my other blades, this one has the most even diffusion.
## Assembly
Once the electronics were more or less done, I designed the PCB using EasyEDA. Then I milled it using my CNC mill, which worked pretty well because of the 13 mil spacing. After some soldering, I ended up with this.
{% include figure image_path="assets/img/2017/lightsaber-v4-pcb.jpg" %}
Then I brought everything into Fusion 360 to design the internal chassis of the lightsaber. Whats pretty cool is that I measured the threads on the chrome sink tube I would be using as a case in order to design caps that would screw onto the ends but not be bulky.
{% include figure image_path="/assets/img/2017/lightsaber-v4-cad.jpg" %}
After I did some printing and assembly, the internal assembly looked something like this:
{% include figure image_path="/assets/img/2017/lightsaber-v4-internals.jpg" %}
## Code
I pretty much just repurposed my code from v3. I did have to make some changes to work with the Atmega328 instead of the Atmega32u4. Heres the v4 [code](https://gist.github.com/dragonlock2/43a271a353125fc9af5b1cd2af89acf9).
At the end of the day, this ended up being the smallest lightsaber I ever made. It wasnt necessarily the most reliable or loudest or brightest or easiest to operate lightsaber of the bunch, but it was a solid application of what I was trying to teach myself at the time.
{% include video id="_FjFWShPcVI" provider="youtube" %}
{% include gallery %}

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

BIN
assets/img/2017/cnc-v1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
assets/img/2017/csula-1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
assets/img/2017/csula-2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
assets/img/2017/csula-3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
assets/img/2017/csula-4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
assets/img/2017/csula-5.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
assets/img/2017/csula-6.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

BIN
assets/img/2017/csula-7.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
assets/img/2017/csula-8.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
assets/img/2017/csula-9.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB