Rocket staging timer

Go To Last Post
18 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello all. I'm building a rocket staging timer with an AVR (naturally) similar to the one at perfectflite.com/catalog/miniT3.html. The one on that page appears to have a PIC on the bottom, judging by the locations of the Vdd and Vss pins, but that's not very relevant here, now is it? :)

Mine will have most of the same specs and features as that timer, except it won't be as small, and it will use DIP switches instead of a button to set the timer duration. The DIP switches will limit the range and precision of the timers, but I can live with that. Maybe in a future version I will use a single push button to set the timer.

I'm currently using an N-channel MOSFET for supplying high currents to the launch fuse (upwards of 2 amps). If you look at the attached schematic, you'll see the load (ignition fuse) is connected to the source of the MOSFET. I arranged it this way so the fuse will act as a grounding switch to test for continuity (the continuity test takes only a tiny fraction of an amp which is not enough to light the fuse).

Is the MOSFET connected right? Most schematics that I've seen with a MOSFET have the load connected to the Drain, rather than the Source, so I'm not sure if this will work as I hope it will.

Also, does anyone see any other issues, big or small, with the circuit? Any feedback is appreciated.

EDIT: fixed the link

Attachment(s): 

Last Edited: Wed. Feb 2, 2011 - 05:08 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Cristop, Welcome to the forum.

A few thoughts:

Many voltage regulators need several volts above their output voltage as their input voltage. A 6 V battery will not supply enough voltage input to many linear regulators. LDO, Low Drop Out linear regulators, however, are designed to operate with very little "excess" voltage on the input, above the output. As you look at voltage regulators keep this in mind.

Many times one puts a diode in series with the V+ supply so that if the user hooks the battery up backwards they won't damage the micro, the transistor, or other components. There is typically 0.6 or 0.7 V drop across a forward biased, (conducting), silicon diode. This means the battery voltage has to be even higher.

An option is to run the micro off a couple of watch batteries, and the ignitor off a separate battery. But it may not gain you much in this application.

The piezo beeper should NOT have the capacitor in series with it. Depending on its specifications it may need a small resistor in series with it.

The LED used for Continuity checks needs a resistor in series with it.

Note that all AVRs, (and other micros, for that matter), should have a by-pass capacitor across their V+ and Ground terminals, as close to the terminals as possible. A 0.1uF cap would be a good choice.

A small ON/Off switch would be a good addition.

A second LED, (and series resistor), would not take up much space, and may prove to be useful, also, if you have a spare pin available. One would perhaps make it flash on and off all the time, showing that the circuit has power and is running, and awaiting the user input.

Your Drain and Source are correct.

Good Luck with your project.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The piezzo buzzer could live on two output pins of the micro.
Drive the pins anti phase unles its a module with own electronics in which case no cap as per above and only a single pin drive.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would recommend changing the connections on your MOSFET to batt+,igniter,drain,source,batt-. That way you won't be limiting the current to your igniter.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

zwox wrote:
I would recommend changing the connections on your MOSFET[...]

Agreed. If you want to use an N-Channel MOSFET, you need to use it as a low-side switch or generate a higher drive voltage. Could also use a P-Channel on the high-side, but the performance won't be as good for your money. Either way, be sure to get a real logic level MOSFET or you will never be able to switch the MOSFET full on.

You may also consider an external "arm" switch. One of my personal pet-peeves with low-end rocketry electronics is a distinct lack of safety consciousness - connecting the battery at the pad and then assembling is NOT good enough, there should be an external switch that allows a fully assembled, powered, system to be tested.

Martin Jay McKee

As with most things in engineering, the answer is an unabashed, "It depends."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

When I read the title I though you were making an in-flight timer that would time the duration between multiple stages firing. But I see it's an ignition countdown timer. Anyway you might consider a pullup resistor on you continuity input to VCC. If you're looking for future expansion, the addition of a visual countdown would add to the coolness factor. A single 7-segment LED or EL display could work.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the quick replies everyone.

DocJC wrote:
Many voltage regulators need several volts above their output voltage as their input voltage. A 6 V battery will not supply enough voltage input to many linear regulators. LDO, Low Drop Out linear regulators, however, are designed to operate with very little "excess" voltage on the input, above the output. As you look at voltage regulators keep this in mind.

Many times one puts a diode in series with the V+ supply so that if the user hooks the battery up backwards they won't damage the micro, the transistor, or other components. There is typically 0.6 or 0.7 V drop across a forward biased, (conducting), silicon diode. This means the battery voltage has to be even higher.


I did keep the regulator drop-out in mind, but thanks for pointing it out. The circuit will probably be powered by a 9V battery, so any regulator drop-out voltage won't be a big issue, besides the wasted power. A 9V battery can only be connected one way, so a diode may not be necessary. I'll put one in anyway, just to be safe.
DocJC wrote:
An option is to run the micro off a couple of watch batteries, and the ignitor off a separate battery. But it may not gain you much in this application.

Probably not, but I'll consider using a couple of button cells mounted directly on the circuit board. That would eliminate the voltage regulator.
DocJC wrote:
The piezo beeper should NOT have the capacitor in series with it. Depending on its specifications it may need a small resistor in series with it.

I kind of copied the capacitor+piezo layout from someone else's schematic. I believe the capacitor just blocks DC from getting to the piezo, basically acting as a high-pass filter. It might not actually be needed in this circuit, though. Is there any possible harm to the AVR if it's left in there?
DocJC wrote:
The LED used for Continuity checks needs a resistor in series with it.

That's actually a regular diode, not an LED. I put it there to prevent the higher, unregulated voltage from reaching the input pin. Can I leave out that diode, or should I leave it there?
DocJC wrote:
Note that all AVRs, (and other micros, for that matter), should have a by-pass capacitor across their V+ and Ground terminals, as close to the terminals as possible. A 0.1uF cap would be a good choice.

There is a capacitor from Vcc to ground near the voltage regulator on the AVR's side. I can move it closer to the AVR in the schematic to make it clear that it's close to the AVR.
DocJC wrote:
A small ON/Off switch would be a good addition.

I designed it so the battery can be disconnected to remove power. I'll put a power switch in if that turns out to be too much of a hassle.
DocJC wrote:
A second LED, (and series resistor), would not take up much space, and may prove to be useful, also, if you have a spare pin available. One would perhaps make it flash on and off all the time, showing that the circuit has power and is running, and awaiting the user input.

The buzzer is used for audible status information. It tells the user when the system is powered on, when the fuse is connected, when the launch timer expires, and maybe once per second before the launch timer expires. It also doubles as a locator beeper for recovering the rocket. I shamelessly copied these features from the PerfectFlite timer. ;)
Zwox wrote:
I would recommend changing the connections on your MOSFET to batt+,igniter,drain,source,batt-. That way you won't be limiting the current to your igniter.

I could move the igniter to the drain side, but how could I make the continuity sense input work? With the way it is in my circuit, the fuse pulls the pin low to ground. Should I put a pull-down resistor on the pin (and disable the internal pull-up resistor) so that the fuse pulls the pin high? Would 9 volts on the input pin harm the AVR? Or would I need a few diodes in series to drop the voltage going into the pin?
mckeemj wrote:
You may also consider an external "arm" switch. One of my personal pet-peeves with low-end rocketry electronics is a distinct lack of safety consciousness - connecting the battery at the pad and then assembling is NOT good enough, there should be an external switch that allows a fully assembled, powered, system to be tested.

I'm making this unit completely self-contained, with no external parts. But there is already at least one safety feature in this project (it's not apparent from the schematic since it's part of the firmware): the software will not start the launch timer until the G switch is closed for about half a second, so dropping the rocket on the ground (for example) won't activate the timer. The G switch will trigger at 2.1 G's or more, which is probably a lot more than normal handling would cause. But as DocJC mentioned, I could put an on/off switch on it, so I can enable it after it's installed and the rocket is on the launch pad (using a small access bay on the side of the rocket). I might also make a timer setting of 0 (all DIP switches set to "off") disable the launch timer completely, so you would have to set the timer duration once it's inside the rocket.
dksmall wrote:
When I read the title I though you were making an in-flight timer that would time the duration between multiple stages firing. But I see it's an ignition countdown timer. Anyway you might consider a pullup resistor on you continuity input to VCC. If you're looking for future expansion, the addition of a visual countdown would add to the coolness factor. A single 7-segment LED or EL display could work.

This is an in-flight timer for launching a second-stage rocket. This circuit will go inside the tube of the second stage to launch the second-stage motor after a specified time after the first-stage launch.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
This is an in-flight timer for launching a second-stage rocket. This circuit will go inside the tube of the second stage to launch the second-stage motor after a specified time after the first-stage launch

Maybe some us us have the wrong concept here. I assumed this was a model rocket timer, but now I think we're talking bigger, since you wouldn't need a timer for a 2nd stage ignition, since any more then a few seconds has the rocket pointing horizontal. How big is this rocket? And how much weight can you afford to use with this timer?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

christop wrote:
I'm making this unit completely self-contained, with no external parts.

There does not need to be any external parts as such to implement an "arm" feature. Simply mount a phono jack on the board and mount it inside the rocket so that a phono plug can be mounted through the side of the rocket. The plug acts as a short ( many ways to use this to implement arm. Remove the plug once the rocket is on the pad. Still, as I said, plenty of people willing to forgo this sort of thing. I have also seen variations that required only a simple rod that depressed a micro-switch, again mounted on the board, but then you have to worry about switch wear and how it responds to in-flight vibration.

It is true that g-switches are fairly safe, certainly better than naive barometric pressure sensor based trigger systems, but I don't feel that a true arm is really asking too much.

As for a continuity detect system if you move the MOSFET, simply add a pulldown across the MOSFET and sample at that point. If there is continuity, you will read battery voltage, otherwise ground.

dksmall wrote:
I assumed this was a model rocket timer, but now I think we're talking bigger, since you wouldn't need a timer for a 2nd stage ignition, since any more then a few seconds has the rocket pointing horizontal.

Only black-powder motors are ignitable without an electronic trigger system and there are plenty of small composite motors now ( down to Bs last I checked ) so there is plenty of reason to build a staging timer for even small model rockets; but weight ( and space ) can be an issue. The board is usually not the problem, it is the battery that can be interesting when you get really small.

Martin Jay McKee

As with most things in engineering, the answer is an unabashed, "It depends."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mckeemj wrote:
As for a continuity detect system if you move the MOSFET, simply add a pulldown across the MOSFET and sample at that point. If there is continuity, you will read battery voltage, otherwise ground.

I was thinking that, but since the battery voltage might be much higher than Vcc, it could damage the AVR. The datasheet for one of the AVR's says that an I/O pin is only guaranteed to take up to Vcc+0.5V.

I just traced the PerfectFlite timer, and it appears (I say "appears" because the traces run under the PIC so it's hard to tell) to have a pair of resistors in series between Drain and Source, and the continuity input pin is connected to the center of the resistors. So that looks like a voltage divider to send less voltage to the input pin. That should work fine, I believe, but it somewhat limits the range of voltages of the ignition battery, since the output voltage of the voltage divider has to be between 0.6Vcc (with Vcc = 2.4V - 5.5V) and Vcc+0.5.

Instead of a voltage divider, I was thinking about using an NPN transistor (emitter->ground, collector->pin, base->drain). This should drive the pin low when there is current across the fuse. Any thoughts on this?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Instead of a voltage divider, I was thinking about using an NPN transistor (emitter->ground, collector->pin, base->drain). This should drive the pin low when there is current across the fuse. Any thoughts on this?

As long as you have a resistor in series with the base of the transistor - otherwise the fuse current will flow between the base-emitter junction that will appear as a diode.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mckeemj wrote:
christop wrote:
I'm making this unit completely self-contained, with no external parts.

There does not need to be any external parts as such to implement an "arm" feature. Simply mount a phono jack on the board and mount it inside the rocket so that a phono plug can be mounted through the side of the rocket. The plug acts as a short ( many ways to use this to implement arm. Remove the plug once the rocket is on the pad. Still, as I said, plenty of people willing to forgo this sort of thing. I have also seen variations that required only a simple rod that depressed a micro-switch, again mounted on the board, but then you have to worry about switch wear and how it responds to in-flight vibration.

Ok, I thought you meant something like a switch that closes (or opens) when the rocket launches, such as with some sort of mechanical connection with the launch rod or launch pad.

I like the idea of using a phono jack to arm/disarm the timer. I'll try to include something like that in my timer.

Christopher

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
Quote:
Instead of a voltage divider, I was thinking about using an NPN transistor (emitter->ground, collector->pin, base->drain). This should drive the pin low when there is current across the fuse. Any thoughts on this?

As long as you have a resistor in series with the base of the transistor - otherwise the fuse current will flow between the base-emitter junction that will appear as a diode.

That's a good idea. Don't want to have premature ignition (or a fried transistor), now do we? :D

EDIT: also, do I need to put in a pull-down resistor on the base to keep it from floating when there is no fuse attached?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
do I need to put in a pull-down resistor on the base to keep it from floating when there is no fuse attached?

it might be a good idea - 10k should be sufficient, but the actual value will depend on the base resistor. You need around 0.7V to saturate the transistor.

premature ignition can be a problem but there are treatments for it now.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
premature ignition can be a problem but there are treatments for it now.

Anxiety around the rocket range too, huh?

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, I have the MOSFET and continuity sense all figured out now. Thanks guys.

Now I have a question about driving the piezo. In the PerfectFlite minitimer3, the piezo speaker is connected between the battery + (higher than Vcc) and the microcontroller's output pin, so it can supply a higher voltage to the piezo than if it were connected between the pin and ground.

The AVR datasheet I have* doesn't limit the sink voltage on an output pin, but only the current (max 60 mA for all ports). As long as I keep the current low enough (say, with a 470Ω resistor in series with the piezo), will the AVR take 9V without possible damage?

* http://www.atmel.com/dyn/resourc...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

what is the absolute max rating of the atmel chip?????

my guess... definitely not 9V, so that makes it a NO

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your general purpose AVR digital I/O pin won't take 9V.
The series resistor will limit the current, but when no current is flowing, there is no voltage drop across either the piezo or the resistor, and the AVR pin sees 9V. (OK, maybe not, what is the open circuit impedance of the piezo?, guess it depends on the type of piezo...).
The Electrical Specifications section of the data sheet gives the details on this. Most AVRs, (except Xmegas), can run at 5V, and the voltage applied to a pin should not be greater than this. (Actually Vcc + 0.5V Max)
There may be an AVR with an Open Collector output which could be used for this, but I can't think of one right now.
The usual approach would be to either drive the piezo with a pin, (Pin to R to Piezo to Gnd, or V+ to R to piezo to pin), or use an external transistor if you want the higher drive voltage.

For your application it would be desirable to skip the external transistor for both size and power reasons.

If you select your piezo carefully you can also skip the series resistor. You would like the current to be <= about 20 mA on most AVR digital I/O pins, but for most AVRs the Max current per pin is 40 mA, so there is a little bit of wiggle room there, particularly if you are only building one unit, not many.

JC