Jump to content

User:Shatton8111/enes100/my work

From Wikiversity

Helicopter Project

Week0 Activities

[edit | edit source]

Write problem/project Goal

[edit | edit source]

To create an Arduino-based quadcopter that flies itself without a remote control.

My First Task

[edit | edit source]

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

Week1 Activities

[edit | edit source]

Summary of actual work over first weekend

[edit | edit source]

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

[edit | edit source]

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.

Here are some of the Bluetooth and ZigBee parts I found and their prices:

Bluetooth Price Range ZigBee Price Range
Bluetooth Modem - BlueSMiRF RP-SMA $64.95 350 feet XBee Module - Series 01 - XB24-AWI-001 $23.00 300 feet
Stackable Bluetooth Shield : BT Shield v2.1 (Slave) $19.90 N/A (350 feet?) XBee Adapter kit - v1.1 $10.00 300 feet
Bluetooth USB Module Mini $10.95 100 m (~328 feet) USB FTDI TTL-232 cable $20.00 XBee <-> USB
Bluegiga WT41 $33.15 1 km (0.62 miles) XBee-PRO XSC Development Kit w/ 2 XBee-PRO modules $149.00 ~15 miles
XBee-PRO XSC long-range module w/ RPSMA connector $42.00 ~15 miles

For information about XBee ranges, please see this page: XBee radios - Which XBee radio module is right for you?

My recommended ZigBee parts list:

Name Price Quantity Function
XBee Module - Series 01 - XB24-AWI-001 $23.00 2 XBee (ZigBee) Radio
XBee Adapter kit - v1.1 $10.00 2 XBee <-> Arduino, XBee <-> FTDI
USB FTDI TTL-232 cable $20.00 1 FTDI <-> Computer
Total $86.00

My recommended Bluetooth parts list:

Name Price Quantity Function
Bluetooth Modem - BlueSMiRF RP-SMA $64.95 1 Bluetooth <-> Arduino
Bluetooth USB Module Mini $10.95 1 Bluetooth <-> Computer
Total $75.90

In class today I graphed axial measurements from the accelerometer. I also improved the graphing code to show the three axes separately. That way I could get a better idea of how the rotation and vibration I subjected the accelerometer to related to the values it reported for each axis. The code I used can be seen here on my repository.

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

[edit | edit source]
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).

Week2 Activities

[edit | edit source]

Summary of actual work over second weekend

[edit | edit source]

I decided on Bluetooth communication parts, coordinated with my team by e-mail, and worked more on understanding the Thunderbird 9 ESC.

Week2 Narrative

[edit | edit source]

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:

Name Price Quantity Function
Bluetooth Modem - BlueSMiRF RP-SMA $64.95 1 Bluetooth <-> Arduino
Bluetooth USB Module Mini $10.95 1 Bluetooth <-> Computer
Total $75.90

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

[edit | edit source]

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.

Week3 Activities

[edit | edit source]

Summary of actual work over third weekend

[edit | edit source]

I wrote programs for the Thunderbird 9 ESC and tried making a prototype wire harness for the ESC's and motors.

Week3 Narrative

[edit | edit source]

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.

Because the tape didn't hold things together well, and because I wanted a (mostly) reusable way of connecting the wires, I removed the connector foil and caps from the motor's wires. Then, I extended the ESC's wires into pointed cones by reusing the foil from the motor's connectors. The result is that I was able to connect the ESC and motor through butt connectors, without them being permanently connected. I still need to test the motor and ESC with the Arduino to see if the ESC's wires will fit into the Arduino or breadboard and if the connections are working correctly. If this works without problems, I'll connect the other motor and ESC the same way. Stripping and splicing the wires is inevitable though, since that's what will eventually be needed.

My Fourth task

[edit | edit source]

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.

Week4 Activities

[edit | edit source]

Summary of actual work over fourth weekend

[edit | edit source]

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

[edit | edit source]

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:

In class, I was shown the Zagi 5 Amp ESC's that had been ordered and some smaller, high-speed motors that came with them. These should be useful for lightweight UAV's, but might not be strong enough for the heavy lithium polymer batteries that we're currently targeting. The Zagi ESC's are generally much simpler to control though, so there's a chance we'll switch to them or do testing for comparisons. After some initial confusion with them, I managed to get these new ESC's working. I think the code that ran successfully was the Thunderbird 9 ESC burn-out test.

I worked with Amirreza to unwire and rewire a test to determine the reproducibility of the dual-ESC motor test. It went about as well as the previous dual-ESC test: confusingly and with intermittent power problems. Eventually, the power cut-off altogether. I ran a short sanity check that consisted of controlling a single ESC and motor with the Arduino. This worked. After following the wires, I noticed that one of the motors' wires (I think it was red/power) had become disconnected. After reconnecting this, the test worked without problems for the remainder of the time. What isn't shown in the videos below are the times the test didn't work. I simply forgot to record those, and they were transient.

Videos of the test program:

After testing the demo with the existing ESC's and motors, I started connecting new pairs of Thunderbird 9 ESC's and Hacker A10-13L brushless motors together. While the making the first pair was more of an experiment for me, it went much better than the second attempt. For the first attempt, recorded here, the result was an ESC and motor that were permanently connected. Unfortunately, the crimping bent the connectors at approximately 45 degree angles. This could result in a possible loss of conduction. However, due to the problems with the power supplies, this hasn't been determined yet.

Videos of My Attempt to Connect a Thunderbird 9 ESC and Motor using Butt Splice Connectors:

Videos of me Figuring out the Newly Connected Thunderbird 9 ESC and Motor:

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.