Wednesday, December 11, 2013

Putting The Boat Together + IR Code

Today, all three group members met in order to put our 2D cutouts together.

 
We are still waiting for our 3D parts so not everything can be put together today. Nonetheless, this was a good step of progress in finally putting our pieces together.

I also worked on code for the IR remote since we still don't know if using Bluetooth is viable. However I do think the IR remote is the best way to go. With this code (assuming it works perfect), all that needs to be added are the hexadecimal codes for each button [a quick test solves this] and the light code we already have working.


The basic premis of the code is that buttons 0-9 on the remote will represent different speeds and the left/right arrows will indicate direction. All of our other ideas can be implemented (boat path patterns, adjusting light brightness, etc.) once we get this to work properly and get it in water!

- Mike Igoe

Tuesday, December 10, 2013

Meeting to Finish Things Up

Today Bobby and I met in the computer lab in a meeting that is about finishing up the project. First, we discussed the laser cut parts we received and the various problems that were discovered with them.
All our parts thus far
All the problems can be solved with relative ease; one problem requires the piece to be filed whilst another requires being cut again to make the hole larger. Many pieces came out perfectly however so it was a large success. We also picked out the propeller from three choices, with the victor being the one with bigger blades.

For the most part, our meeting was based on what needed to be done next since there wasn't much that can be done at the moment. First what we want to do is assemble all our laser cut pieces together. We are meeting with William tomorrow morning and doing this with the Marine Epoxy mentioned in the previous post. This will keep our vessel together as well as water proof.

Next we are still waiting for our 3D printed parts that will complete our assembly and  final word if Professor Sullivan is able to get the Bluetooth to work. The 3D parts should be done soon. If the Bluetooth doesn't work, we will have to revert to using IR controllers instead.

So at the moment we are still just waiting for most of the work to be done and have our code to be tested and debugged. Here is my code for the servo motor that we talked about in our meeting. Bobby mentioned how two pins could be utilized, however thinking about it, if we initialize the position to be at 90 degrees in the setup, do we really need to use two pins for 0-90 and 90-180 degrees?

Monday, December 9, 2013

In regards to how to construct a model boat hull the same considerations must be processed as if you were building a full size boat. But the best solutions to how to make it are quite different due to size. This points that must be considered are shape, assembly, and sealing.
The options available for shape include making the hull out of one piece, constructing out of multiple shaped pieces, or construction out of multiple flat pieces. For the size we are working in the ultimately superior method would be to make a single piece that is exactly the size a shape we need. This bypasses the need for assembly and sealing entirely. However we could not use this method because we did not have the proper resources to make a piece to the specifications that we needed, so, since we could abundantly make flat pieces that was the method we were somewhat forced into.
Now the real challenges of boat building: assembly and sealing. Assembly is perhaps the part of construction that has the most options, and those options have many sub-options. Speaking of acrylic alone there is bolting, welding, taping, locking, and gluing. Let’s look at each of these and why I choose to use or not use each.
Bolting: the principle of bolting is to connect two pieces by putting a nail or such through them. This is perhaps the sturdiest option but was ultimately not even under considerations because since the pieces we were connecting were small and at angles with each other this would maximize the stress concentrations and would like likely break the pieces with no time to fabricate new ones. Also who wants to punch holes in the bottom of a boat? Not me.
Welding: plastic welding is a great way to connect pieces of acrylic together. A strip of plastic is placed in the interconnecting crevice and a large amount of heat is applied to melt the strip to the pieces. This forms a strong permanent bond that is smooth and easily seal-able. It is, however, relatively dangerous because of burns. But I am fairly experienced in this so that is not likely to be an issue. We were going to be using this method, but we were not able to procure a heat gun in time for construction so we had to switch.
Taping: the principle of taping is very simple; a thin strip of polymer is applied with an adhesive. This strip is then placed across the crevice attaching the pieces together. This method has numerous shortcomings however. The seal is very hard to make tight and is also prone to deterioration in a matter of days. This is great for temporarily and quickly attaching things but not for the work we are doing.
Locking: locking requires no eternal attachment to construct; the geometry of the bodies is simply designed to interconnect. This method generally makes loose connections that are still quite sturdy. However complicating geometry both makes sealing impossible and fabrication a complex endeavor.
Gluing: an adhesive is applied to the surfaces which will attach them. This method is extremely simple mechanically. There are thousands of glues available that can do anything from drying in seconds to holding literally multiple tons of weight. We chose this method because it caused the least complication with sealing and could create a very strong bond.

Sealing our hull is important because we a holding quite a lot of expensive electronics in it. The simply best way of sealing a crevice is to apply a silicone based gel that expands to fill the crack to form a water proof bond. The glue that we will be using is a marine epoxy rated for underwater use, however we will still be applying silicone because you are better safe than sorry.

package of epoxy
William Cooper

Wednesday, December 4, 2013

Coding

After a long time struggling with GitHub and the alien terminology (forking, committing, bashing, etc.) that goes with it, I finally found out how to put my code on there. First to tackle was the problem of implementing the LED lights to blink without using a 2 second delay that would disrupt all other functionality. My code focused on using iterations of the loop function as a counter that would go up to two seconds and, upon reaching that count, execute the light turning on/off. This is seen here:


The issue with this was that you needed to know just how long it takes for a loop function to execute – I estimated on the low side and figured I could raise the counter limit until it equated to 2 seconds. Bobby figured out a way that would both avoid multiple tests as well as the loops:


I also worked on coding the servo motor and ac motor so that their movements would respond to a potentiometer. This was a test that prepare us for integrating the motors with the iPhone interface – since the adjustment of the potentiometer is similar to that of the app. Each is shown below:


Bobby then put the blinking light code together with the servo code so it was all in one. All that would be needed now is to add the motor in this:


Finally Bobby introduced a unique idea to use the light sensor for the LED in place of the potentiometer – that way, the screen would adjust itself according to the amount of light around it:



With this code we still have the trouble of connecting it to the iPhone app, however. More work will need to be done before any of this can be tested and debugged, but so far it looks good.


- Mike

-