Monday, February 29, 2016

ArduiNo? More like ArduiYes.

Activities: Learn basic use of the Arduino microcontroller through partner programming.

Partner: Katrina Montales

1. Blink with a delay of 10 - the delay is in milliseconds, so the LED is turning and off so fast that it looks like a continuous stream of light (similar to the fluorescent lights in most of our buildings). If we were to take a high speed video, we would be able to see the the LED flashing on and off.



2. Pattern with (at least) 3 LEDs of different colors using the delay() function


With each new LED, we set the delay to be of different intervals. This was simple, yet gratifying at the same exact time. Getting this little step to work felt extremely rewarding. Something about building something with your own hands feels very empowering, like "I made that!!!" 

3. The potentiometer takes in the input based on where the knob is pointing (the resistance) and sets that to be the value to be the delay between the LED flashing on and off. This was cool to see how we could directly change the input through the potentiometer through hardware changes rather than software changes.




4. Pattern with (at least) 3 LEDs of different colors that does not use the delay() function. This program tells the LEDs to turn on or off based on the time that has elapsed since the beginning of the loop (the millis() function). This was frustrating because we originally only had one variable for the timekeeper (lastTime), but that was changing the behavior of all three LEDs, so creating a time keeper for each LED simplified our code a lot better. (Overall, however, this took a long time to understand.)




5. Using a photocell, we set the LED light to go on when the photocell reads that the light input is at "Dim." After some googling, I found out that a photocell is basically a resister that changes its resistive value depending on how much light is shining on the sensor (squiggly part facing upward near the top of the breadboard). Adjusting the code that was already given to us was not too difficult, but super cool to see how this could be applied as simple light sensors (like for streetlights) around the world.









6. Using the tiny-tactile switch, turn the LED on and off. This task was different than the others because the button was an input. The button basically functions as a pull-up resistor -- meaning that when you push the button, it completes the circuit and allows the electricity (+5V) to flow through. I can definitely see how this could be used with morse code...



(candid of the documentation process, at its best, ps: katrina don't murder me)


7. Use Sweep and Knob (rotate between 60 and 120 degrees) to control the servo. An arduino board basically creates a platform for us to control the RC servo motors. The three wires attached to the servo are power (red), ground (black), and signal (yellow). These programs were basically written for us and were fairly straightforward, so not too difficult to understand. Any confusion was easily solved through looking at the Arduino documentation.

Configuration:



Sweep:



Knob:
























Skills:
  • coding in a language similar to C
  • arduino circuits/resisters/breadboard usage
  • input from the environment (using the potentiometer)
  • using millis() function within the loop()

Sunday, February 28, 2016

Lego Racer J&M Take 2nd Place

Problem: Design a Lego car using the "old motor" (high speed, low torque) to move a 1 kg weight 4 meters across the finish line (and win the race!).

Partner: Marissa Okoli


First, we started by brainstorming possible variables that would affect the performance of our car:
  1. speed-to-torque ratio
  2. which size wheel to use
  3. how many wheels to use
  4. where the weight should sit in the car (front/back)
  5. how the weight should sit in the car (standing up or lying down)
  6. where should the motor me powering the wheels (from the front or back)
  7. where to put the motor and the pico-cricket and still maintain a balanced car
Process: Mainly Composed of TONS of Trial and Error (fail fast and early, iterate as needed)

Trial 1:

After holding the 1kg weight in our hand, we thought we were gonna need a LOT of power, so we started with a huge gear ratio in an attempt to guarantee that we would be able to move the weight.


Gear Chain Ratio: 1/495

Conclusion: Way too slow, not so much power needed



Trial 2:

...Let's try something of the opposite extreme, a very very low gear ratio and just see if the car will move.

Gear Chain Ratio: 1/3

Reflecting now, I see that the big 40-toothed gear in the center was effectively useless, aside from the fact that it was adding friction. Regardless, I was learning about gear ratios.

Conclusion: Not nearly enough torque to move the weight.


Trial 3:

For the next iteration, I came and worked on a Saturday, so I assume that is what can be attributed to the major brain fartage here. As I was still new to working with gears, I added a lot of unnecessary gears. Although there are a ton of gears in this car, the gear ratio ended up being relatively low due to the way I arranged the gears.

Gear Chain Ratio: 1/45

Racing time: 24 seconds

Conclusion: At the time, I thought that the gear ratio here was 1/225, so we thought the gear ratio could still come down a bit. Other problems: the structure of the car is weak and the motor is not securely attached to the car. Also, needed to work on building a place for the weight to sit.

Other hilarious video of an attempt to test the car -- the weight was concentrated on the back, also where the wheels were being powered. The car was unbalanced and the weight was unsecured aka failure an an attempt to even move the car.


Trial 4:

Trying a lower gear ratio than (what we thought was) 1/225. At this point, I understand that trying these, in actuality, higher gear ratios is futile and not moving us towards the goal. Nevertheless, they were actual trials and part of the process of learning about how gear chains work.

Gear Chain Ratio: 1/125

Racing time: 40+ seconds

Iteration notes: lower the gear ratio even more (also, start keeping a more accurate chart of what you have tested and the times so you can problem solve a lot easier)


Trial 5: (wheel testing)

Short & Fat wheels: 50 seconds

Big & Skinny wheels: 32 seconds

It was at this point that we had decided that three wheels were what we needed for stability and weight distribution. Also the use of the large wheels, since they were directly hooked up to the gear chain turned at a 1-to-1 ratio with the final gear in the chain, so a larger wheel meant a greater circumference and a coverage of more ground with each turn of the wheel. #need4speed

Trial 6:   +Fail vid

Gear Ratio: 1/25

Racing time: 15 seconds

*gasp* It works at 1/25!! Now all we need to do is keep testing lower gear ratios until we have hit the lowest one that still moves the weight! The weight at the front of the car helps counter the 1kg weight.





Trial 7:

Gear Ratio: 1/15

Racing time: < 11 seconds

Iteration notes: After some online research, we found that laying the weight down flat would lower the center of gravity. In addition, we wanted to keep the weight centered and near the motor to optimize for speed.

Note: The car is a little bit lop-sided but with a bit of adjustment of the placement of the weight and the wheels, it is easily fixed.

Trial 8: How low can you go?

Gear Ratio: 1/10

Racing time: 13 seconds

Note: The 24-toothed gear was added in to have enough spacing to have the main axel and wheels fit together well, but at the cost of added friction.

Iteration notes: This gear ratio was so low that the car needed bit of a push to get started (overcome the static friction), but was able to make its way. However, we decided that this was not a better option than the clearly sufficient 1/15 gear ratio. Ladies and gentlemen, we have a wwwiiinnnneeerrrr! (hint: its not trial 8)


Trial 9: Final Product













Gear Ratio: 1/15

Racing time(on actual race day): 9.35 seconds

Note: the car tends to go to the left a bit, this was fixed just before the race through an adjustment in the wheel alignment




Reflection:

The process was long, but definitely worth-while in the end. This project was definitely different than the previous ones because all of the parts were pre-made, all we had to do was figure out how to fit them together in the best way. With each of the initial mistake I made in calculating the gear ratio, I quickly learned the correct way and made lots of progress towards a faster and better lego racer. I also learned how to set up a clear chart for keeping track of what we had tested and taking note of the numeric time that each lego racer took to cross the finish line (really a great idea for tracking progress and optimization). Overall, I spent about 15 hours on this project and I would not have spent the time much differently. Each iteration taught me valuable intuition and knowledge on the gear chain process and optimization. Now you tell me, which video did you like the most?

Skills/Motos:

  • iterate, iterate, iterate
  • fail fast and early
  • keep meticulous notes (or videos) to help keep track and make progress with future iterations
  • building strong/sturdy structures with legos
  • adjusting gear chains
  • working with bushings
  • working with pico-cricket




Sunday, February 21, 2016

Windlass: The Birth of the Cracked Flask



Problem/Limitations: Create a windlass/device that spans a 12cm gap with a crankshaft (not over the well/hole) that lifts a 1liter bottle at least 10 cm above the opening of the well. Material limitations: no more than 500cm^2 total area of 3/16'' Delrin sheet, 120 cm of string, and a 50cm piece of Delrin rod.

Partner (part-time): Fiona Chung

Day 1-2:
Step 1: Brainstorming (~20 minutes)



We decided that we would work on two foam-board prototypes and decide which one was stronger to model in SolidWorks:

Idea 1:
Plan: The small wheel on the side turns at a 1:1 ratio with the larger inner circles. The pencils form a triangular pyramid shape inside (hopefully exploiting the strength of triangles!) The elevated side platforms elevate so the bottle can be raised the minimum 10 centimeters above the table.

- the supports for the side platforms are very strong, but hard to model in Solidworks b/e fit at an angle
- perhaps this model is too area-costly



Idea 2:
Plan: The triangular supports on the outside hold the center bar at least 10cm above the top of the table. The inner triangular pyramid maximizes the rate at which the bottle can be pulled up with each crank (one rotation) of the rod.

- concerns -
   - the weight directly in the center will be too much for
   the rod
      - reduce the length of the beam that takes the
      weight of the bottle
      - start with the string wound around all three bars
      already
   - the weight will collapse the side beams in towards
   center
      - solution: add a center beam on top of the side
      isosceles triangles
      - make base of isosceles triangles larger so more
                                                                       stable



Final foam-core mock-up:


Day 3:
Modeling of small holes before laser cut large parts. (this took a TON of adjustment and time, even after using the calipers the process of 3D modeling - drawing - laser cutting - testing - adjusting (repeat until fits just right) took lots of patience because the dimensions in SolidWorks are not the exact ones that will be printed in the laser cutter (due to vaporization and reduction of beam strength as the distance of the beam increases))


Part name: Square Donut (beam hole)

1st iteration: inner hole - too small
2nd: inner hole - too big
3rd: inner hole - just right (WAHOOO!)

final dimensions:

inner circle (SolidWorks): 6.2mm
outer edge: 1cmx1cm


Part name: Bushing

1st iteration: inner hole - too small
2nd iteration: inner hole just right, increased the outer diameter

final dimensions:

inner circle: 6.2mm
outer circle: 1.5cm





Part name: Triangle Foot

1st iteration: both rectangle cutouts (slots that fit into each other) were too small
2nd iteration: just riiiiight

final dimensions:

inner rectangle: 0.508cm x 1cm
base of triangle: 5cm


Part name: T-shape and Donut Hole

1st iteration: too big
2nd iteration: still too big, but remained that way since we realized we did not need a tight fit

final dimensions:

inner rectangle: 0.55cm x 1.1cm
peg: 0.9204cm x 1cm x 3/16 in (delrin sheet thickness)



All together now! One happy family!
























Day 4-6: More Modeling in SolidWorks (partner dropped the class, #ridingsolo)

Problems: There was always long line for the laser cutter since cutting out shapes in Delrin takes multiple cuts and the heat from cutting out larger pieces often warps the sheet of plastic so much that other shapes to be cut out are not as precise as we hope. This resulted in an extended first prototype stage despite spending many hours in the engineering lab.

Additional problems: Default units being used SolidWorks are different from the laser cutter -- make sure they are the right dimensions before print.

Prototype 1:


Problem: The bushings on the sides were not enough (unattached) to increase the contact area that the center rotating triangular drum had with Delrin rod so under the force of the 1L water bottle, did not turn at a 1-to-1 ratio with the rod.

Plan of Action: Drill holes in the bushings perpendicular AND parallel to the rod and stick piano wire through them to increase the grip (and likelihood that the whole triangular piece will turn with the rod). Also, create a piece to attach to turn the rod.



So. After about 3 hours of drilling holes for, cutting, and hammering piano wire into my rod, it still didn't work. The bushings were too small. The holes in the rod were irreversible. It was at this point I was at t-minues 2 days til we were scheduled to present our windlasses and I was #freakinout. Like wigging out, panicked, gonna fail this project. How can I modify this iteration that it works without using too much more Delrin (I was already close to the limit)?! Thankfully, Katrina and Xi Xi were able to help me troubleshoot and unpaint me out of the corner I was in. Wooo go teamwork!

New Plan of Action: Remove the piano wire from the outside bushing and create a larger replacement bushing that (via piano wire) attaches to the Delrin rod and to the triangular apparatus. But where are we going to get the material to create the larger bushings? Cut them out of the body of the Cracked Flask! (I wasn't about to waste more delrin cutting out the new model, just imagine the side pieces have a 4cm hole in the center of each)

Note: There were a couple of problems with drilling the holes for the piano wire just by the nature of the drill press, but I managed through it.

Prototype 2:  ft. hilarious photos of not-so-happy visiting student from China

Note: Start with the string wrapped around all three rods so that the force of the water bottle is never on just one rod.

Accounting:

**triangle feet are 2.71cm x 5cm (cutoff in photo)

Cracked Flask(s): about 301.5 cm^2
Triangular Piece(s): about 104.5 cm^2
Center beam: about 56 cm^2
Triangle feet: 27 cm^2
Small bushing: 1.87 pi cm^2 => 5.86 cm^2 x4 bushings => about 23.4 cm
Large bushing: 22.6 pi cm^2 x2 bushings => 77.3 cm^2
Total: 589.7 cm^2 (less if we had cut the large and small bushings out of the cracked flask piece or center support)

Reflection:

The design process was long and frustrating (perhaps would have been less so without the deadline, but when does that ever happen?). It is easy, at times, to feel like you have no idea what you are doing, and not many ideas about where to turn to next. This is where I learned about the importance of working in a team. I found it was very easy to get into my head and get lost in such a difficult (but not impossible) task, and that is when you need your partner the most. When in doubt, ask for help. Ideas, regardless of whether you end up using them, will help you out of the rut and single POV mindset.

I was surprised that our bottom triangular feet were able to make our structure so stable. The top beam, although not fastened/attached, kept the sides from caving in. The key to the stability in this structure was keeping all pieces at right angles to each other. This included putting bushings on the rod on the inside and outside of where the rod attached to the cracked flask.

One idea I saw that other teams did was create their own rectangular delrin rod to use as the center beam -- this allowed for greater friction (just by the shape) so they did not have to deal with the slippage problem I did. Pretty smart, huh? Just considering the delrin rod as the main beam, we could only control the length of the beam, however, creating the rectangular delrin rod allowed them to control a lot more of the variables that go into beam bending (think cantilevers), despite using the same material.

Time-wise I think that I might try to get a first prototype out a lot earlier, since it took a lot of time to trouble shoot small/big problems from there. However, dealing with the foam model is also really great for dealing with main structural flaws so you can create a feasibly successful model. Overall, this entire project took about 25 hours and I wouldn't have spent much of that time differently because the steps I went through were each necessary in getting to the finished product I have today. That being said, if I was given more time, I would have adjusted the handle on the side so it was easier to turn (simple 30 minute fix), and made the triangle pieces smaller so that the twisting force on them was smaller.

Skills:

  • brainstorming
  • trouble-shooting (teamwork necessary)
  • 3D modelling in SolidWorks
  • fastening & attaching