User:Mwalker/enes100/myWorkWindTunnel

Write problem/project Goal
Many projects require wind tunnel testing, a need the lab currently does not provide for. Design and develop a Wind Tunnel for Projects to be tested.

My First Task
Look up on how to get the Large motor and 80 amp ESC to work in our project

Summary of actual work over first weekend
Looked up information for ESC, and starting trying to get it to work

Week1 Narrative
Found previous work done on the project. The motor and ESC were used in the HoverCraft project beforehand, and they got it to spin up and control the speed with a potentiometer, which is exactly what we need.
 * Team Page
 * Shortcut to user page of how he did it

Here is an arduino programming script to see if it can control our ESC
 * Thunderbird 9 ESC Setup

I also looked for one of these to possibly purchase, but did not find one.

My Second Task
Get the Motor and ESC to run.

Summary of actual work over second weekend
I got the Motor to spin, and cataloged the steps taken and some information about the Device. A tutorial (or addition) should be created soon.

Week2 Narrative
Important things I've learned:
 * When the arduino stops responding from com4 on the computer, the best solution is to cut all power to it, (unplug it from all things that power it) and then plug it back in. So far this has worked every time.
 * The arduino digital output is a digital square wave, and the value it reports is associated withe the length (duration) of the high pulse. The period does not appear to change.

A crude step by step instructions for getting the HexTronic HTX 80 ESC and Motor to run off of the arduino and power supply.
 * Open the arduino software and configure it to the specific arduino you are using. (I used an UNO)
 * Open the knob program under File->Examples->Servo->Knob
 * You have to change some parts of this program. There version I used is here (link not yet active)
 * Create a new line in setup, under the line " myservo.attach(9);" (no quotations)
 * This New line should read: "Serial.begin(9600);" The will get eh arduino reporting back to the computer through the USB. The value is the rate of transmission, it may be changed (to the appropriate values) to whatever suits you.
 * Create a new line in loop, under the line "val = map(val, 0, 1023, 0, 179);"
 * This new line should read: "Serial.println(val);" It will communicate the value that is going to pin 9 and display it on the "com" window of the software. Access this window through Tools->Serial Monitor or by clicking the symbol on the upper right of the toolbar.
 * Upload this program to the arduino.
 * Connect the arduino to the ESC and a poteniometer. You may need a breadboard to properly do so.
 * The White Red and Black wire triplet on the ESC:
 * Red is connected to the "Vin" or "5V" terminal. Vin is recommended because it uses a higher voltage when a 9v power supply is hooked up the the arduino. The 9v power supply in addition to the USB cable link is recommended for the arduino
 * Black is connected to the Ground
 * White is connected to the ~9 Digital pin
 * The Poteniometer. I used a 2k ohm, it is recommended, but it may not matter. There should be three pins.
 * Left most goes to arduino ground.
 * Middle is connected to A0, the analog in. (the analog in you use may not matter)
 * Right most is connected to The Vin or 5v supply. (The vin or 5v also may not matter which you use)
 * With all this hooked up, open the serial monitor with the arduino on
 * Vary the poteniometer so the serial value is zero, then vary it and note where the value of 250 is. Do not exceed the value of 250. Return to the zero value, it should be an extreme of the poteniometer.
 * Plug the power supply into the ESC Main leads. I used 12v positive to red, and ground to black on the black and red pair of 14 gauge wires.
 * Once connected you should here a single beep. If you do not, recheck you setup, and then troubleshoot.
 * If you hear the beep, the motor is ready for operation and increase the serial value to increase speed.
 * You should hear a double beep before the motor starts

Pictures:

My Third task

 * Improve ESC reliability, get it to function without either computer or poteniometer
 * Get tutorial up/updated

Summary of actual work over third weekend

 * Simplified the Setup
 * Attempted to get the Arduino to Run the ESC without the computer, to no success.

Week3 Narrative
The Set-up was simplified to that used on the ESC tutorial page.
 * Pin 9 goes to control wire (thin white)
 * 5v (or Vin) goes to leftmost potentiometer terminal, Analog 0 (A0) goes to Middle poten. terminal, and the last poten. terminal goes to ground (otherwise the values don't read correctly).
 * Power supply ground goes to black battery terminal (this wire hooked up first), +12v goes to thick red wire (this must be hooked up second, before control wire).

Through Experimentation, Using a 5v USB supply, a 9v supply, and a PC USB port, The Uno only correctly ran the sketch and modulated the ESC with the Computer Connected. Several options were tried to solve this:
 * Take out the code in the sketch that communicates the digital pin 9 output, so the Arduino won't wait for a possible reply by the computer
 * As per the Arduino Troubleshooting website, tried connecting the RX and TX pins together, to prevent unwanted chatter. This did not work either. I also did not have a 10k ohm resistor to put the RX pin to ground, which is another option to try.

The next options are to use some advice from the troubleshooting page to somehow stop sending serial port information to the board, so it starts up and runs the program correctly. A work around to test this would be to power the ardiuno up (so that it works) with the PC, then seamlessly transfer power to an external source. Also attempt to diagnose the arduino, by monitoring what comes out of pin 9 while it is not connected to the PC.

Also:
 * Counterclockwise on the Poteniometer is "off" or it decreases speed/pulse length from pin 9.
 * Clockwise is "on" on the Poteniometer, or it increases speed/pulse length from pin 9

My Fourth task
Use the proper tools to get the Arduino to run without a computer. Then, use power from the ESC to power the Arduino, so nothing but the main power-supply, ESC & motor, and Arduino (plus wires to connect) are needed to run the motor.

Summary of actual work over fourth weekend
Got Arduino to run off of 5v Power from ESC, correctly modulated ESC, and varied fan speed.

Did some updates on Tutorial: ESC Programming added Hextronik Section and Step by Step

Last Tasks to Complete:
 * Re-enter programming mode on the ESC to get it to stop premature shutdown, as it now does (need to enter programming mode?)
 * See if ESC will hook up to Arduino with though Pin set on board, no wires needed.

Week4 Narrative
Through exerimentation, I determined that the external power supply I was attempting to get the Arduino to run off of was causing it to generate a "dirty" or "noisy" signal for the digital output from the Pin 9 socket, most likely because the supply was not grounded properly. This was fixed by using the 5v supply from the computer Power supply, and then using the ESC's 5v from the red wire in the "control wire" bundle.

The Dirty Signal from the Arduino, using the bad 9v power supply

The Clean Signal from the Arduino, using power from a USB computer port.

The result from using these power supplies is increased simplicity in connecting wires and running the ESC.

Running off the Converted Computer Power Supply:

The Final Set up:

The Wire Set up with a few instructions:


 * ESC "Control" Bundle:
 * Red (Power Cable)-> Plugs into Vin pin socket on arduino
 * Black (Ground) -> Plug into any ground pin socket on arduino
 * White (Control) -> Plugs into Digital Pin 9 Socket on arduino (or whichever pin was assigned to PWM on program)
 * Poteniometer (terminals pointing away/up):
 * Leftmost Terminal -> 5v supply Pin socket on Arduino
 * Middle Terminal -> Analog 0 input pin socket (A0) on Arduino
 * Rightmost Terminal -> any ground pin socket on Arduino (This is important)


 * Not Shown in Above Picture, but essential and Should be Hooked up First
 * Ground wire (first to be hooked up) From ESC negative battery terminal (thick black wire) to ground on power supply
 * 12v Supply (Second to be hooked up) From ESC positive battery terminal (thick red wire) to 12v on power supply

The motor appears to shut down prematurely, before it is up to full operating speed, blinking its red light (indicating a fault). During experimentation with the power supplies, the ESC appeared to enter into programming mode while the dirty signal was being broadcast. It would beep four times fast then 5-7 times slowly, And I wonder if a default setting is shutting it down before it draws more than 8 amps, as it drew 9 amps at full throttle.

Complete Team Page
Fill out the Team Form (should have already copied the form, created the team page, linked to it and started filling it out).