Author Topic: Safe Way of Detecting EMP by MCU  (Read 25789 times)

0 Members and 1 Guest are viewing this topic.

Offline scrat

  • Frequent Contributor
  • **
  • Posts: 608
  • Country: it
Re: Safe Way of Detecting EMP by MCU
« Reply #25 on: June 30, 2010, 11:58:48 am »
Ideally, opamps and comparators only differ in the fact that the last have saturated output.
In the real world, comparators are designed to work always in saturation (high or low output) and to move very fast from one level to the opposite (while opamps are typically slow in moving from saturation), they are meant to be overdriven, even with inputs beyond their supply rails. The ones you used (LM393) have also open collector output (that's why you must put pull-up resistor).
However, you can (being careful) use one in place of the other.
You call them opamps when you put them with negative feedback, while you say they are comparators if there is none ore positive feedback (positive feedback means memory as an hysteresis, so you have Schmitt triggers).

I think the best way to do the job is using a precision rectifier and a schmitt trigger, using an opamp for the rectifier and a comparator for the trigger (the very best would be a full-wave precision rect, but requires another opamp). If you use opamps (single supply, as LM358), eliminate the pull-up resistors at the outputs. You can set the gain on the rectifier (N multiplier), the threshold (V+ * R4/(R3+R4)) and hysteresis band (V+ * R1/(R2+R1)).
One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. - Elbert Hubbard
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11714
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #26 on: June 30, 2010, 12:12:10 pm »
olala! thanx guys! simon n scrat.mariano! i just got my signal to appear in LTSpice+my "kiddo" circuit and Vdd to simulate some sine osc. have to manually type every bit since i cannot find any option for the signal, sine+decay. not so smooth though. here's the file, later i will add the suggested circuits here. Cheers!
« Last Edit: June 30, 2010, 12:13:44 pm by shafri »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20840
  • Country: gb
  • 0999
Re: Safe Way of Detecting EMP by MCU
« Reply #27 on: June 30, 2010, 01:26:45 pm »
@hero = i dont think i have the part for your logic (CD4001), i'll try yours if i found it.

It's a very common part, it can be replaced with the HEF4001 or 74C02.

You can also use NAND gates, i.e. CD4011 or 74C00 if a couple of modifications are made, see the schematic below.

The circuit is simple, the first gate is configured as a linear amplifier which increases small singles to a level high enough to trigger a logic gate. The second two gates form a monostable multivibrator, which remains on for a short length of time, once triggered.
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11714
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #28 on: June 30, 2010, 02:05:20 pm »
@hero, i cant even find your gates in LTSpice, i only found and and or gate in digital subdir with like 5 pin ???. i've sim mariano and zad's circuitry in LT. here it shows.

mariano's one is almost exactly as my 1st sketch (blue graph, not really apparent there in the downsampled image. except... there is some delay... 10-20 us, so far, i will try the smallest through hole cap available to me, ie 0.1uF (easily to be put on breadboard. smaller cap is much preferable as it will generate shorter "high" signal. changing the Vref and R4 will help as well.

gotta put it in reality later. i want to fool around somemore :P
« Last Edit: June 30, 2010, 02:14:29 pm by shafri »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11714
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #29 on: June 30, 2010, 02:24:03 pm »
btw. to my surprise, the original signal will got somehow rectified/modified just before it enters the ic/transistor. the ic is like saying STOP! you have to max out on certain +ve voltage, or min down to some certain -ve voltage. without connecting to any component (just the inductor connected to oscilloscope), the signal is like symetrical top and bottom, but when connected to trans base, or ic input, that signal will be changed, its like it saturate at some +ve volt. this happened not even i connected the trans collector and emitter yet to any device, and not even connecting the Vdd supply ??? maybe some electrons fooling around inside ??? magic! but this behaviour is not seen in LTSpice simulation.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11714
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #30 on: June 30, 2010, 02:43:17 pm »
You don't want or need a transistor, chances are you will damage it anyhow
wont it be damaging the comparator's input as well? for mariano's circuit?
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline jahonen

  • Super Contributor
  • ***
  • Posts: 1055
  • Country: fi
Re: Safe Way of Detecting EMP by MCU
« Reply #31 on: June 30, 2010, 02:49:30 pm »
Here is an example how you can make sine + decay using some primitives (not very obvious, though). You can adjust the decay by changing the properties (time constants) of the exp-voltage source.

Regards,
Janne
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11714
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #32 on: June 30, 2010, 03:04:14 pm »
thats pretty obvious. thats how should be done using formulation to composite both sine+decay/shaping. i didnt know that, thanx.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20840
  • Country: gb
  • 0999
Re: Safe Way of Detecting EMP by MCU
« Reply #33 on: June 30, 2010, 04:25:21 pm »
@hero, i cant even find your gates in LTSpice, i only found and and or gate in digital subdir with like 5 pin ???.
You need to download them from the Yahoo group.

You shouldn't need to simulate it, test it on a breadboard - it's the only way to find out it works for sure.
 

Offline scrat

  • Frequent Contributor
  • **
  • Posts: 608
  • Country: it
Re: Safe Way of Detecting EMP by MCU
« Reply #34 on: June 30, 2010, 04:41:13 pm »
btw. to my surprise, the original signal will got somehow rectified/modified just before it enters the ic/transistor. the ic is like saying STOP! you have to max out on certain +ve voltage, or min down to some certain -ve voltage. without connecting to any component (just the inductor connected to oscilloscope), the signal is like symetrical top and bottom, but when connected to trans base, or ic input, that signal will be changed, its like it saturate at some +ve volt. this happened not even i connected the trans collector and emitter yet to any device, and not even connecting the Vdd supply ??? maybe some electrons fooling around inside ??? magic! but this behaviour is not seen in LTSpice simulation.


This is what I think is happening, just because I hardly believe in miracles  ;)
It can be expected with the transistor, so with the IC. The strange thing is that LTspice couldn't predict it.
As you connect to the BJT's base, with emitter to gnd, input resistance varies as you reach 0.6-0.7 V, when the Base-Emitter diode starts conducting. So your impedance (which has unknown, but I suppose high series impedance) "shunts" the signal portion exceeding that threshold, saturating.
It is although very strange that it happens even with only the IC input connected...
One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. - Elbert Hubbard
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11714
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #35 on: July 01, 2010, 02:40:16 am »
You shouldn't need to simulate it, test it on a breadboard - it's the only way to find out it works for sure.
you are right, maybe i shouldnt simulate it. simulating mariano's circuit give some hope, but... when i tried it in reality, the following picture tells the story. its nowhere near, not even similar in shape between sim and real. not sure whats missing, some sim parameters? my wiring error? or the nature of the "limited" sim software. i've tried it with and without pull up and down resistor.

the picture shows the result of the simulation, and at the bottom right is the result of osciloscope reading the real circuit.
the blue graph from osc is not showing any "high" signal even though i've tried to lower the Vref at around 0.3V.
« Last Edit: July 01, 2010, 02:43:39 am by shafri »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline Time

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: us
Re: Safe Way of Detecting EMP by MCU
« Reply #36 on: July 01, 2010, 02:45:43 am »
If the camera elements are not too small, I would place an integrating rogowski coil around the voltage or ground return of the flash bulb as a means of detecting the timing of the flash.  This would require breaking into the camera housing though.  If you are trying to make something that does not require opening the camera housing up this will not work, obviously.
-Time
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11714
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #37 on: July 01, 2010, 03:19:35 am »
If the camera elements are not too small, I would place an integrating rogowski coil around the voltage or ground return of the flash bulb as a means of detecting the timing of the flash.  This would require breaking into the camera housing though.  If you are trying to make something that does not require opening the camera housing up this will not work, obviously.
i prefer the non contact version. from what i see, there are prospect for this kind of non contact version of EMP detection, as someone mentioned... detecting nuclear explosion in upper space atmosphere.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline Time

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: us
Re: Safe Way of Detecting EMP by MCU
« Reply #38 on: July 01, 2010, 03:30:11 am »
If the camera elements are not too small, I would place an integrating rogowski coil around the voltage or ground return of the flash bulb as a means of detecting the timing of the flash.  This would require breaking into the camera housing though.  If you are trying to make something that does not require opening the camera housing up this will not work, obviously.
i prefer the non contact version. from what i see, there are prospect for this kind of non contact version of EMP detection, as someone mentioned... detecting nuclear explosion in upper space atmosphere.


A rogowski coil is a non contact probe.  Its a B-dot probe, essentially.

You can't really compare detecting an EMP from a nuclear explosion to detecting the faint EMI signature of your flashbulb.

-Time
 

Offline marianoapp

  • Regular Contributor
  • *
  • Posts: 67
Re: Safe Way of Detecting EMP by MCU
« Reply #39 on: July 01, 2010, 03:39:52 am »
just a few things i noticed looking at the screenshot:
- in the simulation the input signal has a maximum voltage of 6Vpp and lasts for 60us, and on the rigol has a maximum voltage of 2Vpp and lasts for 25us
- the cap is too big, the signal probably don't even have time charge it up before it fades away. You are charging it with just 0.3V, and even if it charges up the cap voltage will alway be < 0.3V

anyway you should try amplify the signal a bit more..

good luck
 

Offline scrat

  • Frequent Contributor
  • **
  • Posts: 608
  • Country: it
Re: Safe Way of Detecting EMP by MCU
« Reply #40 on: July 01, 2010, 09:56:34 am »
Mariano is right, you can amplify. But since the signal is quite strong, I'm confident that you can use a precision rectifier, even in the full-wave (but half gain) version below. A very important thing is the hysteresis within the comparator (Schmitt).

However, in every circuit you will use, you must have high resistance input. I think this is the trouble in your simulation. Your source surely has high output resistance, otherwise you could extract a very high power level from it (for example, 3 Vpp/1k, as you simulated, means 1.125 mWrms, which is fairly high for a magnetic coupling like that).
In the sim your input is an ideal voltage source, so you don't see the same as in real world when you load it with 1k resistance. Try to use (in the real world) a higher resistance to ground.
You can even measure impedance of your real source to simulate it then in the right way: measure the input signal at open circuit with the scope (probe 10M, better than scope's input 1M) and then put a resistance, tuning it until your signal reaches half of the voltage you measured at open circuit. That value is your source's series resistance, so you can put it on Kicad.

One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. - Elbert Hubbard
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20840
  • Country: gb
  • 0999
Re: Safe Way of Detecting EMP by MCU
« Reply #41 on: July 01, 2010, 12:11:39 pm »
It looks like things are becoming over engineered.

Why do you need a precision rectifier?

Run the op-amp off a single supply and add a clamping diode if one is not already included in the IC package.

The circuit won't work with the LM193 because it will oscillate when biased in the linear region so you must use an op-amp but the LM358 won't be fast enough.

Why not use the MCU's built-in comparator?

I don't see the need for an amplifier. Set the reference voltage to about half the peek voltage of the signal you need to trigger and you'll get a nice square wave of about 50% duty cycle when the flash is activated.

If the frequency is too high for the MCU to cope with a monostable and amplifier similar to the circuit I posted previously can be used.


 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11714
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #42 on: July 01, 2010, 12:27:15 pm »
@hero: i found the 7HC02, great! reviewing your circuit, ok! 0.1uF, i got that, but... whats the cap value parallel to the inductor?
@mariano: yup, i agree, sometime the real signal fluctuation high, sometime low, depending on relative position of inductor to flash, i will try to change some parameters later.
@scrat: i've changed to 1K resistor coz higher value one like 10K will discharge the cap so slowly that the V2 (out) high for a very long time. its hard to tune the other components to get the desirable respond. as i said, i'm currently working on breadboard, so the smallest cap i can put on is the 0.1uF, i have smaller nF pF cap, but... smd! how? ???. maybe i should try your "precision amp" circuit, i just found out the LM193 is actually the sibling for the LM393, and i just found my uA741 opamp, will try using that as well.
« Last Edit: July 01, 2010, 12:40:10 pm by shafri »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11714
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #43 on: July 01, 2010, 12:33:38 pm »
Set the reference voltage to about half the peek voltage of the signal you need to trigger and you'll get a nice square wave of about 50% duty cycle when the flash is activated.
u remind me and mariano post is relevant. as i said, the pulse is varying in magnitude. its hard to set the correct Vref for a certain respond time we want, unless we just make it zero... or near zero? so the comparator will output a crazy jump between saturation points ??? and still... the inductor will be connected directly to the mcu, wont this present more risk to damage the mcu if the pulse goes too high?
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20840
  • Country: gb
  • 0999
Re: Safe Way of Detecting EMP by MCU
« Reply #44 on: July 01, 2010, 01:07:59 pm »
@hero: i found the 7HC02, great!
No.

You need the 74C02 or CD4001.

Or you can use the schematic with NAND gates with the 74C00 or CD4011.

The reason for this is that the the first gate is configured as an amplifier with the gate in its linear region causing both output transistors to conduct simultaneously. Standard CMOS gates have a low output current so not much current will flow but HC CMOS gates have a higher output current so much more current will flow which can cause the IC to overheat.

Quote
reviewing your circuit, ok! 0.1uF, i got that, but... whats the cap value parallel to the inductor?
The LC tank needs to have the same resonant frequency as the the ringing generated by the flash. The inductor is a pick up coil and the capacitor is just there to cause resonance.

u remind me and mariano post is relevant. as i said, the pulse is varying in magnitude.
So what?

You only need one pulse to trigger the comparator in the MCU indicating the flash has been activated, it doesn't matter if the pulse train stops after the first few pulses.

To be pedantic the waveform is an exponential decay anyway so it theoretically never reaches zero but that doesn't matter.

The reference voltage is not critical, so long as you can be certain it will be triggered when the flash goes off and it won't be triggered by noise. I suggested 50% of the peak voltage, (50% of the maximum voltage), it could by 99% but it's possible that it might not trigger, it could be 1% but noise might be a problem, I chose 50% because it seems like a safe bet.
« Last Edit: July 01, 2010, 01:11:14 pm by Hero999 »
 

Offline scrat

  • Frequent Contributor
  • **
  • Posts: 608
  • Country: it
Re: Safe Way of Detecting EMP by MCU
« Reply #45 on: July 01, 2010, 01:17:33 pm »
"precision" because it starts rectifying (reproducing input on the output) from nearly zero to -V supply (for the inverting config, while for the one Zap proposed it works from 0 to +V supply. A simpler rectifier made by only diodes will start conducting from 0.6-0.7 V, so it is more distant from an ideal rectifier. You use the "super diode" when you want to get the precise "absolute value" or envelope of a signal, or if you need to fully exploit its amplitude (as in this case, I think).
The one I proposed (which is typical) allows you to either choose to precisely rectify both halfwaves with 0.5 gain (by using 50k,100k,150k as in the scheme) or have an increased gain on the negative halfwave only (by using higher R5/R6 ratio).

Of course, if you cannot use smaller caps, that's a problem, but I'd try with Zap's circuit with a cap on the load, there input impedance is high (+ input of the opamp) and peak detector resistance can almost what you want...

It could be over engineered... I was trying to simplify ("clean") tuning, since in this way you can decouple the various effects. I don't think there's anything wrong with that. Once you get something working, you can even simplify it... An opamp IC costs some cents (yes, LM358 will probably be too slow while a comparator could oscillate), and contains two of them, where one can be used for rectifying, the other for Schmitt comparator...

One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. - Elbert Hubbard
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11714
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #46 on: July 01, 2010, 01:33:05 pm »
@hero: i found the 7HC02, great!
No.
You need the 74C02 or CD4001.

sorry typo error. its the SN74HC02-Q1 QUADRUPLE 2-INPUT POSITIVE-NOR GATE. can do?
hmm.. the resonant C value? let me figure it out.

@scrat: thanx for the info n suggestion.
i will be playing around with the circuits proposed here. ;)
« Last Edit: July 01, 2010, 01:37:15 pm by shafri »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20840
  • Country: gb
  • 0999
Re: Safe Way of Detecting EMP by MCU
« Reply #47 on: July 01, 2010, 01:44:50 pm »
"precision" because it starts rectifying (reproducing input on the output) from nearly zero to -V supply (for the inverting config, while for the one Zap proposed it works from 0 to +V supply. A simpler rectifier made by only diodes will start conducting from 0.6-0.7 V, so it is more distant from an ideal rectifier. You use the "super diode" when you want to get the precise "absolute value" or envelope of a signal, or if you need to fully exploit its amplitude (as in this case, I think).
The one I proposed (which is typical) allows you to either choose to precisely rectify both halfwaves with 0.5 gain (by using 50k,100k,150k as in the scheme) or have an increased gain on the negative halfwave only (by using higher R5/R6 ratio).

What I was saying is that you don't need to use a precision rectifier circuit, a normal non-inverting amplifier made with a single supply op-amp will do. I only suggested the diode to protect the op-amp's input from negative voltages but it might already have it built-in.

I don't see how a full wave rectifier is beneficial. The circuit you posted also has a gain of 0.5 so why not just omit it and feed the signal directly to the MCU's internal comparator?


sorry typo error. its the SN74HC02-Q1 QUADRUPLE 2-INPUT POSITIVE-NOR GATE. can do?
Yes, that should do.

Quote
hmm.. the resonant C value? let me figure it out.
I thought you already had an LC resonant circuit on your transistor amplifier?

This circuit works on a similar principle, it just has a higher gain and higher input impedance and includes a monostable to produce nice long pulses.
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11714
  • Country: my
  • reassessing directives...
Re: Safe Way of Detecting EMP by MCU
« Reply #48 on: July 01, 2010, 03:19:53 pm »
I thought you already had an LC resonant circuit on your transistor amplifier?
;D i just kinda put n test, try n error, i didnt have this resonant tank idea in mind. its been too long since i read the text, or simply i seldomly practice it.
and i didnt have resonant tank in my circuit, unless something in between, diode or transistor. i tried paralleling with the cap directly, the signal just got very very "overdamped" due to too high cap value i think.
« Last Edit: July 01, 2010, 03:23:16 pm by shafri »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline scrat

  • Frequent Contributor
  • **
  • Posts: 608
  • Country: it
Re: Safe Way of Detecting EMP by MCU
« Reply #49 on: July 01, 2010, 03:28:00 pm »
@hero
I don't disagree with you, I just want to give some alternatives (0.5 gain full wave / >1 gain half wave) to solve the (quite simple) problem  :) Simplest solutions usually work better.

The opamp you propose to use must allow rail to rail inputs, otherwise it won't work with small and near zero signals (I guessed your idea was to couple directly inductor or tank to the opamp). However, there are plenty of them.
Full wave is only optimal in the delay it introduces, since for signals starting with either negative or positive first half-wave the output will go positive, and also you can tune the R-C filter to be 2x faster (only on the falling envelope, in rising it depends essentially on the opamp's rated current). The drawback is low gain...
One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. - Elbert Hubbard
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf