Rocket engine throttling help

I know many of yall think this is fairly dangerous, and it is, but I have alot of experience building and flying model and high power rockets since the age of 6. I have flown a couple of hybrid rockets once as well. The only thing I haven't done it make my own motor. I'm a senior majoring in Aerospace Engineering and this project is my capstone design project. My professor is also overseeing it as well.

I uploaded my teams critical design review which explains the entire engine incase anyone has any questions on that. THis hybrid engine runs on HTPB as the fuel source and Nitrous Oxide as the oxidizer source. Ignore the slide about the arduino power source since I have increased the power requirments to operate the valve. The lowest I'll need to throttle the engine down is to 70%.

Resistance of the ignitor is around .071 ohms (1" of 40 ga Nichrome wire) to 5.22 ohms (1" of 39ga copper wire) depending on the material + .8 ohms for the car battery internal resistance
Rtotal= 0.871 to 6.02 ohms
Current will be: I=E/Rtotal
Current= 27.5 to 3.98 Amps
Power Dissipated will be: I^2*Rignitor
Power= 53.69 to 82.68 Watts

I'm not to worried about the bootloader delay as long as it activates the program within a second or so. The launch site will be clear before any launch operations take place.

I'm also not worried about the floating trigger possible recycling the program since even if it does, the nitrous oxide tank should be empty by then.

I made the changes to the 7806 to the 7805. It is meant for the arduino input.

After thinking about it, I also added a second switch on the ground support end that will dump the nitrous tank through the valve if needed without igniting the ignitor and added a another arm switch to the ground support equipment. I might have to find another type of breakway connection since most audio jacks only have 3 points of contact and I need 4 now.

I updated the code with the while loop recommendation as well as the code for the dump N2O switch and have attached it bellow:

Attached is the updated schematic in jpg and powerpoint form for easy editing

/*
 *  Ignition & Throttle Valve Program
 */
 
const int triggerPin = 10;         // Trigger is connected to pin 2
int val = LOW;                     // Variable for reading trigger status (float)
const int pizoPin = 9;             // Pizeo Speaker is connected to pin 9
const int valvePin = 3;            // Valve is connected to PWM pin 3
const int ignitorPin = 11;         // Ignitor is connected to pin 11
const int dumppin = 13;            // Dump switch is connected to pin 13
int val = LOW;                     // Variable for reading trigger status (float)

void setup() {
  pinMode(triggerPin, INPUT);      // Set the trigger pin as input
  pinMode(valvePin, OUTPUT);       // Set the switch pin as input
  pinMode(ignitorPin, OUTPUT);     // Set the switch pin as input
  pinMode(pizoPin, OUTPUT);        // Set the switch pin as input
  pinMode(dumppin, INPUT);         // Set the switch pin as input
}


void loop(){

    analogWrite(pizoPin, 255);     //Turn on pizo speaker for 3 seconds every 15 seconds to verify microcontroller is on
    delay(3000);
    analogWrite(pizoPin, 0);
    delay(15000);

val = digitalRead(dumppin);        // Read dump trigger input value and store it in val
  if (val == HIGH) {               // Check if dump trigger has been tripped
    analogWrite(valvePin, 255);    // Open valve and dump N20
    delay(15000);		   // Wait for 15 seconds
    analogWrite(valvePin, 0);      // Close valve 

  val = digitalRead(triggerPin);   // Read trigger input value and store it in val
  if (val == HIGH) {               // Check if trigger has been tripped
    analogWrite(ignitorPin, 255);  // Ignite ignitor
    delay(1500);		   // Wait for 1.5 seconds
    analogWrite(ignitorPin, 0);    // 
    analogWrite(valvePin, 255);    // Open valve 100%
    delay(2000);		   // Wait for 2 seconds
    analogWrite(valvePin, 179);    // Open valve 70%
    delay(10000);	           // Wait for 10 seconds
    	while (1) {
    		analogWrite(valvePin, 0);      // Close valve
	}
	}
}

Apex_CDR.pptx (3.11 MB)

402 Schematic.pptx (122 KB)