Mosfets, 4016 and more.....

Jon_

Member
Hi,

I am trying to build a circuit which will test and fire pyro igniters (i know picaxe is not seen as a suitable micrprocessor for this type of job but this is not what i want to discuss here!)

when testing the mosfet is not 'switched' (in search for a better word) but the picaxe is using the 4016 to output one side and input the other side to read the adc value to see if the igniter is faulty. When a fire signal is sent the mosfet is fired.

The problem being, i have an idea for circuit design attached problems being:

1) current, the igniter needs over 200ma to reliably fire, i have a 500ma PSU so there is no worry, however, the 4016 will not be able to take that sort of current on its input/output (20ma max if i remember right). Therefore, using Mr ohms law i figure something like 1k resistor on each gate of the 4016 should be enough not to destroy the 4016 when firing.

2) protecting the picaxe, the resistor value would have to be worked out to stop anything happening from the drain to the picaxe but i am not sure how to work it out.

any help would be greatly appreciated, it has been a long time since i have used a mosfet!

Jon
 

Attachments

Dippy

Moderator
Sorry, I'm having loads of trouble trying to follow your description.

If I do a search on CD4016 I get a bilateral switch.
And you can't run a P chan like that. It'll be partly on when you think it's off.
(Are you safe doing this or should I call a nurse? :) )

If you want a trigger dead-simple then use a logic level low-sided N chan.
If you want P chan you'll need to stick another tranny in between.
I know nothing about pyro igniters.

Are you trying to put a small current through to detect the igniter circuit is OK?
If so use another tranny with a series resistor and take the ADC either side of resistor. (Open circuit = 0 voltage drop).
 

Jon_

Member
wait a minute i may have drawn it upside down with the mosfet, my bad.

"Are you trying to put a small current through to detect the igniter circuit is OK?
If so use another tranny with a series resistor and take the ADC either side of resistor. (Open circuit = 0 voltage drop)."

that is exactly what i am trying to do, i was using the switch to make a seperate circuit from the mosfet, if you see what i mean - maybe i am trying to over complicate something which is actually very simple.

what i am tyring to avoid is destroying the picaxe, so i need to be able to test using adc and fire. The firing pulse needs to over 200ma and the test current needs to around 20ma which is the defualt output for a logic level chip anyway.

I am not sure what you mean by the adc detecting either side, could you draw it for me as i am being a but stupid? :-~
 

Dippy

Moderator
Aaaaaaaaaaaaaaaaaaaaargh! "My bad" .... Your "bad" what? Drawing?
(Sorry, I just hate that phrase "my bad". It's so awful. It's a little Monk-like problem I have ;) )


You've done a P chan as a high sided switch. Fine.
But if you connect the Gate to a PICAXE I/O then what will Vgs be?
Can you see the problem?
A simple NPN plus a resistor cures the problem instantly.

I haven't got time to draw it sorry.

There are several ways to stick in a series resistor, basically you're using it like a shunt resistor in current sensing. Have a think.
 

Jaguarjoe

Senior Member
The Picaxe will have a hard time turning an IRF530 on because it requires about 10 volts to do so. A logic level MOSFET like an IRL530 would work.
 

Dippy

Moderator
I've been looking at the wrong MOSFET.

Sorry, I did it wrong.
You have selected an N chan MOSFET.

Logic or not, there is no way it'll work properly in that ciruit.

If, you put it on the low-side (igniter to gnd) it'll work.
I don't think you'll need a logic level for a mere 200mA.

In fact, assuming an igniter is slow to respond, you could PWm the gate at a low duty to pass a low average current and have a little shunt and do your connection test. A secondary line might be more reliable/safe though. Just a thought.
 
Last edited:

Jon_

Member
Logic or not, there is no way it'll work properly in that ciruit.

If, you put it on the low-side (igniter to gnd) it'll work.
I don't think you'll need a logic level for a mere 200mA.

In fact, assuming an igniter is slow to respond, you could PWm the gate at a low duty to pass a low average current and have a little shunt and do your connection test. A secondary line might be more reliable/safe though. Just a thought.
wow this conversation is going round and round in my head tonight, should not be posting in my state lol.

If the igniter is on the low side than it is the same side as my original diagram?

I am pretty sure the diagram i have uploaded is wrong but i can't see how else you mean add a shunt resistor, plus how is picaxe going to cope with the large current to be used to fire the igniter? Using PWM is a damn good idea mind but i am not too sure i am confident in how to use it.
 

Attachments

eclectic

Moderator
@Jon

1. Is it possible for you to post jpg rather than pdf?
It saves the hassle of opening.

2. Can you post some details of the "igniter"?
(Assuming that it's legal.)

e
 

Attachments

Jon_

Member
sorry, i tend to always use pdfs so i just posted the same format here, i will try to remember jpegs next time ;-)

an igniter is a circuit board with a small strip of copper over the end, the whole thing is then cover in a pyrotechnic material. when a high enough current is passed through the copper tip (usually around 200ma for commericial igniters) it will become hot enough to set light to the pyrotechnic material causing it to explode. At lower currents, usually 20ma max is commercially recammended you can test that the igniter works as there is current passing through the copper strip but nt enough current to set if off. They are perfectly legal just you will find it hard to find people to sell them to you ;-)

hope that helps.
 

eclectic

Moderator
an igniter is a circuit board with a small strip of copper over the end, the whole thing is then cover in a pyrotechnic material. snip
They are perfectly legal just you will find it hard to find people to sell them to you ;-)

hope that helps.

1. If they're legal, then why .....
or, do you need a Licence?

2. What is the resistance of a typical igniter?

e
 

Jon_

Member
no, they are cateorised as fusing material which is still legal in this country without a license for model rocket users.

resistance can change from 1 to 3 ohms depending on manufacturer.
 

BeanieBots

Moderator
Hi,

I am trying to build a circuit which will test and fire pyro igniters (i know picaxe is not seen as a suitable micrprocessor for this type of job but this is not what i want to discuss here!)
Correct, it's not suitable, so where is your failsafe circuitry to take that into account?

All I can see is an N channel MOSFET trying to be used in a P channel circuit. You can't do that. It won't work.
What exactly is the purpose of the analogue switches?
Also, if the resistance of your igniters are ~1R, then your 'switch' needs to cope with ~5A even if the igniter only requires 200mA.

EDIT:
Why do you need 9v to get 200mA into a 1-3 ohm load?
 

Dippy

Moderator
I think you need to read up on MOSFETs.

A MOSFET needs a certain voltage at the Gate with-respect-to the Source.

An N channel needs a positive voltage at Gate wrt Source.
A P channel needs a negative voltage at Gate wrt Source.

You have to have your N channel MOSFET where your drawing shows R2.

"plus how is picaxe going to cope with the large current to be used to fire the igniter"
- Eh?
The MOSFET deals with the large current.
Your PICAXE pin will only 'see' a tiny current.

Here is quick idea using 2 MOSFETs; a fat one and a thin one. You must test as it's just a suggestion.
When the little MOSFET is ON the volts to the PICAXE = ~0V.
When little MOSFET OFF and IGniter in-circuit it will be ~4.5 V.
When little MOSFET OFF but no IGniter in-circuit it will be ~0V

When big MOSFET goes on ... BANG!

I'm guessing at values as I know nout about Igniters.

I might be tempted to put a few uF on the Gate of the FAT FET, that would prevent little sparkles or brief signals causing an unwanted trigger.

With careful design I reckon it could be done with one MOSFET and PWMing but I'm not going to suggest it for fear of accidents.

You really should have a good old fashioned master switch as well for the main Volts. During PICAXE/circuit power up you may have some glitches that you regret. I've given up going on about safety, the ball is in your court and it's up to you 100% to check and test etc. Gosh that 40 minutes flew by...
 

Attachments

Last edited:

Jon_

Member
thanks dippy. i will look into this, believe me, your 40mins was well spent and i am very appreciate of your effort!
 

hippy

Ex-Staff (retired)
It looks to me to be a case where the old adage applies that if you don't know enough to know how it should be done without having to ask then you should not be doing it.

Basically forget the proposed application and first consider the more abstract problem of how to measure a resistance which seems to be between 1R and 3R while limiting current through that resistor to a few milliamps. You need to check resistance is greater than a certain value and less than another.

Before doing anything else you want to have the above working on passive resistors. You need to prove to yourself that it does work and meets all requirements, then get the solution peer reviewed and confirmed to be valid and safe in all circumstances.
 

pyrogaz

Member
I've always been a little wary of continuity testing of igniters, and I can assure you I've used several thousand of these over the years (hence my username). In fact even when using a proprietory firing system I've never used the test facility as the manufacturing tolerances of igniters is not particularly tight.

It's interesting to note that igniters are transported with their leads shorted, and I can recall at least three occasions of them flashing in my hand simply from what I assume was static discharge.

I'm not saying don't attempt this project, just that even the smallest spike when staring up your system may be sufficient for an unwanted ignition.
 

boriz

Senior Member
To provide 200mA and 20mA, you need a constant current source. It’s not as simple as you seem think. Do you know ohms law?

Also, my guess is that you should test the resistance of the igniter circuit, not just continuity. And for safety’s sake, probably better conducted at significantly less that 20mA (as Pyrogaz has indicated). Likely requiring some amplification, an op-amp maybe, in addition to a constant current source, and failsafe design. Again, much more complicated than you seem to think it is.

If you really want to build this rather than buy one, I suggest you find a working + tested circuit from a reputable source online and copy it exactly. If however, you wish to design one from scratch, you’ll have to do a lot of research/studying first.

This is a safety critical application. You can’t afford to get it wrong.
 

Jon_

Member
"It looks to me to be a case where the old adage applies that if you don't know enough to know how it should be done without having to ask then you should not be doing it."

I don;t wish to sound rude but if i didn't know i wouldn't ask, isn't that what these forums are for? :confused:


Anyway, well CCS was what i was playing around with but again was not too sure how to implement this into this application. The circuit attached(CCS20ma) should give you a constant current of 19ma at R3 i believe. It was worked out to be 20ma but if i remember my days of transistors there is something about using I = Vin/R5 which causes an inaccraucy to do with the base current.

Therefore, reproducing the circuit with something like an 45R resistor would produce a firing current.

However, still the issue remains of being able to measure the resistance across R3? Switching between testing and firing using a solid state device (such as a mosfet etc) is also a consideration as relays are seen to be dangerous in this application.

Finding a circuit to copy for this application is impossible, i know that through months of searching, hence why i am trying to design one.

all help is very appreciated, i am not trying to get you guys to design the circuit for me, just help me understand how to ;-)
 

Attachments

Dippy

Moderator
"I don;t wish to sound rude but if i didn't know i wouldn't ask,"
- do you mean: "If I knew then I wouldn't ask" ?
I'm going to sit on the fence with that one and say that maybe it's the degree.

Absolutely right, I respect what you are saying; if you don't know something then ask.
But..
1. Remember the potential hazards with this type of project.
2. Remember that kiddy-winkies and novices and total unknowns look at this Forum.
3. And don't forget that your first attempt at a circuit was miles out.

So, it may be that as your first attempt was so far out that people thought: "Oh dear, he might not know too much electronics".

As there is a younger audience on this Forum then the Nanny Factor has to be quite high.
Remember too, that hippy is a Rev-Ed employee and he has to be seen to cover Rev-Ed's bottom wrt reputation any liability and he (sensibly) does not condone anything hazardous.

Of course, no amount of "Nanny says Don't do it" can stop anyone, but at least the cautionary note has been written.


If I were demolishing your house with explosives and asked you how to wire the detonator you'd be a little worried.

Hopefully this gives you both sides of the argument ?
 

BeanieBots

Moderator
I'd have great concerns with using 20mA as a test for continuity.
Why such a large current?

In my miss-spent youth, we used to use broken light bulbs as detonators.
The filament of a 50mA Lilliput lamp could ignite newspaper at 10mA.
I'm sure a faulty igniter could "ignite" at even lower currents:eek:
 

hippy

Ex-Staff (retired)
"It looks to me to be a case where the old adage applies that if you don't know enough to know how it should be done without having to ask then you should not be doing it."

I don;t wish to sound rude but if i didn't know i wouldn't ask, isn't that what these forums are for? :confused:
There was no offence intended, I do understand your point, and the question of what forums are for is an interesting question.

Forums are simply places where members can give their opinions and advice on a topic, but such advice is usually of unknown quality and can sometimes be wrong or aspects of an issue overlooked. What I was saying is that you need to have the a higher prerequisite level of knowledge to be able to judge the quality of the advice and if you have such a suitable level of knowledge you likely wouldn't need to ask the question.

For a safety critical system, on top of how to do it there is how to do it so it is always safe which most members would probably overlook or not consider because it's not in their field of expertise. If it's not your expertise either then you don't know if the safety critical aspects have been satisfactorily covered.

For example, we have a 5V supply and a resistor which we need to put 20mA through; the most likely reply would be to use a 250R resistor, R=V/I. But how many will have considered accuracy of the voltage, tolerance or temperature variations of the resistor or considered what happens should that resistor fail short-circuit ?

Most of us probably had how to cross a road drummed into us as kids, "always stop, look and listen, don't simply run into a road". Valuable advice, except perhaps when being pursued by a pack of lions which have escaped from the zoo. It's not bad advice, is entirely suitable for the normal situation, but for safety critical issues one has to consider all abnormal situations as well.
 

Jon_

Member
ok guys, we are sort of going well outside the bounds of the electronics which i was originally asking help about. Lets assume that i am not a child and possibly did an a-level in electronics a while back and now trying to use those skills again but can't really remember ;-). maybe that will put us back on track, and if children are reading this, you should not be playing with igniters!!!

advice is a very interesting point, however, especially as Hippy has said about who thinks of safety as there first thoughts.

The reason for picking 20ma as a testing current is because of the long cable lengths which could be between the circuit tester and the igniter, typically longer than 5m. I need to make sure the tester is reliable or else i might as well just send them a firing current.

I am very interested in the electronics behind this, so that is why i want to push this.
 

hippy

Ex-Staff (retired)
The reason for picking 20ma as a testing current is because of the long cable lengths which could be between the circuit tester and the igniter, typically longer than 5m. I need to make sure the tester is reliable or else i might as well just send them a firing current.
Reliable will therefore also include considering circumstances when the cable runs are shorter or have lower impedance than usually expected. While some safety aspects are in the end-user's hands you need to approach it from an angle that you must do all that you can to make it as safe as possible no matter what 'stupid things' an end-user may do, you have to assume they won't have read nor understood the manual won't necessarily be following recommended procedures.

What this suggests to me is some circuit which increases current from a minimal amount up to a maximum which is guaranteed not to trigger the device even if perfect zero-ohm cables are used. You then either need to 'fail testing' and stop or need a lock-out mechanism to control proceeding to using a higher current.

I don't have enough electronics knowledge to suggest how such a thing may be implemented.

One thing to consider is that a short pulse of current may be better than a continuous current as that should have less heating effect, but it may be that a slower rising and falling analogue 'pulse' rather than the sharp edge of a square pulse is better. I don't know enough about the characteristics of such devices to give authoritative advice either way.
 

hippy

Ex-Staff (retired)
Lets assume that i am not a child and possibly did an a-level in electronics a while back and now trying to use those skills again but can't really remember ;-)
For safety critical it's usually best to consider the worse but you make a valid point that advice for one is not necessarily the best advice for another.

People do have to make judgements on how to respond to questions - especially where there is an issue of safety involved - and that means assessing who and what they are dealing with, many factors will affect that from how a person poses a question, their apparent knowledge of a field and even their use of grammar.

It would help if we knew your actual experience, proficiency with electronics, PICAXE, microcontrollers, and programming, plus some background and real-life experiences where they have a bearing on the topic being discussed.
 

hippy

Ex-Staff (retired)

BeanieBots

Moderator
That is quite a cunning & clever design and is probably close to as good as it can get.
The key point is that a micro failure which leaves the line either high or low will not cause sufficient for a fully correct igniter to go off.
Failure of the transistor either short or open will not cause ignition.
Failure of any of the other components is 'unlikely' to cause ignition because it would result in a failure of the Cock-Croft/Walton multiplier stage from generating high voltage to the FET gate.

Steady state continuity test current is ~1mA

I'd be intrigued to see if anyone CAN see a single component failure mechanism that could result in ignition.
 

hippy

Ex-Staff (retired)
Not sure how MOSFET failing short-circuit won't short C6 through igniter to 0V - But not saying it's likely and I don't know enough to say if it ever could fail in such a way.

100K fails shorted with micro pin output low - Though perhaps a two point failure and probably equally unlikely.

If taking the "what if a loose bit of wire gets in the box" approach there's more scope for failure.
 

BeanieBots

Moderator
MOSFET failed short should result in current limited by R6 to ~25mA.
C6 WILL indeed be discharged through the igniter if it suddenly went short after a period of power up.
However, what are the odds on that. They usually go after a period of conduction. If it was short AT power up, then I don't think 25mA would ignite unless the igniter was also faulty.

The loose wire scenario would my biggest concern for failure but even that would require the right voltage to the right point to cause ignition.

FWIW, there's a BIG difference in probability between "failed" and "failing".

So, add some more redundancy, a P channel version of the same concept between battery and R6.
 
Last edited:

Dippy

Moderator
Blimey, based on this Forum's tales of doom, it'll be happening every 5 minutes!
... it only needs to happen once at the wrong time.
Hence my suggestion to use 2 (MOSFETs).

Haha. Be fair BB, you did say: "I'd be intrigued to see if anyone CAN see a single component failure mechanism that could result in ignition"
- so I did. I gave a possible scenario using a statistically feasible failure breakdown modal risk analysys situational conditionalityisation .... :) :)

The best way would be another MOSFET to precharge the capacitor shortly before trigger.
In fact a feedback could be used to ensure the main N channel was at a high impedance before the charge.
 

BeanieBots

Moderator
Don't get me wrong. I'm not trying to overly defend the design.
After all, it's not one of mine;)
But let's be realistic about failure mechanisms and likelyhood.
Yes, the MOSFET actually failing short once at voltage could trigger it.

The most likely and pertinent to PICAXE is nicely covered.
 
Last edited:

Jon_

Member
you see, now i am really liking this forum, lots of intriguing electronics :)

However, now i am at a loss lol, i am not too sure how the circuit given is actually working.

Firstly. you can test continuity by seeing if the port is high, due to the connection between the power source through the igniter.

to fire you would then have to drive the micro port low to start the charge pump, however, this would have to be done in some sort of square wave as it would have to be done a number of times to get the amount of charge needed to trigger the mosfet.

Is that how it works or do i have completely the wrong idea?
 

eclectic

Moderator
@Jon
from post #25:
It would help if we knew your actual experience, proficiency with electronics,
PICAXE, microcontrollers, and programming, plus some background and real-life experiences
where they have a bearing on the topic being discussed.


e
 

Jon_

Member
well ok, my actual experience is that i am pyrotechnician in my spare time working for a company, i do not claim to be all knowing in the field and none of the concepts discussed here would be used on any display i do, this is something for my own interests.
When firing displays i tend to either hand fire or use an industry wide piece of kit called FireOne.

As i said i did an a-level in electronics a few years ago and have spent at least five years working with the picaxe system working on robotics. Digital electronics is by far my strongest sub section of electronics compared to analogue electronics. Even though i have spent time working with capacitors, resistors, op-amps, triacs, transistors, mosfets and various cricuitary for them i do not know every type or circuit that exists when amulgamating(how do you spell that word?) them together.

I hope this short background helps.
 

hippy

Ex-Staff (retired)
to fire you would then have to drive the micro port low to start the charge pump, however, this would have to be done in some sort of square wave as it would have to be done a number of times to get the amount of charge needed to trigger the mosfet.

Is that how it works or do i have completely the wrong idea?
That's it - the requirement to put out high and low signals means that single glitches or too few pulses would not be enough to cause activation.

From a software perspective it seems logical at first glance to use a pin which supports PWMOUT so you can easily and automatically deliver that pulsing when firing. That's actually the opposite of what should be done. Something which inadvertently produces PWMOUT would trigger the device. Accidentally creating and maintaining the correct pulsing would be more unlikely when using timed bit-banging to create the pulse which is how it would better be done.
 

eclectic

Moderator
well ok, my actual experience is that i am pyrotechnician in my spare time working for a company, i do not claim to be all knowing in the field and none of the concepts discussed here would be used on any display i do, this is something for my own interests.
When firing displays i tend to either hand fire or use an industry wide piece of kit called FireOne.

As i said i did an a-level in electronics a few years ago and have spent at least five years working with the picaxe system working on robotics. Digital electronics is by far my strongest sub section of electronics compared to analogue electronics. Even though i have spent time working with capacitors, resistors, op-amps, triacs, transistors, mosfets and various cricuitary for them i do not know every type or circuit that exists when amulgamating(how do you spell that word?) them together.

I hope this short background helps.
This is totally my personal G.O.M. opinion c/w prejudices
or ? post-judices?


As background, read post #25
http://www.picaxeforum.co.uk/showthread.php?t=16849&page=3

A couple of years ago, I had a few quotes for my house re-wiring.
Me and her Ladyship read all the quotes.
We threw away any
that had spelling/grammar errors.
Why?

Well, I expected someone who is totally meticulous.
This is a life-critical scenario. (Me!)
And, if they can't be bothered to check everything beforehand,
then bin!
I'm paying!

And, if I went to a Firework display, I'd expect the same.
Actually more!
There are lots of people involved.

Rant over.
Morality / Ethics still in place.

e
 

Jon_

Member
i am not sure how that rant actually helps anyone other than seem a little offensive? I am merely asking someone more experienced than myself to help break down a circuit diagram so i can also understand how it works, knowledge is to be shared afterall.

i read your last post eclectic as if you think i don't give a damn about anyone and the safety of anyone. Every show i do has a risk assesment which details over 40 pages, each show is carefully judged each night to what is fired and how. I never assume anything. please do not make judgements through my mis-spellings in posts and believe these can add up as black marks against me to later ignore any questions i have. I am the one asking for help and in the lower position in the order of power around here and would prefer not to be demoralised publicly by your personal opinions. i do not wish to be offensive in this comment, just an opinion.

This is a theoretical conversation about firing circuits, unless i was completely happy knowing how it works, which i don;t hence why i am asking, then i would never expect anyone to believe i would use it.
 

eclectic

Moderator
Snip
i read your last post eclectic as if you think i don't give a damn about anyone and the safety of anyone.
Snip
.
No I did NOT.
And, I could say that your remark is offensive.
But I won't. :)

Just a little message:
Demonstrate CREDIBILITY.
You are talking about a situation which
could threaten lives.

Show that you are meticulous.
In EVERTHING.
Beforehand. :)

And, no apologies for the bad grammar and syntax.

e
 
Top