User:Shatton8111/enes100/my work

Helicopter Project

Write problem/project Goal
To create an Arduino-based quadcopter that flies itself without a remote control.

My First Task
I'm creating an interface for the Arduino to control the ESC motor.

Summary of actual work over first weekend
I researched gimbal designs and functions, compared Bluetooth and ZigBee communication for the Arduino, recorded discoveries about the ESCs and motors, and coordinated team efforts.

Week1 Narrative
I created a GitHub repository for my code: EngineeringClass2012. I found this code for controlling the simpler ESC from an earlier project. I found out that the "simpler" ESC is actually a Yagi 5 Amp ESC. I sent an e-mail asking for more of this kind of ESC, so that the Arduino can use multiple to control multiple motors. It is very likely that the helicopter won't be using the more complex ESC's, unless the 5 Amps aren't enough current.

During the team's in-class presentation of progress, it was discussed that the motor's secondary pair of wires (green and yellow) could be used to measure its RPM. I don't know what advantages this could have, but it's worth looking into. At the very least, it could be used for sanity checking and calibration for the various motors.

I e-mailed the team to coordinate focuses for week(end) 1.

I think I prefer ZigBee (an XBee modem) over Bluetooth (BlueSMiRF). ZigBee seems to be limited to several hundred kbps while Bluetooth can go up to about 1 mbps, but ZigBee costs much less (~$20 - 30, compared ~$20 - 60), has different versions that allow much greater distances (e.g. 15 miles), and has documentation that's immensely more usable. However, there is a Bluetooth example that covers both computer-side graphical interfaces and Arduino-side communication. I haven't seen anything like that for ZigBee yet, but I doubt it would be difficult to make (since the XBee can act as a serial port for the Arduino and computer).

For gimbal design, I found a previous team's set of links that includes helpful-looking gyro and accelerometer tutorials. The links show circuits and code that might only need to be understood and connected. I can ask in class if there are any similar parts available.

During the Engineering Club, I tested the ADXL335 accelerometer with the Arduino Uno. By following the blog/tutorial in Sensing Orientation With The ADXL335 + Arduino, I was able to see what the accelerometer did when I vibrated it vertically and horizontally (X, Y, and Z). This was shown by three numeric values coming through the serial channel to the serial monitor in the Arduino IDE. After that, I graphed the values using a modified version (to show three axes instead of one) of a graphing example written in Processing.

Apparently, at a certain point each sensor reaches an overflow point for its readings. At this point, the reading wraps from the highest to the lowest possible value. I think an initial level calibration technique will be necessary in software, unless a gimbal or something else would solve this problem.

My Second Task

 * I plan to research gimbal and accelerometer mechanisms, design, construction, and use in online resources and past projects. I hope to have a functioning device that is interfaced with and monitored through the Arduino by next class.
 * I also will begin researching ZigBee and Bluetooth. I hope to have a cost/benefit comparison and a set of parts ready for recommendation by next class (or Engineering Club meeting).

Summary of actual work over second weekend
I decided on Bluetooth communication parts, coordinated with my team by e-mail, and worked more on understanding the Thunderbird 9 ESC.

Week2 Narrative
By talking to the rest of the team while in class and by e-mail, I decided that Bluetooth would be a better fit for the scope of project. Bluetooth seems to be more expensive than ZigBee per part, but it requires fewer parts, is simpler to implement in electronics and software, and is slightly cheaper overall. I sent the professor an e-mail, requesting the following Bluetooth parts:

At the Engineering Club, I worked with Jromanch0088 to understand the Thunderbird 9 ESC (PDF of manual). After wiring the ESC according the documentation of Wfalak, I tested it by first using Wind tunnel servo code (the "esc" section) by Rhorton4549 and powering the ESC and motor via a reused AC power adapter. The result was no response from the ESC, except for the start-up sound when powered and a relatively warm temperature, which could be a sign of mis-wiring or a possibly damaging electrical current.

As a sanity check, I retested by using my earlier, unfinished Thunderbird 9 ESC code. The result was the same, leaving the possibility for conclusions such as the AC power adapter being mis-wired or drawing too high a current, the ESC already being damaged (which is unlikely, since it made a start-up sound), or the wiring being inadequate for the ESC to function properly.

My Third task
I plan to learn how to control multiple motors using the Arduino motor shield. Then I'll attempt to balance motor thrusts on the seesaw, using the Arduino and gyros/accelerometers. If that goes well, then I can move on to making a prototype frame hover. After that, I should see if I can direct its flight in a controlled way.

Summary of actual work over third weekend
I wrote programs for the Thunderbird 9 ESC and tried making a prototype wire harness for the ESC's and motors.

Week3 Narrative
Once manually controlling the Thunderbird ESC was understood (it needed a higher current) in class, I worked with Jromanch0088 to control a motor with it via the Arduino Uno. After testing it successfully with the Servo Sweep example program, I tried it set it to start at specified speeds. That didn't work, leading me to conclude (through much trial and error) that the Thunderbird 9 ESC, like the Yagi 5 ESC, had to be gradually stepped or ramped from one speed to another.

Using this strategy, I later wrote a program to test the attached motor by quickly ramping-up speeds from 0 to 5,000 (units unknown; related to servo.write(speed);). From testing, the ESC and motor appear to increase speed from ~40 - 170, is constant until 500, becomes stationary until 1,000, and then is at a constant high speed from 1,000 to the tested 5,000. It was suggested that because we were giving the motor only a few Amps (I read ~0.7 on the 200 mA setting of the voltimeter), if we increased its current to closer to its maximum rating we might see faster speeds from the motor.

After class, I wired the Arduino Uno into a circuit that would simply relay its ground, 5 volt power, and digital pin 9 signals to two Thunderbird 9 ESC's. The result was that I was able to control two ESC's simultaneously.

At home, I connected the tried connecting the Thunderbird 9 ESC and Hacker A10-13L motor together. I found out that the caps of the motor's connectors and some of the ends of the ESC's wires were too big to fit into the narrow metal conductor inside the butt connector. I tried using clear tape to connect the wires from the two parts. It was very loose and the wires didn't stay together very well.

My Fourth task
I'm planning on focusing on building pairs of Thunderbird 9 ESC's and Hacker A10-13L motors. When this is done, I'll move on to using gyroscopic sensors on the balance beam/seesaw to simulate the balancing of the motors' propeller thrusts. This will be first be done without propellers attached, since high-speed blades are a safety hazard.

Summary of actual work over fourth weekend
I built two pairs of ESCs and motors, but, due to confusion with other teams' hand-made power supplies, I was unable to prove their reliability. This prevented me from progressing on to gyroscopic sensor testing.

Week4 Narrative
I tested having a single Arduino Uno control two Thunderbird 9 ESC's and their attached hacker A10-13L brushless motors. With my dual ESC test, I had one ESC spin increase its motor's speed while another decreased its motor's speed. There were quirks with one motor always starting late, presumably because I didn't properly ramp its speed setting (I just set it instead). The main problem I ran into was that sometimes the hand-made power supplies I was using would suddenly shut-off. Finally, I used one with an AC outlet instead of the classroom's desk power system. This seemed to help, but the source of the problem isn't obvious.

Video of it working:


 * Test of Arduino Uno Controlling Two Thunderbird 9 ESC's.

Later, I made another ESC/motor pair. This time I made two mistakes. First, I had crimped too close to the center of the butt connector and missed the ESC's wire. This let it slide out of the connector. Then, I tried again closer to the wire. I found out after this that the motor's connector didn't have enough room to fit inside the connector's inner conductive sleeve. So, I cut the ESC's wire at the end of the connector, stripped 2 - 4 millimeters, inserted the motor's connector into the conductive sleeve first, inserted the ESC's wire, and then crimped just the ESC's wire. This allowed the ESC's wires to be permanently attached to the connectors and let the motor's self-adjusting connectors to also be used. This way, the motor could still be reused.

At the request of a Wind Tunnel team member, I also figured out how to control a much larger motor using a HexTronic ESC. It was pretty cool. I just used my existing Thunderbird 9 ESC burn-out test for it. Apparently, like the new Thunderbird 9 ESC's, it needed to have its 5 volt ESC wire disconnected. I'm still confused by this.