For my final project, I decided I wanted to make a spider robot that would walk using four legs. I wanted to incorporate a raspberry pi and allow Bluetooth connectivity since I have never used either of those before, and I wanted to learn how to use them. In order to complete this project I needed to do the following things:
- Learn how to use the raspberry pi and program it using python in order to control the four legs of the robot
- Learn how to utilize the Bluetooth functionality of the raspberry pi in order to give the robot commands from my phone
- Cut the pieces of the robot using the laser cutter
My first step to the project was to create the CAD drawings that I would cut using the laser cutter.
CAD Drawing created using Fusion 360
I ended up having two servos for each of the legs. The first servo would allow each leg to move in an arc in the xy plane. The second servo would be used to rotate about the z axis. This would allow the robot to pick up its leg and then move to a different position. Once the leg is in a specific position, friction would then allow the robot to move forward. Luckily, I was able to find a bunch of different models for the individual servos, the raspberry pi, and the servo control board. This allowed me to easily model everything together resulting in each of the pieces fitting together. The main issue I had with assembly was actually the servos themselves. The hardware screws didn’t really work out when attaching the wooden legs to the servos, so I had to add some super glue in order to get it to stay on. The servos also still had some give to them though.
This is what the current robot looks like:
I was pretty happy with how the body turned out and how the raspberry pi and the control board fit. The screws I used were very good at holding in place.
The coding portion was actually pretty straightforward. I had to install some python packages onto the raspberry pi then I was able to get right into coding which was nice. Python was easier than I expected since I was able to import packages then use them pretty easily. It was pretty similar to coding on the Arduino just with a different language and access to more packages.
I ended up coding different functions for each walking process. So I had a function for moving forward, a function for moving right, etc.
For the Bluetooth, I ended up using the pybluez package that would allow me to start a bluetooth client and connect with my phone. I downloaded an app called bluetooth serial controller that allowed me to send data to the raspberry pi. In the program, depending on the data sent, that would determine what moving function to use.
The following is the code I ended up writing:
In the end, two of the servos ended up dying me once I finished the build, so I wasn’t able to get it to implement and test all of the movement functions that I wrote, but I was able to get it to scoot forward. This was a little disappointing and in hindsight I should have used more robust servos. I believe the servos would have been strong enough to life the robot, but they had a ton of give to them and I would have rather had it where I would screw the wooden parts into the servos. I was able to get the bluetooth working and I was happy with what I was able to do with the raspberry pi. It allowed me to learn more about something I have always been curious about.
Overall, I really enjoyed this course. I always enjoyed tinkering with things, so being able to do that in a class was fun.
For my Iteration project I decided to iterate on the game I made with the LCD. I wanted to use a screen that offered more pixels and had an easier interface to work with in Arduino. The main issue with the LCD screen that I originally used was that there were very little pixels and everything was broken into blocks. With this new OLED screen I used, it was 128×64 pixels and it was all located on one area. The coding interface was also much easier since the ADAFRUIT libraries allowed for drawing bitmaps based on x and y coordinates. This made it much easier to code the moving blocks.
A few problems I ran into had to deal with, like last time, making it show the walls would spawn in a way where it was possible to avoid them. I spent a while trying to figure out all of the conditions for the walls, but in the end, I used the same method before which was brute forcing and checking the different options for when a wall spawned. Unfortunately, I wasn’t able to take a picture of this, but this is a image of what it looked like:
I had also originally had each box move 16 pixels at a time. However, the look of it was very choppy. As a result, I decided to increase the amount of times the screen refreshed since this OLED screen could handle a faster refresh rate. This allowed the look of the game to look much smoother compared to the original LCD.
In order to improve upon this, I decided to make a housing for it as well as use a joystick instead, since that is more intuitive to control. I also added a scoring system based on the total time the player survived, and I made it so every five seconds the walls would speed up a little bit. This made it more challenging to overtime.
I at first wanted to design this like an arcade system, but once I received the screen, I realized it was too small to make it something like that. Instead, I created a box using boxes.py in order to hold the arduino and I made cutouts for the screen and the joystick. Overall, I am happy with how it turned out, but If I were to redo it, I would probably make the case more ergonomic to hold. I would do this by using an arduino nano to make the overall form factor smaller and use smaller wires. I would also solder the wires together too.
This was the original lcd project:
This was the new improved project:
Hello everyone, for my project this week I wanted to try and make a four legged pompom bot using only two servos. Many robot designs for each leg use multiple servos to better control the position of the leg. I originally wanted to create a robot that would stand up and walk. I realized, however, that it would have been difficult to stabilize it. As a result, I went for a one that would stand on four legs and move. The two front legs would be attached to a servo and the two back legs would be attached to a servo.
This was my initial design:
When I initially was thinking about how to create this, I looked up only and saw someone did a similar four legged robot and showed a video of it moving. What I found out was that the key to making movement with only two servos was the angled base, so I tried to mimic this with the Popsicle sticks and attached the servos to them.
This initial design was simple in order to test out the mechanism and see if it works out correctly. What I found out was that the wooden pegs for legs did not offer enough traction to pull the robot forward. As a result, I added some foam on the ends of the feet in order to make it move better. I tested it out again, but there still was not enough force to move the robot.
This is what led me to figure out that the robot was too light. If I added some more weight to it, that would increase the friction of the foot with the ground and pull it forward. This is what led me to my Final Design:
The main changes I made to it were that I added the weight of the battery back and the screw to the front leg area. This allowed to create enough friction with the ground to pull it forward while keeping it in place when it move the servos back into position. I believe if I more evenly distributed the weight I could have made it move forward when it was moving the servos back into position as well, but I am happy with how it turned out. This is a video of it moving:
Adding weight through the second iteration was able to make it move. I didn’t really have an aesthetic design in mind when I was creating this, so I just ended up putting some of the puff balls and a bottle cap nears its front to make a head.
Overall, I had a lot of fun tinkering with the different aspects of the robot to get it to move.
I had some previous experience with Arduinos before, but I had never incorporated an LCD screen into a project before. One of my challenges was trying to figure out what I should do with the LCD screen. I decided I wanted to do some type of game where the goal is to avoid the obstacles coming. I created this storyboard for it:
I originally wanted to go with a joystick in order to control the character on the screen, but I couldn’t find one. I decided to go with an ultrasonic sensor instead. The way I was going to use the ultrasonic sensor was to have different thresholds that would determine which side of the screen the player is on. These thresholds would be triggered based on how far an object is from the Ultrasonic Sensor–in this case, I used my hand as the “controller.” I had it where if my hand was less than 14cm away it would move the character to the right and if it was greater than 14cm it would move the character to the left. As of now, there are only five walls that can appear at a time and the walls move pretty slowly, so it is very easy.
The following images is what i had for the final product:
LCD that was used for the graphics
Arduino and Electronics used
The code is linked here: https://www.dropbox.com/s/5yi8h67q3qt6g6l/Joystick_Control.cpp?dl=0
For the ultrasonic sensor portion I used this website to help with the code and wiring: https://www.tutorialspoint.com/arduino/arduino_ultrasonic_sensor.htm
During the project, my main challenges were actually generating the obstacles so it wouldn’t be impossible to avoid. I had many times where the walls would appear on top of each other resulting in it being impossible to avoid. I was able to solve this by having some conditions that would check for this. There is currently an issue with the LCD screen refreshing too much which results in what looks like a flickering effect. This could be solved with rearranging the code a little bit to keep the title and gameover screens from refreshing too much.
I enjoyed learning more about the Arduino and the LCD screen during this project.
This week we focused on sewing. I had done minimal sewing and no embroidery before, so this was an interesting experience for me. The project I worked on was this pouch that we finished in class:
I went with a blue outside layer and a purple inside layer for this pouch since those two colors seemed to go well together when I combined them. Through this project I was able to learn the different types of stitch marks and how to hide stitch marks inside the fabric.
The next part was the digital embroidery. In this case, I made something simple in order to try out the idea of digital embroidery. I wanted to make a flame where the light would act as the source of light of the fire, but the light was not nearly as bright as I though it would be. If I were to do this again I would add more LEDs and have the stitches only go through the red fabric so they would remain hidden. The result is shown below:
For my outside of class project, I decided to tackle the box pouch project. My main goal for this project was to create a pouch that was able to store my electronics during travel so that I could keep things organized. I found an image of a castle with bats online and decided that would be interesting to include on the pouch since it had multiple different colors and different lighting on the moon. I had issues with differentiating the layers for PE10 to recognize. As a result, it took more time that I would have liked to get that worked out. I think I should have switched the White and Yellow-White colors with each other. I believe this would make the moon look more like a moon rather than a white ball with yellowish splotches. I did the embroidery before sewing expecting the emblem to appear higher on the pouch than it actually came out to be. So if I were to repeat this project, I would move the emblem up on the fabric more. The colors I ended up using were blue, white, yellow-white, olive-green (outlining), and a small amount of brown.
For the sewing part, I initially had trouble visualizing how the different parts would go together even when following the guide. I believe I should have gone with a design that I had a youtube tutorial video with, so I could better understand how each of the parts go together. However, I believe what I was able to make turned out pretty good with the exception of the sides in which I could still see the inside fabric from the outside of the pouch. Also, the handle I placed to close to the corner, so it ended up shorter than I would have liked. Some of the stiching is still visible from outside the fabric, so I would want to clean that up a little more as well if I were to redo this.
Overall, I am happy with how it turned out for one of my first attempts at sewing and embroidering.
This week we worked on 3d modeling and 3d scanning. For my project this week, I wanted to make a cable holder that would organize some of my cables since I sometimes have trouble located my chargers.
These were the different sketches that I did for the four prompts:
For the utensils, I decided to make a utensil that would be compact, so I made a utensil that holds each fork, knife, and spoon that would act similarly to a swiss army knife. For the culture background, I decided to do farming since my ancestors did a lot of farming and add electronics to it to more match my current major. For my art piece I created a scene based on Starry Night by Van-Gogh. This was just 3d renditions of the buildings with the mountain as well. For the final sketch, I wanted to make a cable holder since I don’t have the best cable management for my chargers. As a result, I decided I would like a holder that would be tailored to each individual cable. This was the idea that I decided to 3d print.
These two are the 3d models I created for the compact utensil and the cable holder:
For this one I attempted to use meshmixer to get more of a spoon shape, but the model didn’t have enough edges near the spoon to be able to form it into the shape that I liked, so as a result, I left it as what is in the model.
For the cable holder I made two separate models: one that held my laptop charger and another that held my PS vita charger. I ended up printing both of these and attaching them together.
This was the final product of the cable holder. Essentially, I made it so that I could attach new holders for individual cables if I needed more. Right now it holds my laptop charges and it allows me to always know where to find the cables when I need them. There are some alterations that I would make if I were to remake the parts. I originally had something on the side to wrap the cord around, but it was too small to be usable. I would make the overall holder taller and larger in order to wrap the cord around it.
Hello everyone this week I decided to try and learn some origami since I remember being impressed by the stuff people were able to create with it. I wanted to start out on the easier side, so I went with a turtle. I followed this youtube tutorial: https://www.youtube.com/watch?v=sFlFVRKT3KMy
This is the circuit:
I used two resistors to divide the current between the two different sections of LEDS. I chose 100 ohm since the rest of the resistors seemed to large and would make the LEDs too dim. I used two Orange LEDs for the eyes of the turtle and I used one red LED inside of the turtle shell. I only had access to one battery, so I decided to go with LEDs that could be powered with less than 3V. I initially wanted to create this out of card stock, but what I found out was that it was very difficult to shape it into the form that I liked. The figure was very stiff which made it difficult to put LEDs into. This is what the initial card stock version looked like:
I liked the green coloring on it, but I felt thinner paper would be easier to work with, so I decided to go with that instead. This is what the final design looked like:
At first I attempted to do all of the copper wiring inside the turtle so that it wouldn’t show on the front, but there were issues with the LEDs making proper contact with the copper tape. As a result, I decided it would be easier to just put it out on the front of the turtle. If I were to do the project again, I would purchase some green origami paper to better match the color of a turtle, then probably solder the components together with actual thin wire since that seems to be more reliable compared to the copper tape in this scenario. Overall, the project taught me about origami and dividing current and voltage across multiple loads.
I ended up using:
– Two 100 ohm resistors
– two Orange LEDs
– one Red LED
– Copper Tape
i decided to make a more minimalist sticker this time since I am a big fan of small outlines in color on pictures. In this case, I decided to take an image of a skeleton and color it in and add small extra outlines and pieces to the hat. I focused on the three colors yellow, green, and red as an outline to the black since those colors are brighter compared to the main black color.
The following is what the inkscape picture I formed looked like:
The inkscape portion of the assignment was fairly straightforward. I found an image of a skeleton wearing a hat online and changed some of the proportions and added coloring to it. The following is what the actual sticker looked like:
I ended up placing the pieces on by using some vinyl backing and tape to remove and place the pieces on top of each other. With the tape it was easier to keep every part relatively similar to the inkscape design. The different colored outlines weren’t as large as I expected, so as a result it was difficult to get it in the correct position perfectly. Some potential changes to the sticker would be to make the colored outlines larger, so those would be easier to place. Overall, I am happy with how it came out, however. I especially like the green and red portions as I think those are a nice contrast compared to the black.
So on my nametag I wanted to include some true art that was created by Squidward Tentacles. I always wanted a nametag that would also fit on my keychain since I always carry that with me.
I also wanted to include something that was related to Electrical Engineering somewhat, so I decided on including some wire nodes at the bottom below the artwork. The gradient feature in inkscape also interested me as I was curious to see how that would look on the wood. The following is what I intended for the nametag to look after it was completed (this is without the name). At first I thought I would like to have the features of “Bold and Brash” be more defined. However, after looking at what the laser cutter produced, I am more a fan of the silhouette look of the piece.
I originally had trouble getting inkscape to only fill a certain portion of the nametag (specifically talking about the gradient arrow part). However, after messing around with a few shapes and looking at online guides, I was able to get it worked out.
This is what the final cut looks like:
Overall, I am very happy with how the nametag came out. I am interested in seeing how different materials would change the look of it. I’d be most interested in seeing if there is a material that black, but when engraved gives a white look (maybe Black Acrylic?). I think that would look really cool as well.