For this iteration assignment, I decided to upgrade my original Arduino project (see here: http://cucfablab.org/arduino-intro-andrew-sun/) into an actual lockable box, using the laser cutter and a servo.
Here is the original “lock” that I made:
Original idea for the box design:
To begin, I used the BoxMaker software to create a basic design that I could modify. I wanted to have a liftable lid on a hinge, so I removed all of the notches which belonged to the top of the box, and added a hole to insert the lid into, along with holes where the LEDs and joystick would stick out. The diagram was quite confusing, since some pieces were flipped in the design – I nearly put the hole on one of the pieces on the wrong side. I ended up cutting out a sheet of paper to visualize how all of the pieces would fit together, before using the laser cutter.
Now I have a box and a l- wait, oops! I forgot to account for the width of the wood, so the hinge didn’t fit into the holes I created. Additionally, I didn’t account for the the wood around the holes, so the lid would have fallen into the box if I just made the lid narrower. I solved this by adding a notch around the hinge, to let it rotate around the hole while keeping the rest of the lid wide enough to cover the entire box.
To create the locking mechanism, I decided to use a latch, with one piece of wood attached to the servo, and another attached to the box. When the servo rotated to 90 degrees, the piece on the servo would move under the piece on the box, which prevented the lid from opening. I had to play around with the position of the pieces to prevent the servo from getting stuck. It helped to use a pencil to mark the position of the pieces, so that I could test various combinations without having to actually glue the pieces together.
Finally, it was time to integrate the Arduino circuit with the lid. Previously, I had used jumper wires to create the circuit; but I found that they would often get stuck under the lid and took up a lot of space within the box. I replaced them with some insulated wire, which I cut to the right length so that it wouldn’t stick up. Unfortunately I didn’t have wire strippers, so I ended up using a pair of scissors to cut off the insulation at the ends, which took a really long time! I couldn’t get rid of the jumper wires attached to the joystick, since the joystick only had male connectors. If I had some extra time, I could have tried soldering the wire to the connectors. My updated code is available here: https://ghostbin.com/paste/j4xwh
Demo of the finished product:
This week, I created a “walking” robot controlled by an Arduino and four servos. I went through multiple designs for this robot. For my original design, I tried to make the robot move like a worm, where it would slowly inch its way towards the destination by flopping its “belly”. To do this, I attached two motors to it, with two popsicle sticks on each side to push it forward. However, after testing, I found that it would mostly just rock back and forth, but not move forward.
I thought about ways to overcome this problem, and I came up with a four-motor design, inspired by the game “QWOP” where you have to control a character’s thighs and calves separately. To do this, I glued another motor to each side of the robot. At first, I was afraid the Arduino wouldn’t be able to power all four, but it turns out they worked just fine – I had to use a breadboard to share the voltage pins though.
After that, I wrote some code to move the two legs. For some reason, when each leg was controlled individually, it worked perfectly. However, when controlling both legs simultaneously, they became very jittery. I couldn’t find the cause of this (I think it might have to do with drawing too much current from the Arduino), so I played around with the delays until the impact of the jittering was at an acceptable level.
The next problem I ran into was having the robot stand up while moving. I believe this was caused by the tall height of the robot, so that when one leg was lifted the entire robot toppled over. I ended up adding an extra two stationary legs, kind of like crutches. Finally, the robot could move! To make it a little less slippery, I made some “shoes” out of hot glue to help it push against the table.
In the end, my design was pretty different from what I originally had in mind. My first design couldn’t move at all, while my second design would fall over as soon as it started moving. I think my final design was very successful at staying upright, though not nearly as fast as I had originally hoped. If I were to redesign this project, I would probably look into making a design that could recover from failure (like falling over), so that it would be able to move more quickly.
The code I used is available here: https://ghostbin.com/paste/jnz4j
For this week, I was inspired by these dial locks I saw in a store to try to create my own programmable “lock” using an Arduino. The idea was that you could set a password as a series of movements, and to unlock the device, you had to repeat those movements in the correct order. I obviously couldn’t find a sensor that could do all of this, so I used a joystick sensor (similar to the ones found on game controllers) and some software to emulate this behavior.
Since we didn’t have any physical locks that could be controlled by the Arduino, I decided to use some LEDs to display when the device was “unlocked”. I also wanted to give some feedback on the user’s input, so I decided to add some LEDs that would light up when the user moved the joystick (kind of like the dots you see when you type a password).
When creating the circuit, I ran into an issue with the size of the breadboards. I wanted to have a password with at least 6 LEDs, but there was only one ground pin for the Arduino micro I used. I had to connect the ends of all the LEDs to the single ground pin by bridging all of the LEDs using jumper cables, creating a huge mess. I think a good way to improve this design would be to use some wire to avoid the problem of the cables sticking out from the board.
I also tried using various colors for the status LEDs, but for some reason when I added a blue LED into the circuit, all of the other LEDs turned off. Strangely, this problem didn’t happen if I only used blue LEDs or only non-blue LEDs, so I decided to just use a single color for the status LEDs.
The next part was reading the data from the joystick. It turned out to be an analog signal from 0 to 1000, with 500 being the neutral position. However, for some reason, I was sometimes getting multiple inputs at once (as in, moving the joystick up once would create many “up” inputs). After some searching, I found that the input would sometimes quickly alternate between just under the cutoff and just over the cutoff, which caused the problem I was observing. To solve this, I used a technique called debouncing, where I would wait until I saw the same input multiple times (in my case, 100 was a good number) before accepting it. This worked great, and now I was only getting a single input at a time.
And here’s the final product! The green LED blinks at the end if the password is correct, and everything gets reset if the password is incorrect.
In the future, I think it would be cool if users could change their password using the joystick itself, instead of having to reprogram the Arduino. It could be something like a switch that would only be activated when unlocked, and would make any inputs change the password.
For this project, I wanted to go with the theme of recycling. I chose to do an Earth design for my patch, and a colorful green fabric for the bag itself. When I started embroidering the patch, the green continents came out quite well. However, once it started doing the oceans, the bobbin thread started to show on the top. At first, I thought it might be an issue with the thread getting stuck, so I stopped the process and rethreaded the machine, but after a few stitches the problem returned. I asked some of the staff, and they said it might have been an issue with the size of my design (it appeared a lot larger in PE design), so I decided to make my design a bit larger and start over. The continents were still fine, but once again I had problems with the ocean thread. Unfortunately at this point I didn’t have enough time to completely redesign my patch, so I just continued with it. Later on when I was almost done with the pouch, I noticed that the blue thread was slightly thicker than the green thread – this might have been why the machine had problems with it. If I were to redo this project, I would probably try it with a thinner thread (or maybe a different machine) to see if it gave a better result.
My finished patch (the white looks like ice, which is actually pretty cool)
Oops! (Hooray for seam rippers)
One mistake I made for this project was sewing the bag fabric together with the zippers before doing the circuits. I wanted the battery and switch to be accessible from inside the bag, but in hindsight this was not going to be possible, so instead I had it sandwiched between the inside and outside layers. The bag got in the way a lot, and I even accidentally stitched the inside and outside layers together. For future reference, I would strongly recommend putting the entire circuit on the patch before sewing it to the pouch. The circuit was surprisingly difficult – for my first attempt, I think the battery holder was broken; it only worked if I pushed hard on the battery. I had to remove all the thread and try another holder; this time it worked fine. To avoid the problem of the conductive thread overlapping, I arranged the LEDs so that the negatives were on one side, and the positives on the other. I also taped down the thread to prevent it from getting loose.
Patch plus zippers
Sewing the conductive thread
In the end, the design turned out pretty well!
For this project, I wanted to make something useful and applicable to my daily life. I got my inspiration for this project when I was washing my dishes – what if I could make some combination of utensils so I could cut my time washing them in half? The spork (spoon + fork) has already been done before, so I thought it would be cool to add a pair of chopsticks to the mix.
To design my model, I used Tinkercad, which turned out to be pretty simple. The entire model was made using just boxes and parabolas. However, putting them together was a challenge. The first issue I ran into was splitting the spoon into two halves – Tinkercad didn’t have a “split object” feature. As a workaround, I duplicated the spoon and used a hole box object to cut off half of each shape, making sure that the two halves were even.
After I finished my design, I asked some staff in the Makerlab to look over it, and they told me that my locking mechanism (to turn the chopsticks into a spoon) was not going to work well, since there wouldn’t be enough friction to prevent them from falling apart. I found some alternative designs on the internet, and decided to go with a “cantilever” design. Another problem turned out to be the fork at the end – as it turns out, 3D printing is not well-suited to printing small, pointed shapes, so I ended up having to remove the fork.
Unfortunately, when I was printing my design, the printer failed 3 times. The first time, the plastic came up from the plate, causing the printer to misalign the layers. The second and third time, the printer jammed in the middle of the print. In the end, although the print succeeded, I found that the supports for the cutout I used for the cantilevel and the spoon were solidly stuck to the rest of the model. If I had more time, I could have tried using one of the dual material printers to make the supports soluble in water.
An important lesson I learned from this project is that 3D printing is not a universal solution for everything. My design suffered from the problem of being too small, which made it difficult to print accurately. If I were to redesign my project, I would probably choose something that was larger and more solid, since those shapes seem to be the most fit for printing. I also didn’t realize how long the prints would take – my pair of chopsticks took over an hour to print, and that doesn’t even account for the failed attempts!
Here are the models I created in class using Sculptris, Tinkercad, and the Kinect 3D scanner:
For this week’s copper tape cards, I decided to honor the recent launch of the Falcon Heavy by making a card depicting Elon Musk’s Tesla floating through outer space. I chose to have the car as the popup in the foreground, with Earth and some stars in the background. For my LEDs, I would make the stars shine when the card was opened. I originally also wanted to use a LED for the headlight, but the area turned out to be too small to have both the positive and negative tape go through.
The first challenge I ran into was making the LEDs shine through the black background paper, which absorbed all the light. To solve this, I added another layer of paper, and cut a star-shaped hole in the front layer, in the same spot as the star paper. This let the light shine through, and also had the cool effect of making a bright area in the middle of the star, making it look kind of like the light was fading out the further away you were from the star.
Wiring the circuit was a little difficult, since my LEDs were on the background layer instead of the cutout. To make the circuit for the stars, I had to pass the copper tape through the “cut-in” area. One problem I ran into was getting the circuit to work. As it turns out, the battery doesn’t contain enough voltage to power both LEDs in serial. I had to rewire the circuit to make the LEDs connect in parallel. A quick tip: before laying down the circuit, test that it works by putting the battery on one side and using the unpeeled copper tape to connect the other side, so that you don’t have to ruin the paper by removing incorrect tape. Surprisingly, the switch worked really well – I didn’t need to hold it down at all. However, the connections to the LEDs were a bit loose, so I had to use some extra force to get it to stick properly.
In hindsight, I think I probably should have used the vinyl cutters from last week to make the shapes. Most of my shapes were cut out using scissors, but there were a lot of narrow areas on the car and Earth. I ended up using a razor knife to cut out those areas, which turned out a bit messy.
Getting the sliding mechanism to work…
Wiring up the circuit – LEDs are working!
This week, I created a Tux logo (as in the Linux mascot) vinyl sticker for my laptop. It was inspired by all the custom MacBook logos I see on campus – (un)fortunately I don’t have a MacBook so I thought, why not make a Linux logo instead – in honor of my favorite OS? I downloaded the vector image from Wikipedia (https://en.wikipedia.org/wiki/File:Tux_Mono.svg) and split it into groups by color, to make it easier to print.
As it turned out, aligning stickers correctly was incredibly difficult. A trick I discovered was to tape the paper to a flat surface, which helped prevent it from sliding around, and also prevented air bubbles from forming between the sticker layers. Also, some good advice is to always double check which colors you’re cutting – I accidentally ended up with a few yellow penguins on my first attempt.
Removing some of the smaller holes (on the beak) was a bit of a challenge, I ended up having to use a pair of tweezers to get them out without ruining the rest of the sticker.
Overall, I was very pleased with how the sticker came out. The decision to use a shiny rainbow vinyl for the belly area was perfect, as it makes the sticker really shine out on my boring laptop.
Here are the other stickers I made in class: a bear-dog hybrid (my two favorite animals) and a “I’m watching you” eye logo.
My inspiration for this design came from my Raspberry Pi. I wanted to create a name tag in the form factor of a credit card, with some electronic component shapes engraved onto it. My original plan was to use a real Raspberry Pi data sheet as the background, but the components turned out to be too tiny to see clearly. Instead, I decided to go with a simple circuit design (https://www.freepik.com/free-vector/technology-background-with-circuit_1019406.htm). Once I got out of the traditional paint software mindset, Inkscape was surprisingly easy to use. The font choice was inspired by my actual credit card, with big and blocky letters that looked good at a small size.
After finishing the design I had some empty space left over, so I thought it would be cool to use that space for a useful feature (kind of like a Swiss Army Knife). I used a website (http://robbbb.github.io/VectorRuler/) to generate a ruler vector, then manually edited it to fit my design. A lesson I learned: always check your image dimensions! For some reason, the marks generated by the tool were scaled down by almost 25%, which I didn’t notice until I began writing this post. Thankfully, the error has since been corrected.
Printing was a bit of a challenge. Since I was printing on a used piece of acrylic, I had to align my shape so the printer would not cut over the previous holes. I measured the distance with a ruler and changed my document properties in Inkscape to account for this. Apparently this was unnecessary though, since the laser cutter has a built-in feature to let you adjust the top-left coordinates that it prints at. With the help of a lab assistant to adjust the printer, I waited anxiously as the laser etched out my design, hoping that I had correctly measured the dimensions… and I did! Success!
Old design, scrapped because the text turned out to be too small
Measuring a ruler with another ruler