Rocket engine throttling help

Hello all. I need a little bit of help on my project. I wanted to verify if my wiring diagram and code were right before I started purchasing components. This project is meant to be used with my aerospace senior design project. My team is making a hybrid power rocket motor that runs on Nitrous Oxide. During flight the engine is design to be throttled by limiting the amount of N2O entering the combustion chamber using an electronic proportionality valve.

ATTACHED IS THE SCHEMATIC

I’m planning on using the arduino pro mini since I already have this on hand. Basically the 7806 IC is designed to lower the onboard input voltage of ~16VDC from NiMH batteries to an acceptable 6VDC the arduino can handle. The large input voltage is required to operate the electronic proportionality valve. The TIP120 IC is designed to take the PWM low voltage output from pin3 and trigger the internal switch to allow for the 16DC to operate the valve. The pizo speaker is just used to verify audibly that the microcontroller is on since all the electronics will be within the airframe of the rocket. The 3.5mm jack is served to act as a breakaway connection when the rocket lifts off from the launch pad. Everything to the left including the male 3.5mm audio jack will be contained within the rocket. I’m fairly certain I designed everything that goes internal within the rocket correct.

Everything to the right including the female 3.5mm audio jack will be part of the ground support equipment and will stay on the ground. This part of the schematic is where I’m not sure if I completed it correctly. The 24 VDC is provided from 2 12 VDC car batteries to provide enough current to ignite the igniter. The 7806 regulator is designed to take the 24VDC and output a 6VDC to act as the trigger signal. I am worried though if this IC can handle the current draw for a few seconds. I do not know exactly what the max current draw from the igniter will be but it will be certainly high. The TIP102 is designed to take the output voltage from the arduino and trigger the internal switch to trigger the relay to close. I’m not sure if the output voltage from the arduino will be enough to activate the relay. I dont have a specific relay choose yet either, any recommendations would be greatly appreciated.

Operation:
To begin operation, the main switch will be closed to turn on the microcontroller which will then wait for an input trigger (pin 10) from the ignition switch to run the program. Once the launch site is clear and we are ready for lift off, the ignition switch will be closed allowing 6VDC from the 7806 to activate the program run. The arduino will then instantly send a low output voltage on pin 10 to trip the internal switch within the TIP102 which will then activate the relay thereby igniting the igniter. After 1.5 seconds, pin 3 will send a PWM voltage to trip the internal switch within the TIP120 which will then activate and throttle the electronic proportionality valve. By this time the rocket should have lifted off the launch pad and have broken the 3.5mm cable connection. After 2 seconds, the valve will throttle down to 70%. After 10 seconds, the valve will be closed.

Summary of questions:
*Is my wiring diagram correct?
*Is my program correct?
*Can the 7806 IC on the ground support equipment handle short but high current draws?
*Can anyone recommend me any relays that will fit my application? The relay will experience a short term high current draw.
*Will the output from pin 11 be able to provide enough voltage to trigger the relay through the TIP102? I’m pretty sure this one is dependent on the type of relay chosen.
*Inside the void loop, can I have 2 things running at the same time? I want to use the pizeo speaker as an audible method to know that the microcontroller is on since it will be contained withing the rocket body. I need the valve to activate though at anytime when the input trigger is sent.

Reference links that I used to create this diagram:
http://bildr.org/2011/03/high-power-control-with-arduino-and-tip120/
http://www.fairchildsemi.com/ds/LM/LM7805.pdf (Page 22, DC applications, did not use capacitors)
http://www.arduino.cc/playground/uploads/Learning/relays.pdf

/*
 *  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

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
}


void loop(){

    analogWrite(pizoPin, 255);
    delay(3000);
    analogWrite(pizoPin, 0);
    delay(15000);

  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
    analogWrite(valvePin, 0);      // Close valve
	}
}

402 Schematic.pptx (115 KB)

Hi,

You have a lot of stuff figured out. I'll try to look at this in more detail tomorrow (Now midnight in Italy)...

Really need Igniter electrical characteristics. Is it anything like those used in smaller solid fuel engines? There must be good specs on this, unless you are DIYing the igniter in which case you will know or measure the resistance. Carefully.

Does "hybrid power " imply this is a combination solid/N2O fuel system? How far down might this be able to be throttled?

50+ years since I did serious rocket stuff, and that was CH3NO2 and electric arc ignition, fortunately by some test stand guys who knew what they were doing.

Go for the Flames :D

e ignition switch will be closed allowing 6VDC from the 7806 to activate the program run. The arduino will then instantly send a low output voltage on pin 10

What about the bootloader delay? Will this be important and/or significant? This really is rocket science, and if you get it wrong, it may result in injury.

Cool project! Wish I was doing a rocket motor! :)

Once the 3.5mm jack breaks away, your trigger input will be floating. If it reads as high, you'll start performing operations on the valve again. Do you need a pull-down resistor there?

That floating input may be a problem.

I don't know what regulator is used on the mini, but 6V may not be enough to reliably get regulated 5V out. I know that the 78xx series needs 2V - e.g. is you have a 7805, you need to put 7V in to get 5V out.

Not really clear on what the 7806 on the GSE side is for; if it's for the arduino input, then it should be a 7805 as the ATmega requires inputs to be at Vcc (IIRC it's Vcc + 0.5V, but either way 6 > 5.5).

Also, the program will run the loop again. From a reliability and safety standpoint, I'd make the code one-shot - add a while (1) {;} infinite loop at the bottom of the if block (after "close valve") so that a bad input (noise, or that floating input from the no-longer connected GSE) doesn't try and make the sequence run again.

-j

From a reliability and safety standpoint, I'd make the code one-shot - add a while (1) {;} infinite loop at the bottom of the if block (after "close valve") so that a bad input (noise, or that floating input from the no-longer connected GSE) doesn't try and make the sequence run again.

Even that may not be reliable - any inadvertent reset could cause the processor to reset and cycle again!

any inadvertent reset could cause the processor to reset and cycle again!

Maybe, depends on how the code and hardware for the ignition switch is designed. If the hardware uses an on-board pulldown and only the GSE ignition switch can pull it up, it should be OK, because the ignition switch is mechanically disconnected at launch. That still leaves the "it ignited but didn't leave the rail" scenario, though.

It's definitely something that needs to be examined closely.

-j

However this turns out, I sincerely hope that someone on your team or advisory panel (or whatever) has experience with "high power model rocketry"; I know nothing about nitrous oxide engines, other than knowing that they are expensive to purchase and/or build, and that they ain't for the faint-of-heart. They certainly aren't toys.

I've only ever seen one rocket launch with such an engine, and was a sight to behold; the rocket itself wasn't that big (compared to some of the others that day on the field), but it was loud (and not only that, it had an interesting sound; less a "whoosh" and more of a "rumble"). I recall that the owner went out on the range, set it up, stood near it while fueling it from a tank, then just before final countdown, ran quickly away. It took off perfectly and landed safely downrange and was retrieved intact (more than one launch that day were lawn darts - with the exception of one that exploded on the pad).

It was nice to see; IIRC, the owner told me he had spent about $30,000.00 USD on the thing. At least he didn't waste the money...

:D

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)

I sent this link to a friend of mine, here are his notes as well:

It looks great so far. Only a few notes: 1. You're going to want pull down resistors on those inputs from the 3.5mm jack (on the Arduino side). When it disconnects they will be floating, and that can result in unexpected behavior. 2. Obviously make sure the relay can take 25Amps (you may consider a solid state relay). Actually, I would make sure it can take a lot more than that. You typically want about 20% overhear at the least, but with so many unknowns I would make that even higher. 3. Test the voltage stability during the ignition and disconnect. High loads like that, coupled with the ground shift may cause problems (like an MCU reset). If there are any issues with it you should be able to filter it out with a cap. 4. 78xx regulators kind of suck. Check out something like the tlv70450. Also, I believe the arduino runs at 5V, not 6 (I may be wrong on this though). 5. Your code for the piezo won't work the way it is, it will just pop every 18 seconds. You need the output to oscillate. The 255 will just peg the output to a full 100% duty cycle. Drop it to 50% and it should work, and then you can increase it from there if the volume needs to go up. This will also default to ~500Hz, but there are libraries to change the PWM frequency for the analogwrite command. If you care about the 3sec every 15 sec, change the second delay to 12k. 6. The timing look you have for the 3sec of noise every 15sec won't work exactly like that. What you have is 3sec for every 18 sec; just change your second delay to 12k. 7. I require videos of anything awesome that happens with this. Hope this helps a bit, let me know if you want me to clarify anything.

Interesting project! The one thing I want to suggest for thought would be putting a debounce in your trigger pin reading. It may not be needed but, I am wondering.

val = digitalRead(triggerPin);   // Read trigger input value and store it in val
  if (val == HIGH) {               // Check if trigger has been tripped

cyclegadget: The one thing I want to suggest for thought would be putting a debounce in your trigger pin reading. It may not be needed but, I am wondering.

No need - that 15 second delay in the if should take care of it!

In this code portion, you have decided with 1 test that if the dumpin is HIGH, to dump the N2O. In the next portion of the code you do 1 test to decide to trigger the ignitor. In both cases the delay is after the result of the "if" has began. I am wondering if you want to "double check" the pin before passing the "if" statement.

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