Parawing Control System

From Far Horizons Wiki
Jump to: navigation, search

Contents

High Altitude Parawing Control System

25.1 Project Description Parawing kites are a potential last stage system for a lightweight Mars entry vehicle such as a CubeSat or Nano-satellite lander. The use of a parawing kite may also allow a certain level of navigation control to the lander. The atmosphere

25.2 Target Goals

25.2.1 Test the flight dynamics of a parawing kite released at altitude (≥100,000 feet) and at an initial velocity of ~400mph
25.2.2 Collect and record relevant data sets to analyze flight dynamics
25.2.3 Use passive and/or active control to test the potential effectiveness of flight path alteration

25.3 Interests and Skill Sets Engineering, electronics, microprocessors, aerodynamics, control systems

25.4 Team Participants

25.4.1 Project Lead         Ken W
25.4.2 System Programmers     WPCP Team
25.4.3 Mechanical Designer    WPCP Team
25.4.4 Project Assistants

Project Sub Goals

  • Build a test box for the experiment
  • Write the arduino code
  • Fly a kite
  • power/weight: how much power (torque(pounds-feet)) does motor have depending on weight?
    • Torque test: adjust weight and measure how much string lifts?
  • power/consumption: how much energy does the motor consume?
  • test with voltage/current? circuit?
  • number of revolutions - how much it shifts the box
    • are both backward and forward revolutions equal?
  • what angle of tilt do we want to achieve?
    • what angle is best for kite?
  • adjustment for time it takes for motor to come to a stop + reverse direction
  • how does angle tilt relate to flight path for the actual kite?
  • motor returns to same position after going right/left

References

Code

Note: Spacing may be a bit strange because of wiki formatting problems DC Motor

#include 
#include 
#include "utility/Adafruit_PWMServoDriver.h"
Adafruit_MotorShield AFMS = Adafruit_MotorShield();
Adafruit_DCMotor *myMotor = AFMS.getMotor(3);
 void setup (){
 AFMS.begin();
 myMotor->setSpeed(100); 
 myMotor->run(FORWARD);
 myMotor->run(RELEASE);
}
 void loop(){
  myMotor->setSpeed(150);
  myMotor->run(FORWARD);
  delay(3000);            //Time to run forward
  myMotor->run(RELEASE);
  delay(8000);            //Time to delay
  myMotor->run(BACKWARD);
  delay(3000);            //Time to run backward
  myMotor->run(RELEASE);
  delay(8000);            //Time to delay
                          //above values could be put in variables
}



Stepper without motor shield:

#include 
//defines steps per revolution and functions to be used
const int stepsPerRevolution =200;
void forward(int stepsToMove);
 void backward(int stepsToMove);
//initialize the stepper library on pins 10 through 13
//motor is called ester  
Stepper ester(stepsPerRevolution,10,11,12,13);
/*the state variable will be updated to match:
   0=neutral  1=held in right position  2=held in left position
*/int state=0;
const int sleepTime=30000;//30000 for 30 second loop
//input and output pins we'll be using
int cutDownPin=8;
//OUTPUTS to sensor (or LED for testing)
int neutralPin=7;
int rightPin=6;
int leftPin=5;
void setup (){
 pinMode(8,INPUT);
 pinMode(7,OUTPUT);
 pinMode(6,OUTPUT);
 pinMode(5,OUTPUT);
 pinMode(13,OUTPUT);
 pinMode(12,OUTPUT);
 pinMode(11,OUTPUT);
 pinMode(10,OUTPUT);
 //ensure that all output pins are OFF
 //for(int i=5;inow at neutral pos
     delay(sleepTime);
     backward(50);//stepsPerRevolution/4);
     inform(2);
     //-->now at left
     delay(sleepTime);
     forward(50);//stepsPerRevolution/4);
     inform(0);
     //-->now at neutral
     delay(sleepTime);
     //-->now at right
  }
}
}
//actually moves the motor
void forward(int stepsToMove){
 ester.step(stepsToMove);
}
 void backward(int stepsToMove){
 ester.step(-stepsToMove);
}
void inform(int input){
//resets all pins to LOW
 digitalWrite(5,0);
 digitalWrite(6,0);
 digitalWrite(7,0);
if(input==0){
  digitalWrite(neutralPin,1);
}
if(input==1){
  digitalWrite(rightPin,1);
}
if(input==2){
  digitalWrite(leftPin,1);
 }
}


Stepper WITH motor shield )

#include 
#include 
#include "utility/Adafruit_PWMServoDriver.h"
#include 
//defines steps per revolution and functions to be used
const int stepsPerRevolution =200;
void forward(int stepsToMove);
void backward(int stepsToMove);
//Motor Shield init
Adafruit_MotorShield AFMS = Adafruit_MotorShield(); 
Adafruit_StepperMotor *ester = AFMS.getStepper(200, 1);
const int sleepTime=3000;//CHANGE TO 30000 for 30 second loop
//input and output pins we'll be using
int cutDownPin=8;
//OUTPUTS to sensor (or LED for testing)
int neutralPin=7;
int rightPin=6;
int leftPin=5;
void setup() {
 AFMS.begin();
 pinMode(8,INPUT);
 pinMode(7,OUTPUT);
 pinMode(6,OUTPUT);
 pinMode(5,OUTPUT);
 pinMode(13,OUTPUT);
 pinMode(12,OUTPUT);
 pinMode(11,OUTPUT);
 pinMode(10,OUTPUT);
 digitalWrite(5,0);
 digitalWrite(6,0);
 digitalWrite(7,0);
 digitalWrite(8,0);
 //}
 ester->setSpeed(20);
 delay(sleepTime);
}
void loop() {
 int go=1;
 go=digitalRead(8);//cutDownPin); 
 if(go==0){
   while(true){  
     //again, 0=N, 1=R, 2=L
     forward(50);//stepsPerRevolution/4);
     inform(1);
     delay(sleepTime);
     backward(50);//stepsPerRevolution/4);
     inform(0); 
     //-->now at neutral pos
     delay(sleepTime);
     backward(50);//stepsPerRevolution/4);
     inform(2);
     //-->now at left
     delay(sleepTime);
     forward(50);//stepsPerRevolution/4);
     inform(0);
     //-->now at neutral
     delay(sleepTime);
     //-->now at right
   }
 }
}
//actually moves the motor
void forward(int stepsToMove){
 ester->step(stepsToMove,FORWARD,DOUBLE);
}
void backward(int stepsToMove){
 ester->step(stepsToMove,BACKWARD,DOUBLE);
}
void inform(int input){ 
 //resets all pins to LOW
 digitalWrite(5,0);
 digitalWrite(6,0);
 digitalWrite(7,0);
 if(input==0){
   digitalWrite(neutralPin,1);
 }
 if(input==1){
   digitalWrite(rightPin,1);
 }
 if(input==2){
   digitalWrite(leftPin,1);
 }
}


Shield code cleaned up, not tested

/*# Stepper motor on Adafruit motor shield
//# Description:
//# turns motor counterclockwise, clockwise, clockwise, counterclockwise... after signal recieved on pin 8
//# outputs state on pins 7, 8, and 9 as HIGH when motor is in the corresponding state
//# Created May 4th, 2014 by Kit Ng
*/
#include 
#include 
#include "utility/Adafruit_PWMServoDriver.h"
void forward(int stepsToMove);
void backward(int stepsToMove);
//30000ms for 30 second loop
const int sleepTime=30000;
//polulu motor 1209
const int stepsPerRevolution=200;
//Once pin 8 is given a HIGH signal, 
//it will start. continuous voltage not required
int cutDownPin=8;
//defines output pins on Arduino
int neutralPin=7;
int rightPin=6;
int leftPin=5;
Adafruit_MotorShield AFMS = Adafruit_MotorShield();     //creates motorshield object
Adafruit_StepperMotor *ester = AFMS.getStepper(200, 1); //connects motor 200 steps on M1 and M2
void setup() {
  //sets up motorshield
  AFMS.begin();
 Serial.begin(9600);
 ester->setSpeed(10); //10rpm
 
 //accepts pin 8 as input from cutoff
 pinMode(8,INPUT);
 
 //sets pins 5 through 7 as outputs for status output
 for(int i=5;istep(stepsToMove,FORWARD,DOUBLE);
}
void backward(int stepsToMove){
 ester->step(stepsToMove,BACKWARD,DOUBLE);
}
 //Manages status update outputs
void inform(int input){  
 //resets all pins to LOW
 digitalWrite(5,0);
 digitalWrite(6,0);
 digitalWrite(7,0);
 switch(input){
   case 0:
     digitalWrite(neutralPin,1);      
   break;
   
   case 1:
     digitalWrite(rightPin,1);      
   break;
   
   case2:
     digitalWrite(leftPin,1);
   break;
 }
}

Project Reports

4-26-14 One idea that has been discussed was a mechanism to hold the wheel in place between movements to help prevent damage to the motor. What we came up with was using pull solenoids to keep the wheel in place. We would have three holes in the face of the control wheel with a track connecting them. The base assumption will be that for control stay at the three points 90 degrees away from one another, and use the time in each position for control. The solenoid will be located at the base. Most of the time, the solenoid will be de-energized in the port holding the wheel in place. When the wheel is given the signal to turn, an arduino will energize the solenoid pulling it out of position allowing the wheel to spin. Once the movement is complete, the soleoid will de-energize into place, holding the wheel in its new position.

It may also be worth looking at placing two solenoids at the bottom position facing opposite directions (front and back). This could allow for better steadying of the control wheel. We may have to adjust the depth of the

For building a circuit with the solenoid pins there are some good links online. Because of the power draw, we need to install a transistor in the circuit.

http://playground.arduino.cc/Learning/SolenoidTutorial http://www.instructables.com/id/Controlling-solenoids-with-arduino/?ALLSTEPS

Retrieved from "https://farhorizonsproject.com/wikipage/index.php?title=Parawing_Control_System&oldid=1187"
Personal tools
Namespaces

Variants
Views
  • Read
  • View source
  • View history
Actions
Navigation
Toolbox
  • What links here
  • Related changes
  • Special pages
  • Printable version