Wednesday, June 5, 2013

Senior Project

For my high school senior project, I set out to build a Quadcopter.

Day 1:
The initial step was to construct the copter.  In order to write the code that would make this copter fly, I would need the hardware to be in place, so I began by fully building the structure of the coptor.  Thus, the first day was spent entirely on construction.  And a remarkable amount of progress was made.  I was able to fully construct the structure of the copter in just one day.


The first task was to assemble the four arms, one at a time.  This required attaching the legs and the motors to each arm.

All four arms assembled with motors and legs.
Next the four arms had to be secured to the mainframe, and the motor wires routed to accommodate the electronic speed controllers and circuit boards that would be later installed.
The coper with the four legs attached to the mainframe, and with the motor wires routed appropriately.

Above the base of the copter sits a "tower" that stacks higher, and allows for additional circuit boards and sensors to be mounted.  This was the next section to be attached.



The fully assembled copter with the tower stacked on top and the propellers attached to each motor.



Day 2 - 4:
The ESCs attached to their motors
I focused on arming the Electronic Speed Controllers (ESCs).  Every motor on the coptor would be powered by an ESC, and it is the ESC that sends a specific and regulated amount of power to the motor, which determines the speed and direction of rotation.  As such, it is vitally important that the ESC function correctly and that I can properly control them via code.  Having never used ESCs before, I was starting from scratch on using them.  Through research online, extensive trial and error, and some dumb luck, I was finally able to write an Arduino sketch to make a propeller turn.


The copter with the power distribution board install.
This board would later be remove and replaced via an
alternative wiring scheme.

The copter was set up so the power supply would feed into a main board, and the main board would be attached to the Arduino, which would control the entire copter.  I choose to bypass the power, so I had to solder all the ESCs power supplies together, and then to a connector which would go directly the battery.  This kind of modification could not be foreseen, and it is why projects like this are develop largely as they are constructed.  It would've been very difficult to foresee this change until it was time to solve the problem of bypassing the power distribution board.






In the process of connecting the four ESCs together, I indavertantly wired one ESC in reverse polarity, and then ran current through it.  This created smoke (and a small fire), and destroyed that ESC.  It was at this point I had to solve the problem of only having three ESCs.  On the one hand, I could've purchased another ESC and had it shipped from California, but that would've taken almost a week.  I could've bought a generic ESC; however, every model ESC run on a different current and would produce different levels of output at certain motor settings.  So this was a bad choice.  So I decided to remove one of the four arms, and adjust the third arm, making the quadcopter into a tricoptor.


Once I had the copter's motors working, I was able to reattach the tower and focus on the programming of the copter.  Which was how the balance of the first week, and the second week was spent.

In this project, I really felt like a professional engineer.  I arrived daily and worked on completing a project as would a professional designing and constructing something.  It was especially fun having an office where I could work everyday.  An office I would arrive in and be able to pick up where I had left off the previous day.  And an office where various friends could drop by and "help" throughout their days.
And of course, I got by with a little help from my friends.

Wednesday, January 30, 2013

Text Statistics Project

Hello World Again,

This week I got distracted from the project I've been plowing away on (an app for the Jones Institute), and spent a few minutes on a text statistics mac app.

A little background:
Earlier this week Mr. Warden told me his wife is a medical transcripionist, and she is paid by the typed line, with lines that have no text being excluded.  So he needed a computer program/text editor that can determine how many blank lines are in the text.  He said after conciderable searching, he couldn't find any Mac apps that count the number of blank lines in the text.  This didn't surprise me because it is a little bit of a wired metic to measure.

So, I decided to play around with some code that would count the number of blank lines.  It ended up taking me about 20 minutes to have a Mac app scrapped together that gets the job done.  And the majority of that 20 minutes was figuring out what how to work with a Mac app, as opposed to the iOS apps I'm much more familiar with (they're mostly the same [the same language], but there are also many differences).

Going Forward:
I now have to decide whether or not to put the app on the store.  My dilemma is it is a very simple app with a very limited usefulness for a small set of people:

Pros:
- Learn Mac Development through finishing the project
- Learn the process of publishing a Mac App (as opposed to an iOS App)
- Publish my first Mac App!

Cons:
- Have to get credentials as a Mac Developer (at the moment, I only have them for iOS), which will cost me $99/year
- For an app this simple, with such limited applications, is all this really worth it (Afterall, I can always just send the hacked together version to Mr. Warden)

I'm leaning towards publishing, but still very much undecided.

Any feedback would be appreciated!

Post a comment below.

<br/>

PS - Next week I'll be getting back to the Jones Institute app.